Debian default applications

From campisano.org
Jump to navigation Jump to search

default applications

utilities

as root

  • update alternatives
update-alternatives --get-selections
update-alternatives --list editor
update-alternatives --config editor
update-alternatives --config x-www-browser
update-alternatives --install /usr/bin/firefox x-www-browser /home/shared/opt/software/firefox/firefox 1
update-alternatives --remove x-www-browser /home/shared/opt/software/firefox/firefox
  • update all defaults
# WARN! do not do the follow, but if you need, set a readable umask!
# umask 022
# update-mime-database /usr/share/mime
# update-desktop-database /usr/share/applications

as common user

  • update all defaults
update-mime-database $HOME/.local/share/mime
update-desktop-database $HOME/.local/share/applications
  • update specific mime - new xdg-mime system
xdg-mime query default x-scheme-handler/http
xdg-mime default chromium.desktop x-scheme-handler/http
xdg-mime default chromium.desktop x-scheme-handler/https
xdg-mime default org.gnome.Evince.desktop application/pdf
  1. as alternative, you can use `mimeopen -d file.mp4`
  • update specific mime - old legacy mailcap
echo 'application/pdf; evince "%s"; test=test -n "$DISPLAY"' >> ~/.mailcap
echo 'x-scheme-handler/http; chromium "%s"; test=test -n "$DISPLAY"' >> ~/.mailcap
echo 'x-scheme-handler/https; chromium "%s"; test=test -n "$DISPLAY"' >> ~/.mailcap

config files

  • /usr/share/mime
  • /etc/mime.types
  • /etc/mailcap
  • ~/.config/mimeapps.list
  • ~/.mailcap

References