Location of a program running in terminal, launched from panel.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Location of a program running in terminal, launched from panel.
Hi all,
I am using DreamLinux.
I have pinned a program, that runs in terminal, to the launcher in the panel on desktop.
The program's executable file (name: feap) is located in
/home/User/feap2.2
After I added the launcher to the panel that runs the file in terminal, the program asks for the input file (text file with alot of commands) when run.
By default the program accepts the files that are located in the same directory i.e. /feap2.2 , so I placed the input file in the same directory.
However when I run the program from the panel, and give the input file name, it says no such file exists. Then I gave the file name with full path, but problem was not solved. I have tried alot e.g. placed the input file at other locations, but all in vain. I have set all input file permissions to be accessible by User as well.
I will be much relieved if someone suggests where to place the input file for the such program running in the terminal launched from panels?
P.S: If I open terminal, go to the directory (/home/User/feap2.2), run the program's exe file, and then give the file name, it accepts the input file and it give results.
There is probably some cleaner way to do what you're trying wit just your GUI, but since I'm not familiar with that, I will suggest wrapping the whole business in a shell script that changes to the proper directory, sets any necessary environment variables, etc. and then launches your program with appropriate arguments. Should be easy to write, easy to test, etc.
--- rod.
EDIT: Upon re-reading your post, I wish to get clarification. Does the program require you to interactively enter some filename? If so, and unless there is a commandline option to specify the file name, then your script will probably require the expect tool.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.