You are not logged in.
The mysterious role of exo-preferred-applications in choosing default apps comes up every now and then. Sometimes it overrides the Debian Alternatives. ( Latest occurrence: https://forums.bunsenlabs.org/viewtopic.php?id=2639 )
exo-preferred-applications is a small GTK utility which comes with exo-utils, a dependency of Thunar. Maybe we could add a call to it in the Preferences menu, as "Default Applications (exo)" or something like that?
---
Another possibility: "Font Settings" > 'bl-text-editor ~/.config/fontconfig/fonts.conf' ?
Apart from hinting, antialias etc., this gives access to the choice of default fonts for "sans", "mono" etc. for a consistent desktop-wide font change. (By default these point to the Droid family.)
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Maybe we could add a call to it in the Preferences menu, as "Default Applications (exo)" or something like that?
Yes but is there any way of setting the exo-preferred-applications explicitly to prevent the user having to fiddle with it?
Having two preferences items for the same thing could be confusing.
Another possibility: "Font Settings" > 'bl-text-editor ~/.config/fontconfig/fonts.conf' ?
Apart from hinting, antialias etc., this gives access to the choice of default fonts for "sans", "mono" etc. for a consistent desktop-wide font change. (By default these point to the Droid family.)
I'm not sure how useful that would be, that file is not exactly human-readable or simple to edit.
Also, hinting & antialias &c are set in ~/.Xresources as well so any changes would have to be mirrored there.
Offline
Just to give my 'outside' opinion, I honestly didn't know about the existence of Debian Alternatives until I was lurking around these forums..It's definitely (in my opinion) one of the lesser known features of the OS. I'm not a fan of the exo-preferred-application gui.
The issue is that from what I"ve seen, the exo-preferred-apps program only allows you to select a few defaults, such as web browser, mail client, file manager and terminal...so using this limits the user in what they may think is all you can make into preferred applications. Meanwhile behind the scenes with the update-alternatives command you can pretty much make any defaults you want for any application.
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
Instead of adding more items to the Menu, why not have descriptions of these utilities in the Help menu?
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
'outside' opinion
There are no "outsiders" here, this is a community-developed distribution -- all opinions are welcomed, the more the merrier
Offline
Horizon_Brave wrote:'outside' opinion
There are no "outsiders" here, this is a community-developed distribution -- all opinions are welcomed, the more the merrier
::Tears in eyes:: "you love me...you really love me"
Okay, but seriously, is there no other gui application alternative to exo-preferred-application? It doesn't really provide the user any insight as to what else is available. For example, no default for the editor option ...or vi... or x-window-manager etc..
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
exo-preferred-applications is used by the XFCE desktop and is a very specific tool.
http://docs.xfce.org/xfce/exo/preferred-applications
I don't know where the configuration file is though, which is irritating.
Offline
exo-preferred-applications is used by the XFCE desktop and is a very specific tool.
http://docs.xfce.org/xfce/exo/preferred-applications
I don't know where the configuration file is though, which is irritating.
OK, took up the challenge:
john@bunsen1:~$ grep -r 'sensible-browser' .
./.config/xfce4/helpers.rc:WebBrowser=debian-sensible-browser
...
It's ~/.config/xfce4/helpers.rc
Also see
exo-open --help
to see it only works on four app types.
Make changes in the GUI to see them reflected in the file above. It seems to look at .desktop files and refer to mimetype information when selecting candidates for each role. There are also some custom .desktop files in ~/.local/share/xfce4/helpers/ but I'm not sure exactly how they get there - maybe it's when choosing a custom app to open a file in Thunar.
EDIT: I just tried setting the File Manager to bl-file-manager instead of Thunar in exo-preferred-applications. The result was
~/.config/xfce4/helpers.rc contained:
FileManager=custom-FileManager
and
~/.local/share/xfce4/helpers/ contained custom-FileManager.desktop, with:
[Desktop Entry]
NoDisplay=true
Version=1.0
Encoding=UTF-8
Type=X-XFCE-Helper
X-XFCE-Category=FileManager
X-XFCE-CommandsWithParameter=bl-file-manager "%s"
Icon=bl-file-manager
Name=bl-file-manager
X-XFCE-Commands=bl-file-manager
@all This is nothing to do with Debian Alternatives, it's configuration for exo-open which is one of the commands an app (eg Thunar) might use to open a file. (others are xdg-open, gnome-open...)
Usually it all just works, but sometimes the only way out of a weird file-associations issue is to call exo-preferred-applications and tweak it. Many users don't even know of the app's existance, hence my suggestion, but damo's idea of adding a note to the Help section rather than calling it in Preferences might work too.
Either way it would be one more menu item of course, unless @damo you were thinking of a new Help page with this along with other stuff, like the fonts file, and maybe some other "hidden" configs?
Last edited by johnraff (2016-08-27 06:35:21)
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
johnraff wrote:Another possibility: "Font Settings" > 'bl-text-editor ~/.config/fontconfig/fonts.conf' ?
Apart from hinting, antialias etc., this gives access to the choice of default fonts for "sans", "mono" etc. for a consistent desktop-wide font change. (By default these point to the Droid family.)I'm not sure how useful that would be, that file is not exactly human-readable or simple to edit.
Also, hinting & antialias &c are set in ~/.Xresources as well so any changes would have to be mirrored there.
Agreed. Some documentation would be a better way.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
... but damo's idea of adding a note to the Help section rather than calling it in Preferences might work too.
Either way it would be one more menu item of course, unless @damo you were thinking of a new Help page with this along with other stuff, like the fonts file, and maybe some other "hidden" configs?
^ This.
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
^Looks good, though would users who didn't already know what they were looking for have any idea what "exo-preferred-applications" was?
This seems to come up about once a year, just long enough that I've forgotten the command and have to search through my dynamically-generated menu under "Preferences", discover the GUI still doesn't tell you its real name, do a ls of /usr/share/applications, remember it doesn't start with xfce...
What a pain.
Last edited by johnraff (2016-08-27 07:26:19)
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
^Looks good, though would users who didn't already know what they were looking for have any idea what "exo-preferred-applications" was?
It was just a quick proof-of-concept
Perhaps it can be combined with, or include, the existing "... Alternatives" items in the System menu?
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
^Looks good, though would users who didn't already know what they were looking for have any idea what "exo-preferred-applications" was?
In so many words...no. But that being said, we can't hold *everyones* hand all the time for every street crossing. As stated, as much as this is a features of Deb, that goes un-noticed, it's not up there with bl-welcome menu priorities to me. So personally I think a small write up under Help would suffice... Preferences seems to be reserved for the much more important settings, not the "under the hood" mechanics.
Oh also, not sure if this is a big concern...but in the About Bunsen Alternatives files ( Rightclick > Help > Bunsen Help Files > About Bunsen Alternatives)
There's a line under Editing Alternatives that suggests using the command "Galternatives" though the command is really "galternatives" lower case g. May throw some people off.. Just something I noticed!
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
Perhaps it can be combined with, or include, the existing "... Alternatives" items in the System menu?
Not sure about that. The exo-settings are mime-type based config for exo-open, and unrelated to the Alternatives which are symlinks for commands. Also the exo-stuff is per-user, while Alts. are system-wide.
personally I think a small write up under Help would suffice... Preferences seems to be reserved for the much more important settings, not the "under the hood" mechanics.
Makes sense.
There's a line under Editing Alternatives that suggests using the command "Galternatives" though the command is really "galternatives" lower case g.
I think this is OK. That section of the text is referring to the name of the app, rather than its command.
...there is also a graphic front end called Galternatives which is easier to
use in some ways.
There are many other examples like Thunar/thunar, and anyway a new user will probably be calling Galternatives from the Menu.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
So... One question and stop me if you've heard this one already...
If galternatives exits....what exactly is the point of exo-preferred-applications? Does galternatives not provide the same and much more depth and functionality than exo-pref?
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
^NO!!
They're two quite different things.
@all This is nothing to do with Debian Alternatives, it's configuration for exo-open which is one of the commands an app (eg Thunar) might use to open a file. (others are xdg-open, gnome-open...)
The exo-settings are mime-type based config for exo-open, and unrelated to the Alternatives which are symlinks for commands. Also the exo-stuff is per-user, while Alts. are system-wide.
I guess the problem here is that to a user, they appear to be doing the same thing.
...is there any way of setting the exo-preferred-applications explicitly to prevent the user having to fiddle with it?
Head_on_a_Stick wrote:exo-preferred-applications is used by the XFCE desktop and is a very specific tool.
http://docs.xfce.org/xfce/exo/preferred-applications
I don't know where the configuration file is though, which is irritating....It's ~/.config/xfce4/helpers.rc
... also some custom .desktop files in ~/.local/share/xfce4/helpers/
Let's try HoaS's idea. If we use the above files to preset exo-open's WebBrowser, FileManager and TerminalEmulator to sensible-browser, bl-file-manager and x-terminal-emulator respectively, then this problem might go away. (We'll have to leave Mail Reader for the user to set, though, so there will still be a need for documentation.)
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
^NO!!
They're two quite different things.
johnraff wrote:@all This is nothing to do with Debian Alternatives, it's configuration for exo-open which is one of the commands an app (eg Thunar) might use to open a file. (others are xdg-open, gnome-open...)
johnraff wrote:The exo-settings are mime-type based config for exo-open, and unrelated to the Alternatives which are symlinks for commands. Also the exo-stuff is per-user, while Alts. are system-wide.
I guess the problem here is that to a user, they appear to be doing the same thing.
Hoo kay...Sorry...
Not sure if I was the only one confused by it, but I doubt it.
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
^No, it is kind of confusing.
Yet another way default applications are chosen is the mime-type associations in ~/.local/share/applications/mimeapps.list and /usr/share/applications/mimeapps.list, which refer to the mime-type declarations in all those appname.desktop files.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
MIME-Types / DB- Alternatives / Preferred Applications
Alright... looked into the MIME concept and I can see the difference between it and DB-Alternatives. MIME types as seen in ~/.config/mimeapps.list and ~/.local/share/applications/mimeapps.list (now deprecated but still respected) , are in existence to tell the D.E (desktop environment), what application to open certain TYPES of files with. Or in certain cases, like our own, specifies what application to use. So for example all files that are encoded with an "audio/mp4" designation, knows to go find the application "bl-media-player". Now, that "bl-media-player" is what's using the db-alternatives. It points to whatever application we set bl-media-player to actually be. In our case, if we do :
ls -l /etc/alternatives | grep bl-media-player
We'd see that whenever called, it summons vlc-player. So, digging into this, whatever application calls a file that has the designation mimetype of audio/mp4, triggers the D.E to check what actually knows how to handle the file, it see's bl-media-player. It opens bl-mediaplayer, which is a symbolic link (db-alternative) to vlc-player. Likewise in our scenario with BunsenLabs, we don't have a direct D.E like GNOME to do this, so the exact application that goes and looks at the /.config/mimeapps.list and finds what handles the file, is still a bit vague.
If we double click a text file, that has a mimetype of text/plain, either a call to exo-open would occur(described below) or perhaps a call to xdg-open (I believe?) and that xdg-open or exo-open process would be what goes and looks into our mime list. It would find what is handling the text/plain mimetype, ( bl-text-editor), which in turn is a pointer to the geany application.
So the advantage of this confusing abstraction is that if we wanted to change the default program, instead of going into the mime type file and changing each mime type that you can think of relating to any sort of media, you can just change the alternative that is being called by the D.E. Of course you don't have to set the mime types to point to alternatives, you can just as easily 'hardcode' one particular program to open and handle a file with a certain mimetype. For example for text files you can have it point directly to the geany program, but it removes the advantage of being able to change apps on the fly.
Another application of MIME types is for server/ client relationship, but this isn't really used in what we're discussing here. It's the desktop environment that's concerning itself with the mime types of each file and comparing them with the list in the mimeapps.list file. There's also an application for this for email, but I haven't really read into...so someone feel free to expand upon those areas...And As it turns out, that's whats MIME's were originally created for.
Exo-Settings/Exo-Open/Exo-Preferred-Applications
Location of the "config" file: ~/.config/xfce4/helpers.rc
Note that this really isn't a real config file, but just a file that shows what are the defaults currently set.
Lastly, we get to the exo-preferred-applications program. Not that this program (and the entire exo-suite) is an XFCE suite of utilities. The exo-preferred-applications gui is just one option to use and customize what applications are called when a file is encountered. This program comes with the exo-open utility. For some reason, it only concerns itself with four "preferred" applications, the email client, web-browser, file-manager, and terminal. Each of these four applications can be set to point to any command, or alias, or alternative you wish. For example, if you want to change the preferred web browser, you'll see that there's an option for "sensible browser".
/usr/bin/sensible-browser
This sensible-browser script is a debian construct, and it provides the lookup of whatever x-www-browser we've specified. (again the x-www-browser is the db-alternative here). Like-wise you can set the preferred File Manager to something else using the "other" option. (the default for our setting is Thunar) but you can add in another option. For example, let's pretend we had something else as an alternative for the bl-file-manager symlink. We could use that instead of Thundar. See below:
Before changing the default to bl-file-manager:
kingghidorah@kingghidorah:~$ cat .config/xfce4/helpers.rc
WebBrowser=iceweasel
TerminalEmulator=debian-x-terminal-emulator
FileManager=Thunar
After changing it to "bl-file-manager" :
kingghidorah@kingghidorah:~$ cat .config/xfce4/helpers.rc
WebBrowser=iceweasel
TerminalEmulator=debian-x-terminal-emulator
FileManager=custom-FileManager
You can now see the config file for exo-preferred-application states that the default file manager is "custom-FileManager". Meaning whatever we have pointing to as an alternative for bl-file-manager.
So in doing this, if a 3rd party application wants to launch say, a .txt file the D.E will see the request, query the text file's "type" against the list in mimeapps.list and or the preference set by exo-preferred-application and use the program specified.
How does this work together? Okay so apparently, most applications (not files) such as VLC, GIMP, Firefox, etc.. they have a .desktop file that basically describe the application to the DE. In this .desktop file is a field called MIMETYPE. Okay, don't be confused here. Because the "Type" for these are set to Application, the MIMETYPE field describes what types of files they can handle. But it's not what file type they ARE, but it's rather what file type they SUPPORT. So if you were to look at the .desktop entry for firefox, you'd see something like:
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;
This shows what Files mime's it can handle and open without saying "what the hell is this??" This comes into play like this... When we install an application, say firefox for example.. The OS places it's .desktop file (the D.E entry file) into /usr/share/applications. This lets the Desktop environment later on, query it and check what mime's it can handle. So if it's searching for all installed applications that can open http files, guess what? bingo, we have firefox installed, and because it's MIMETYPE field says http... then firefox is now added to the list of applications that we can use for that type of file.
So again, our individual files, have mimetypes that correlate what they ARE and how they need to be handled. Our applications have mimetypes listed that correlate what they CAN handle. Put the two together and they're a match made in heaven. Tying both of these ends together is the Desktop evironment which read's both. The application .desktop entry tells the system what applications can be used for any MIME type and provides the applications in the 'Open With' list that we see in Thunar.
Defaults
The default is defined elsewhere. The file /usr/share/applications/mimeapps.list provides the information for the system defaults. This is described in the beginning of this post. The mimeapps.list is what gives us the default listing of applications to use....
Do I have this right? or am I still way off base here...?
Last edited by Horizon_Brave (2016-08-31 17:13:51)
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
^ If your analysis gets the thumbs-up from the BL system gurus, then it should go in "Tips,Tutorials & Scripts"
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline