You are not logged in.
Thanks Damo, but I still have a huge question... I get the fact that files and like scripts, and music files, and text files, images etc.. have mime types, So they can specify what they consist of, and how to handle opening them..That part I got. But why do programs themselves need mime types? Looking at VLC it has a huge list of mime types:
MimeType=video/dv;video/mpeg;video/x-mpeg;video/msvideo;video/quicktime;video/x-anim;video/x-avi;video/x-ms-asf;video/x-ms-wmv;video/x-msvideo;video/x-nsv;video/x-flc;video/x-fli;video/x-flv;video/vnd.rn-realvideo;video/mp4;video/mp4v-es;video/mp2t;application/ogg;application/x-ogg;video/x-ogm+ogg;audio/x-vorbis+ogg;audio/ogg;video/ogg;application/x-matroska;audio/x-matroska;video/x-matroska;video/webm;audio/webm;audio/x-mp3;audio/x-mpeg;audio/mpeg;audio/x-wav;audio/x-mpegurl;audio/x-scpls;audio/x-m4a;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;application/vnd.rn-realmedia;audio/x-real-audio;audio/x-pn-realaudio;application/x-flac;audio/x-flac;application/x-shockwave-flash;misc/ultravox;audio/vnd.rn-realaudio;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;image/vnd.rn-realpix;audio/x-pn-realaudio-plugin;application/x-extension-mp4;audio/mp4;audio/amr;audio/amr-wb;x-content/video-vcd;x-content/video-svcd;x-content/video-dvd;x-content/audio-cdda;x-content/audio-player;application/xspf+xml;x-scheme-handler/mms;x-scheme-handler/rtmp;x-scheme-handler/rtsp;video/vnd.mpegurl;
X-KDE-Protocols=ftp,http,https,mms,rtmp,rtsp,sftp,smb
What would it need to declare these for? If we set our audio files to launch with vlc player... Then as I understand it, the D.E will see that vlc has control over audio files. and it will seek to launch vlc. I'm not seeing where vlc's mime types come into play... The same goes for firefox:
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
What application would make use of these? Again I get why individual files have mime types...but for applications that *run* the files.. what is using them?
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
Till the Gurus come...
H_B Yes I think that's on target. Can I tweak the exo-open section a bit?
At least in regards to the web-browser option, this has the option to point to a specific script:
/usr/bin/sensible-browserWhich provides the lookup of whatever x-www-browser we've specified. The other options, email, file-manager and terminal must be specifically set to a certain application.
In fact, we can point the others at Debian Alternatives too. DA's look just like any other command as far as the rest of the system is concerned. As I posted above, on my own system I've just tried pointing FileManager at bl-file-manager, and TerminalEmulator at x-terminal-emulator. This seems to work OK, and (as I posted above) I'm now proposing to preset those (and WebBrowser) so that users won't have to mess with exo-preferred-applications too much. There's no Debian, or BL, Alternative for Mail Reader at the moment, so users might still have to set that one themselves.
So in doing this, if a 3rd party application wants to launch the terminal, lets say, the D.E will see the request, query the terminal's "type" against the list in mimeapps.list...
This bit's wrong, I'm afraid. Apps don't have mime-types, only files. The 3rd party app will do one of three things:
call its choice of terminal emulator directly, by its real name
call x-terminal-emulator
call 'exo-open --launch TerminalEmulator'
Which of those it is, is up to the app itself. If it chooses (3), then at that point the exo preference setting comes into play. As HoaS pointed out, it's a specifically XFCE app, and we have it in BL because of Thunar. I think the main cases when it might be invoked are when doing something via Thunar, or some other XFCE app.
Do I have this right? or am I still way off base here...?
Bravo! As damo suggested, if you edit the last part a little bit, why not put it in "Tips,Tutorials & Scripts"?
BTW Thanks to this coming up, I noticed a nasty spelling mistake in BunsenLabs default ~/.config/mimeapps.list
I had every entry pointed to bl-mediaplayer not bl-media-player.
Hurriedly fixed and pushed to ver. 8.7.2-1 in the master branch of bunsen-configs, so an upgrade should come soon.
Existing users will still have to edit their mimeapps.list manually though.
...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
@H_B your last post came in while I was writing the above.
Apps don't have mime-types themselves. The .desktop file MimeType entry is a list of the kind of files an app is prepared to handle if the system sends it.
This is how we "set our audio files to launch with vlc player". "audio files" is a bit vague, and really means a long list of mime-types that VLC can play. If Thunar, or any other app that uses this stuff, wants to open a file of mime-type video/mpeg for example, it checks all the mime-type declarations in all the applications .desktop files, and if more than one of them declares it can take video/mpeg then it uses the users - or if not available the system's - mimetypes.list preference. I'm not sure what happens if no app declares interest in that file! It's quite a long complicated algorithm which you'll have to Google up...
EG The Arch Wiki article is a bit vague and even possibly wrong in places (sorry Head_on_a_Stick ), but gives an idea how complicated it all is: https://wiki.archlinux.org/index.php/de … plications
Last edited by johnraff (2016-08-30 02:34:42)
...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
@H_B your last post came in while I was writing the above.
Apps don't have mime-types themselves. The .desktop file MimeType entry is a list of the kind of files an app is prepared to handle if the system sends it.
This is how we "set our audio files to launch with vlc player". "audio files" is a bit vague, and really means a long list of mime-types that VLC can play. If Thunar, or any other app that uses this stuff, wants to open a file of mime-type video/mpeg for example, it checks all the mime-type declarations in all the applications .desktop files, and if more than one of them declares it can take video/mpeg then it uses the users - or if not available the system's - mimetypes.list preference. I'm not sure what happens if no app declares interest in that file! It's quite a long complicated algorithm which you'll have to Google up...
Yep, I've been updating that post, so I think you may have missed the very last update I did, that goes along with what you just said! I'm pretty exhausted as of now, but tomorrow or so I'll fix up the post, and pretty it up. Feel free to make any edits and modify if as you see fit until then...
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
Sorry, one thing I missed before. BunsenLabs is not a DE - we don't have any DE around here to handle these things. Openbox just draws windows, handles keypresses and mouseclicks, and makes menus. (It also does some arcane X stuff related to the "draws windows" bit, which is in fact quite complicated.) Anyway, Openbox has nothing to do with opening files with apps.
The reason that works on BL is that Thunar and many other apps have to open files and use mimetypes to choose where to send them. Yes, full-blown DEs also have their own builtin mechanisms to complicate simplify things for users. Anyway, check that Arch Wiki article for a start.
Oh yes, please replace all references to bl-mediaplayer with bl-media-player. That was my fault of course (see #22 above, and https://forums.bunsenlabs.org/viewtopic … 969#p35969 ). :8
Last edited by johnraff (2016-08-30 02:58:02)
...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
BunsenLabs is not a DE
I'd beg to differ. With the customized Openbox rc.xml and menu.xml and other behind-the-scenes settings, BunsenLabs is effectively a DE built on the Openbox WM. The fact that BunsenLabs doesn't have any daemon handling the desktop like LXDE doesn't change this. @johnraff himself contributed many hours to developing the UI Voodoo of The BunsenLabs Experience (tm).
Be excellent to each other, and...party on, dudes!
BunsenLabs Forum Rules
Tending and defending the Flame since 2009
Offline
johnraff wrote:BunsenLabs is not a DE
I'd beg to differ. With the customized Openbox rc.xml and menu.xml and other behind-the-scenes settings, BunsenLabs is effectively a DE built on the Openbox WM. The fact that BunsenLabs doesn't have any daemon handling the desktop like LXDE doesn't change this. @johnraff himself contributed many hours to developing the UI Voodoo of The BunsenLabs Experience (tm).
I sort of agree. While it may not offer 100% of D.E functionality like Gnome's DE, I think the b-l extra's plus the Openbox windowing core, I sort of see it as it's own environment. Maybe we've invented a new thing... I dub it, HE The hybrid-environment! (HE funny enough, being Helium )
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
pvsage wrote:johnraff wrote:BunsenLabs is not a DE
I'd beg to differ. With the customized Openbox rc.xml and menu.xml and other behind-the-scenes settings, BunsenLabs is effectively a DE built on the Openbox WM. The fact that BunsenLabs doesn't have any daemon handling the desktop like LXDE doesn't change this. @johnraff himself contributed many hours to developing the UI Voodoo of The BunsenLabs Experience (tm).
I sort of agree. While it may not offer 100% of D.E functionality like Gnome's DE, I think the b-l extra's plus the Openbox windowing core, I sort of see it as it's own environment. Maybe we've invented a new thing... I dub it, HE The hybrid-environment! (HE funny enough, being Helium
)
Personally, I've always looked at #!/BL as a kitbash. :-)
Offline
@ All,
Made some updates to the earlier post:
MIME Types
.
Oh yes, please replace all references to bl-mediaplayer with bl-media-player. That was my fault of course (see #22 above, and https://forums.bunsenlabs.org/viewtopic … 969#p35969 ). :8
I used:
sed -i 's/bl-mediaplayer/bl-media-player/' .config/mimeapps.list
Of course you can change the output path to point to where's your mimeapps.list is.
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
Debian is not a DE, GNOME, KDE, and Xfce4 are DE's
BunsenLabs is not a DE, but as pvsage said:
johnraff himself contributed many hours to developing the UI Voodoo of The BunsenLabs Experience (tm)
and Horizon_Brave hinted with HE ...
Why not come up with a name damo mentioned a long time ago and uses an interesting choice: BLOB
GNOME, KDE, Xfce4 and BLOB!
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
I guess my main point at the time was in response to this:
MIME types as seen in ~/.config/mimeapps.list and ~/.local/share/applications/mimeapps.list, are in existence to tell the D.E what application to open certain TYPES of files with. So for example all applications that are encoded with an "audio/mp4" designation, Openbox knows to wake up "bl-mediaplayer"...
BL per se has no mechanism to associate files with apps, and certainly Openbox has nothing to do with it. Maybe the bigger DEs do have such tools, but in our case its down to what individual apps decide to do, after referring to the mimetype data. That's the sense in which I meant BL was not a DE.
BTW ~/.local/share/applications/mimeapps.list is now a deprecated location, but some apps still use it. In default BL it's a symlink to the approved ~/.config/mimeapps.list, so edits in either place will work.
...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
I guess my main point at the time was in response to this:
Horizon_Brave wrote:MIME types as seen in ~/.config/mimeapps.list and ~/.local/share/applications/mimeapps.list, are in existence to tell the D.E what application to open certain TYPES of files with. So for example all applications that are encoded with an "audio/mp4" designation, Openbox knows to wake up "bl-mediaplayer"...
BL per se has no mechanism to associate files with apps, and certainly Openbox has nothing to do with it. Maybe the bigger DEs do have such tools, but in our case its down to what individual apps decide to do, after referring to the mimetype data. That's the sense in which I meant BL was not a DE.
BTW ~/.local/share/applications/mimeapps.list is now a deprecated location, but some apps still use it. In default BL it's a symlink to the approved ~/.config/mimeapps.list, so edits in either place will work.
Ah, I see, you're right, I think I mistakenly globbed openbox into the role of actual decision making which it definitely doesn't do.. Will edit. Thank JRaff
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
Finally done and pushed to bunsen-configs' deuterium branch.
...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
Head_on_a_Stick wrote: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..
Nice Sally Field reference!
I don't care what you do at home. Would you care to explain?
Offline