.desktop files ignoring local bin
Hello, having a problem with .desktop entries not being able to see executables in my local bin folder.
FYI: I'm on Debian "Testing" 64-bit, Xfce 4.10. It's happening with various programs, but just for testing purposes, I compiled a simple form with Lazarus, called it "testthis" and put it in ~/.local/bin. I have $HOME/.local/bin in my $PATH. If I type the name of the program in a terminal, it runs. If I double-click the executable from the file manager, it runs. BUT, if I have it called via a .desktop file from the main menu, it doesn't run. If I type in a terminal "exo-open ~/.local/share/applications/test.desktop" it runs. If I put the .desktop entry on my Desktop, I double-click it and it pops up a message box titled "Launch error" with this error message: Quote:
Code:
Exec=testthis If I put the full path in: Code:
Exec=/home/hpp3/.local/bin/testthis Also, if I run a script from the .desktop file that runs a program in my local bin just by name, it doesn't work either. The Freedesktop spec says that the $PATH is searched: http://standards.freedesktop.org/des...exec-variables Quote:
P.S. I have tried changing the execute permissions on the desktop file; doesn't do anything |
why are you using $HOME/.local/bin instead of $HOME/bin?
i don't even have a folder of that name, neither is it in my $PATH. |
I've also encountered the "desktop file needs full path to program" situation. My solution is to just include the full path in the desktop file.
ondoho: I've got a $HOME/bin folder that I created where I keep various personal executables. And, like you, I never created (nor even thought of creating a $HOME/.local/bin folder. However, looking at my $PATH, I see that Fedora Rawhide has both $HOME/.local/bin and $HOME/bin. |
I created $HOME/.local/bin because there was already a $HOME/.local and I found advice to put user-created .desktop files in $HOME/.local/share/applications and I thought "How clever, a root file structure inside my home dir... neat!!", so I started installing compiled stuff that I wanted to keep all to myself in $HOME/.local instead of /usr or /opt. Some things complain and require some tweaks, but it's mostly worked out pretty well.
|
So, I found the problem.
Apparently, my Xfce was searching down a different $PATH than what was being set by all the usual suspects. As a Litmus test, I removed the "/usr/local/games:/usr/games" section from PATH everywhere I could find it. But every time I rebooted or did the logout/login dance, it was still there. Something was re-setting my path, but I couldn't find it. What was doing this, and why? Hours of head-scratching and a thousand internet searches later, and I had my answer: http://ljwo.wordpress.com/2014/02/02...n-wheezy-xfce/ Quote:
So, I followed the advice at that post and created a .xinitrc with my chose $PATH set and rebooted. No dice. A few more internet searches later and I had the right answer: http://unix.stackexchange.com/a/81254 So, apparently ~/.xinitrc is only parsed when using Xinit or startx, like when you don't use a login or session manager to run your desktop environment. I have always used a login manager, so the solution was to do the same in ~/.xsession. Bingo. My $PATH is set as I like it, and all my locally installed apps fire up just fine. |
All times are GMT -5. The time now is 12:14 PM. |