LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-04-2004, 08:33 AM   #1
mannoulla
LQ Newbie
 
Registered: Jun 2004
Posts: 11

Rep: Reputation: 0
Question desktop shortcut for a terminal prompt


to open an application which i have just written in java, i have to write a very long prompt in a terminal (java -jar ~/manal/system.java -channels 1 -prompts prompts.txt) - i'm using fedora 2

Is there a way I can add a shortcut icon on the desktop that would open this same application (without me having to open a terminal and typing the prompt each time i want to open this application)?


thanks!


manal
 
Old 06-04-2004, 09:51 AM   #2
Ironica
Member
 
Registered: Jan 2003
Distribution: LFS
Posts: 64

Rep: Reputation: 15
In which window manager?

It's easy to do in KDE, just right click -> new -> link to application, and type the command. It's probably similar for many others too.
 
Old 06-04-2004, 08:55 PM   #3
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
You could put an alias in .bashrc (if you're using bash):
alias prompts='java -jar ~/manal/system.java -channels 1 -prompts prompts.txt'
and then just type "prompts" in a terminal.
 
Old 06-07-2004, 08:21 AM   #4
mannoulla
LQ Newbie
 
Registered: Jun 2004
Posts: 11

Original Poster
Rep: Reputation: 0
what about I need 2 commands?
the way the data structure of the application i'm using:
i need to open two terminals:

in one, I type
% cd address
% ./rec.csh

and in the other, I type

%cd address
% ./audio.csh

for the application window to open and start working.
Is there any way i can create a shortcut for this particular application?
 
Old 06-07-2004, 09:26 AM   #5
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
I'm not sure about the shell you're using, but in Bash you can separate commands within a single line by using semicolons.

Another option is creating a function or a script.
 
Old 06-07-2004, 09:34 AM   #6
mannoulla
LQ Newbie
 
Registered: Jun 2004
Posts: 11

Original Poster
Rep: Reputation: 0
where can i learn more about that (writing scripts or functions)?
what directory should i save them too...

thanks!

M.
 
Old 06-07-2004, 09:38 AM   #7
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
As I said, I don't know any shell other than Bash....writing functions and scripts are dependent upon your shell.

Bash scripting: http://tldp.org/LDP/abs/html/

The directory in which you save script can be anywhere, but it's most convenient to use a directory in your path. Personally I have a ~/scripts directory which I've added to my path.
Functions are typically added to a shell startup script such as .bashrc, where they can be accessed from anywhere. You could think of a function as an extended alias.

Last edited by mikshaw; 06-07-2004 at 09:42 AM.
 
Old 06-07-2004, 12:16 PM   #8
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
http://www.linuxquestions.org/questi...hreadid=160984

read down that thread. it will tell you what steps to take to do what you are looking for.

i had the same question and thankfuly this site has a very powerful working serch tool so i can just serch for my user name and find this thread when ever i need to repeat these steps.
 
Old 06-07-2004, 12:47 PM   #9
mannoulla
LQ Newbie
 
Registered: Jun 2004
Posts: 11

Original Poster
Rep: Reputation: 0
I tried to do something similiar, but it's not working.

the problem is, semi-columns between commands (cd address; ./rec.csh) doesn't work

please help!

M.
 
Old 06-07-2004, 01:05 PM   #10
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
hmm sorry... you might want to try asking a simular question in the programming forum. or have a mod move it there.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Problem running console app in X with no terminal (as a desktop shortcut) kornerr Linux - General 1 02-04-2005 12:08 AM
key shortcut to start terminal? chunlee Linux - Newbie 14 10-23-2004 03:22 PM
Amsn Shortcut in Terminal? Syst3m_Snip3r Linux - Software 8 06-20-2004 06:39 AM
desktop shortcut for a terminal prompt mannoulla Fedora 1 06-04-2004 09:21 AM
Terminal: Connection Shortcut mikeshn Linux - Software 0 10-04-2003 10:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:37 PM.

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