LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Cannot run application via Alt+F2 (https://www.linuxquestions.org/questions/linux-desktop-74/cannot-run-application-via-alt-f2-715236/)

themeone 03-29-2009 04:10 AM

Cannot run application via Alt+F2
 
The background to this question is that I compiled Audacity from source, and installed it to my home directory.

I like to start applications via Alt+F2 but I am unable to do this for Audacity. I can only start it by typing "audacity" on the command line.

I believe my PATH is set correctly. Part output from "env" is

PATH=/usr/local/bin:/usr/bin:/bin:/usr/games:/home/username/install/audacity/bin:/home/username

The Audacity executable resides in /home/username/install/audacity/bin

I changed the PATH by adding the following to ~/.bashrc

PATH=$PATH:"$HOME/install/audacity/bin:$HOME"

export PATH

My research suggests that the problem may stem from Alt+F2 not using a login shell, so therefore is not reading ~/.bashrc. Is this correct?

I am running Debian 5 with xfce 4.6 and gdm.

tredegar 03-30-2009 12:23 PM

Quote:

My research suggests that the problem may stem from Alt+F2 not using a login shell,
so therefore is not reading ~/.bashrc. Is this correct
I don't know, but it sounds a perfectly reasonable explanation.
You could check this out by trying a simple command like this:

Code:

env > /home/yourusername/ALTF2-env
Execute it from your Alt+F2 thing.

Then see what the file /home/yourusername/ALTF2-env looks like
and compare it to the output of env in a normal terminal window (or whatever it is that you can start audacity from).

Please note that as a general security measure, I do not like to have anything under /home/ to be in my PATH

If you had done the make install step as root, audacity would probably now be in /usr/bin/ and you probably wouldn't have this problem. But it's in the nature of linux to encounter problems, and then maybe learn something by solving them.

Typing commands can become tedious. Why don't you just create an icon to launch audacity with a click?

themeone 04-01-2009 06:54 AM

Thanks for that.

The output from env > ~/ALTF2.env, executed from Alt+F2 was different from the output of env from inside the terminal. However, I still haven't figured out where Alt+F2 is reading its environment variables from.

The good news though is I have fixed my problem.

Not only was Audacity installed in a directory not searched by the current PATH, but library files for wxWidgets (which Audacity needs in order to run) were also not installed in a directory where the default environment variables were looking. I had compiled wxWidgets manually and installed in a directory in my home area.

I changed the PATH in /etc/profile.

I then added the LD_LIBRARY_PATH variable to both ~/.bashrc and /etc/environment (this last file did not exist by default).

If LD_LIBRARY_PATH is only in ~/.bashrc, then I can only run Audacity from within a terminal. When it's in /etc/environment as well, I can run via Alt+F2. However, after setting all this up the output from env > ~/ALTF2.env never includes LD_LIBRARY_PATH, which I would have expected to see.

I think the main thing I've learned from this is never install anything in my home directory.


All times are GMT -5. The time now is 01:18 AM.