LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 12-17-2010, 06:45 PM   #1
uetian
LQ Newbie
 
Registered: Apr 2009
Location: Germany
Distribution: Fedora (2011), DreamLinux(2010), SUSE(2009))
Posts: 3

Rep: Reputation: 0
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.
 
Old 12-17-2010, 09:24 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.

Last edited by theNbomr; 12-17-2010 at 09:26 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
is there a way to tell if a C program is running without a terminal? MrUmunhum Linux - General 4 05-11-2010 01:21 PM
running a program start script in terminal fenriswoolf Linux - Software 1 04-01-2008 09:25 AM
Running program from terminal with & does nothing, program stops DittoAlex Linux - General 1 10-05-2007 01:35 AM
Running a Program in a new Virtual Terminal Johnsernickle Linux - Software 2 07-09-2004 11:50 AM
Running program when terminal closed? mikeshn Linux - General 9 11-23-2002 08:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration