is it possible to have different filetype associations per DE
is it possible to have different filetype associations per DE
hello, I am not sure i am posting in the right section or that my title is clear.
I have installed plasma 5.12 (from neptuneos) alongside xfce on MX17.1
When using KDE's file browser (dolphin), qpdf is invoked when doucble-clicking a pdf, and nomacs for pictures.
I'd like these to be respectively okular and gwenview - but only when logged in unde plasma, under xfce these are alright.
Is this possible ?
I have installed plasma 5.12 (from neptuneos) alongside xfce on MX17.1
When using KDE's file browser (dolphin), qpdf is invoked when doucble-clicking a pdf, and nomacs for pictures.
I'd like these to be respectively okular and gwenview - but only when logged in unde plasma, under xfce these are alright.
Is this possible ?
Re: is it possible to have different filetype associations per DE
I have never tried it, but imagine that it would work,
if you created separate users for Kde & Xfce.
Unless Kde uses different DE variables from Xfce?
if you created separate users for Kde & Xfce.
Unless Kde uses different DE variables from Xfce?
Thinkpad T430 & Dell Latitude E7450, both with MX-21.3.1
kernal 5.10.0-26-amd64 x86_64; Xfce-4.18.0; 8 GB RAM
Intel Core i5-3380M, Graphics, Audio, Video; & SSDs.
kernal 5.10.0-26-amd64 x86_64; Xfce-4.18.0; 8 GB RAM
Intel Core i5-3380M, Graphics, Audio, Video; & SSDs.
Re: is it possible to have different filetype associations per DE
I believe it is possible, but I think you may have to swap in a different, custom mimetypes file when you start up a specific desktop.
Re: is it possible to have different filetype associations per DE
Thanks for the suggestion, but i'd like to avoid it (too afraid of split-personality effects ;-)
I'd also rather avoid a mess of links between the two home folders (to share e.g. mozilla profile...)
Last edited by baldyeti on Mon May 21, 2018 1:41 pm, edited 1 time in total.
Re: is it possible to have different filetype associations per DE
I was thinking along those lines, too. Except I have no idea where the personal mime associations are kept, and do not know of a hook run at login time that could perform the swap.
The right-click 'open with" is usable (the relevant programs *are* available from that menu), but i was curious to ask if someone had ever automated this.
Re: is it possible to have different filetype associations per DE
yeah, except it wouldn't be particularly useful to me because half or more of my chosen applications don't utilize the xdg mimeapps list, nor gvfs, nor recently-used.xbel...Except
If you typically work from within a file manager (I do), thunar CustomActions or spacefm custom comands via "design mode" are helpful toward quick OpenWith. Also, dragging from file manager and using application desktop icons as drop targets comes in handy. (ps: I've also learned to create & toggle multiple task-oriented rox panels to display droptarget icons. I guess this approach is similar to KDE activities.)
Re: is it possible to have different filetype associations per DE
You could try the solutions here: https://askubuntu.com/questions/182920/ ... vironments
Re: is it possible to have different filetype associations per DE
Thanks for your input.
Re: is it possible to have different filetype associations per DE
Well, instead of trying to fiddle with DE-specific mime-settings you can achieve this the other way round. One way is shown in the below desktop file where I have squeezed to open pdf-files DE-specifically into the Exec-line as one-liner.
This will open pdf-files with okular in KDE and with qpdfview in XFCE,
Save the desktop-file eg.as „MyPDFViewer.desktop“ into your user specific applications folder "~/.local/share/applications"
or copy like this with the terminal:
Code: Select all
cp MyPDFViewer.desktop ~/.local/share/applications/MyPDFViewer.desktop
By this you have within your mime-database re-defined the default applicition to this little pdf-helper, which will become in both DE's.
Code: Select all
[Desktop Entry]
# file: ~/.local/share/applications/MyPDFViewer.desktop
Encoding=UTF-8
Type=Application
Terminal=false
Name=MyPDFviewer
Icon=application-pdf
GenericName=PDFviewer for XFCE and KDE
Comment=Run default pdfviewer for XFCE and KDE selectively
Categories=Viewer;Office;
Keywords=viewer;document;presentation;pdf;ps;djvu;
Exec=bash -c 'declare -A T;T=([XFCE]="/usr/bin/qpdfview --unique" [KDE]=/usr/bin/okular); exec ${T[${XDG_CURRENT_DESKTOP}]} "$@"' "" %F
MimeType=application/pdf;application/x-pdf;text/pdf;text/x-pdf;image/pdf;image/x-pdf;application/postscript;image/vnd.djvu;image/x-djvu;
Path=
StartupNotify=false
Let me know if that works.
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB
Re: is it possible to have different filetype associations per DE
Hello fehlix, I just tried your .desktop file and it works just fine. Very neat.