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

You have a problem with Salix? Post here and we'll do what we can to help.
User avatar
zAchAry
Posts: 804
Joined: 11. May 2010, 09:02
Location: Israel

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

Post 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?
Last edited by zAchAry on 17. Jun 2013, 14:07, edited 5 times in total.
Image
Help to make Slackware easier Donate to Salix
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: qtFM: Problem with opening of items

Post by laprjns »

I installed gtfm using slapt-get and have no problems. The appropriate applications get launched when clicking on files
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
User avatar
zAchAry
Posts: 804
Joined: 11. May 2010, 09:02
Location: Israel

Re: Qt: Problem with opening of items

Post by zAchAry »

Thank you for your reply. I have corrected the initial post.
Image
Help to make Slackware easier Donate to Salix
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: Qt: Problem with opening of items

Post 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.
User avatar
knome
Donor
Posts: 163
Joined: 20. Dec 2012, 19:36
Location: UK

Re: Qt: Problem with opening of items

Post 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.
Image
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: Qt: Problem with opening of items

Post 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.
User avatar
zAchAry
Posts: 804
Joined: 11. May 2010, 09:02
Location: Israel

Re: Qt: Problem with opening of items

Post 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.
Image
Help to make Slackware easier Donate to Salix
User avatar
zAchAry
Posts: 804
Joined: 11. May 2010, 09:02
Location: Israel

Re: XDG: Problem with opening of items

Post 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.
Image
Help to make Slackware easier Donate to Salix
User avatar
knome
Donor
Posts: 163
Joined: 20. Dec 2012, 19:36
Location: UK

Re: XDG: Problem with opening of items

Post by knome »

Are you using the Xfce desktop? What happens if you use exo-open?
Image
User avatar
zAchAry
Posts: 804
Joined: 11. May 2010, 09:02
Location: Israel

Re: XDG: Problem with opening of items under Fluxbox

Post 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.
Image
Help to make Slackware easier Donate to Salix
Post Reply