Change default app via console

Grant emailgrant at
Sun Mar 16 01:13:24 CET 2014

>>>>> You can copy/create *.desktop file in ~/.local/share/applications
>>>>> And modify it as you wish.
>>>>>> > I do not use gnome and evince but i think you can check desktop
>>>>>> > files in /usr/share/applications and find file(s) with
>>>>>> > 'Exec=evince-previewer %U' And change it to 'Exec=evince %U'
>>>>>> >
>>>>>> >> I'd like to have PDF documents opened with the full evince app
>>>>>> >> instead of evince's "GNOME Document Previewer" since I can't get
>>>>>> >> copy/paste to work from the previewer.  How can I make that change
>>>>>> >> via console?
>>>>>> Ideally I would be able to edit the app/filetype associations in the
>>>>>> userdir.  Which files there control that?
>>>>Great, it looks like ~/.local/share/applications/mimeapps.list should
>>>>do it.  Where are exo-web-browser.desktop and exo-file-manager.desktop
>>>>- Grant
>>> At least exo-file-manager.desktop is defined as a desktop file
>>> in /usr/share/applications. It is called "File Manager", and there may
>>> be more than one with that name. Listing them in terminal shows the
>>> actual file names.
>>I have that file but there doesn't seem to be a file manager defined
>>in that file.  Settings Manager -> Preferred Applications displays
>>Chromium, Thunar, and Xfce Terminal, but they aren't listed anywhere
>>in /usr/share/applications/*exo*.
>>- Grant
> I think the exo*.desktop files all define a separate file used
> by /etc/alternatives when called from dpkg-reconfigure . This is the
> way you change the preferred browser, file manager, terminal,
> etc. It takes a bit to learn to use these, but once you start doing it,
> it makes everything else work properly. The command
> sudo dpkg-reconfigure --all
> lets you see all configuration changes that can be made by the user. It
> might be quite extensive, though, so if you run it, you need more than
> a minute or two. If you simply hit enter on an entry, it does not
> change from the current setting.

I can't run dpkg-reconfigure in my application unfortunately.  I'm
looking for the text file which associates exo-web-browser.desktop
with a particular web browser.  Do you know where that happens?  Here
is the contents of my exo-web-browser.desktop file:

[Desktop Entry]
Exec=exo-open --launch WebBrowser %u
Name=Web Browser
Comment=Browse the web

- Grant

More information about the Xfce mailing list