[SOLVED] xdg-open $PWD opens directory in firefox, so does every qt app
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So how the heck does xdg-open start firefox? And how can I change that? Can I make it obey ~/.local/share/applications/mimeapps.list? Setting $KDE_FULL_SESSION seems to do the trick, but is that a clean solution in the absence of KDE? I don't want anyone else to get confused by assuming that KDE is running.
Of course, one only needs to open the bash script and read the source to find out that "firefox" is hard-coded into xdg-open to be the first browser to try. As a design decision, this is just wrong on too many levels... Just the fact that it is a total mockery of the query mechanism is too much already.
While struggling with understanding of the weird xdg-open concepts I stumbled upon this post.
I actually started to think if there is any mandatory need of having the xdg-utils installed on my machine?
Will removing it cause some dependency problems? I noticed it is part of most major distributions these days.
But is it really a necessity?
While struggling with understanding of the weird xdg-open concepts I stumbled upon this post.
I actually started to think if there is any mandatory need of having the xdg-utils installed on my machine?
Will removing it cause some dependency problems? I noticed it is part of most major distributions these days.
But is it really a necessity?
thanks
H.
Do what I do. I have five backups of all data that I want to keep. Never attempt this without good backups of data. Then, do a fresh install, while specifying not to install certain packages. If a package you left out is needed by something you normally use, you will know fairly quickly. Of course, if it's only needed by something you don't use you won't detect that unless you stumble onto it later on. That is why I never ask a question about a particular piece of software unless I've a full Slackware install to use as a base. This even includes building a SlackBuilds package. I've found that when playing around it is rather easy to forget what I've done, so after playtime I do a fresh, full install. Maybe not the best manner to learn, but it works well for me.
It might work for you, but for me a fresh install would mean a lot of reconfiguration and retweaking that would have to be done in order to bring the system to full usable state.
That's why I prefer to ask before I get rid of something that is a part of some application or have some dependencies.
As you correctly spotted you may not notice anything for the first couple of days/weeks and than you forget about it. Later on, after something crashes you wouldn't know what is the reason. And the reason might be the package you removed and forgot about...
Thank you very much, T3slider. The problem indeed was in xdg-open failing to detect mate as gnome variant. Mate indeed uses gvfs-open. So I did a little, but dirty modification to xdg-open script:
Code:
# Checks for known desktop environments
# set variable DE to the desktop environments name, lowercase
detectDE()
{
if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
elif [ x"$DESKTOP_SESSION" != x"MATE" ]; then DE=gnome;
elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
else DE=""
fi
}
Basically, just modified $GNOME_DESKTOP_SESSION_ID to $DESKTOP_SESSION and replaced GNOME with MATE, so it detects Mate as gnome, there for uses gvfs-open. So far everything seems to work fine. Thanks again!
Thanks Bro !
I was just wandering for a solution and this works perfectly.
There was a huge chunk of code in DetectDE in my distro,I replaced it with your lines and It worked!
Thanks a lot.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.