Page 1 of 2

[SOLVED] XDG: Problem with opening of items under Fluxbox

Posted: 5. Jun 2013, 08:21
by zAchAry
Each time I attempt to open any file from a Qt application, be it qtFM (e.g. double click on a an item) or QupZilla (e.g. mailto:), Firefox is being launched and then suggests to open a selected file.

What could be the problem?

Original post:
Hello,

Each time I double click on an item, Firefox is being launched, even though another application is set at Edit > Edit filetype.

Does anyone have an idea of where the source of the problem is?

Re: qtFM: Problem with opening of items

Posted: 6. Jun 2013, 00:38
by laprjns
I installed gtfm using slapt-get and have no problems. The appropriate applications get launched when clicking on files

Re: Qt: Problem with opening of items

Posted: 6. Jun 2013, 04:36
by zAchAry
Thank you for your reply. I have corrected the initial post.

Re: Qt: Problem with opening of items

Posted: 6. Jun 2013, 11:06
by djemos
Default action for Double-click on qtfm is to open files to edit them with the corresponding application. (e.g. double click on gtkman on /usr/bin/gtkman will open gtkman with geany to edit the file since it is a python file.
If it is a binary file then will ask you how to handle it. So no double click on binaries from qtfm.

To run a binary file right-click with mouse on it and choose run from the menu
so to run qtfm from qtfm right-clck and click on run.

choosing edit has the same result as double-click.

clicking on an email shortcut e.g. user@blabla.com then claws mail opens
so it is working fine.

Installing mozilla-firefox-17.0.6esr-i686 does not open claws-mail because defaults to evolution. So change it from Edit - Preferences -> Applications on mozilla-firefox to claws-mail works fine.

Re: Qt: Problem with opening of items

Posted: 6. Jun 2013, 11:25
by knome
In ~/.local/share/applications create new empty defaults.list and mimeapps.list (back up your originals if they exist). In qtfm create and Save a new file association using Edit filetype. Check if the entry appears in defaults.list and/or mimeapps.list. If it works then there may be something wrong with your original files or they don't exist.

Re: Qt: Problem with opening of items

Posted: 6. Jun 2013, 11:35
by djemos
knome wrote:In ~/.local/share/applications create new empty defaults.list and mimeapps.list (back up your originals if they exist). In qtfm create and Save a new file association using Edit filetype. Check if the entry appears in defaults.list and/or mimeapps.list. If it works then there may be something wrong with your original files or they don't exist.
Suppose you want to run qtfm from qtfm adding application/x-executable=qtfm.desktop in ~/.local/share/applications/defaults.list then will open all executables in qtfm.
this is wrong.
qtfm default double click action is set to edit files using mime type.
To run an executable right-click and click on run.

Re: Qt: Problem with opening of items

Posted: 6. Jun 2013, 12:58
by zAchAry
Thanks to all of you for your help.
knome wrote:In ~/.local/share/applications create new empty defaults.list and mimeapps.list (back up your originals if they exist). In qtfm create and Save a new file association using Edit filetype. Check if the entry appears in defaults.list and/or mimeapps.list. If it works then there may be something wrong with your original files or they don't exist.
Warning: Using qtFM filtype editor will reset defaults.list of your home directory.

I think there is a problem with defaults.list of root. If I do not set with qtFM the MIME Types (using Save), even though SMPlayer or Viewnior is set, it will open Firefox.

The above suggestion does not work with QupZilla - Works partially with qtFM.
I suspect I have some different issue with my Qt settings that cause to this strange behavior.
Alternatively, perhaps there is problem with my XDG settings.
I do not know where to look.



I think I need to solve an issue with XDG.

When I enter these:

Code: Select all

xdg-open mailto:
xdg-open xmpp:
Firefox is being launched.

I try to properly associate protocols with

Code: Select all

xdg-mime default gpicview.desktop `grep 'MimeType=' /usr/share/applications/gpicview.desktop | sed -e 's/.*=//' -e 's/;/ /g'`
via: http://lxde.sourceforge.net/gpicview/

How do I reload XDG to see if this is working?

Damn Mozilla! Thanks the sun Salix OS Team has decided to drop it as a default browser.
It feels, to me, as if I am back using M$ windows when this crappy product is installed.
If anyone knows of a project that manages bookmarks in the exact same manner as FF does. I will leave FF for good!


Edit: There is possibly something else that is redirecting Qt based software to Firefox.

Re: XDG: Problem with opening of items

Posted: 14. Jun 2013, 05:17
by zAchAry
Command

Code: Select all

$ xdg-open http://www.salixos.org/
launches Firefox, even though QupZilla is set as a default program for http://

Code: Select all

$ xdg-mime query default x-scheme-handler/http
qupzilla.desktop
I tried these two commands:

Code: Select all

$ xdg-mime default qupzilla.desktop `grep 'MimeType=' /usr/share/applications/qupzilla.desktop | sed -e 's/.*=//' -e 's/;/ /g'`

Code: Select all

$ xdg-mime default qupzilla.desktop x-scheme-handler/http
This is the file (translated entries were removed)

Code: Select all

$ cat /usr/share/applications/qupzilla.desktop
[Desktop Entry]
Name=QupZilla
Type=Application
Icon=qupzilla
Categories=Network;WebBrowser;
Comment=A fast and secure web browser
GenericName=Web Browser
Exec=qupzilla %u
MimeType=text/html;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
Terminal=false
X-Ayatana-Desktop-Shortcuts=NewTab;NewWindow;PrivateBrowsing;
Please help.

Re: XDG: Problem with opening of items

Posted: 16. Jun 2013, 01:14
by knome
Are you using the Xfce desktop? What happens if you use exo-open?

Re: XDG: Problem with opening of items under Fluxbox

Posted: 16. Jun 2013, 16:03
by zAchAry
XDG works as expected under Xfce, though exo-open seems to take over XDG when both conflict. I am experiencing this issue under Fluxbox.