LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-07-2004, 08:57 AM   #1
nebula_nirvana
LQ Newbie
 
Registered: Jun 2004
Distribution: RedHat 9
Posts: 1

Rep: Reputation: 0
running a terminal command from a link


is it possible to have an icon that when clicked on, opens a terminal and does the following? :

- su
- password: ********
- scanimage >newimage.pnm
- exit

Please help! Thanks!
 
Old 06-07-2004, 10:08 AM   #2
villie
Member
 
Registered: Apr 2004
Location: Pakistan
Distribution: RedHat
Posts: 46

Rep: Reputation: 15
Make a shell file using text editor ( name it anything like scanimage.sh)
1. Put your commands in it.
2. Save the file .
3. Change the permission of files to make it executable
a. Either use shell for it . Type the command
chmod 700 scanimage.sh (you need to be root to do so.)
b. Or right click on the file in konqueror and from the permissions tab select the appropriate settings.

4. Now in konqueror make a new link to application.
You can do it by right clicking in the window and selsecting Create New and then 'New Link to application'
or by going there from 'Edit' toolbar. Now name the command and in execute tab give the path for your shell script ( lets say scanimage.sh ) ( or you can put scanimagesh in your bin directory , which should be in your path and jus tgive the name of the script ) . Also check the 'Run in Terminal' option .

Now when you will click on the icon . I will open a terminal execute your script and will then disappear imediately.

Hope it works. Good Luck
Villie
 
  


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
How to launch an app in terminal, & keep it running after I close terminal? kornerr Linux - General 7 06-24-2006 06:54 PM
Running from terminal? gibran Linux - Software 7 07-09-2005 01:15 PM
Link to terminal? carlosinfl Fedora 2 05-29-2004 01:57 AM
Link to terminal command Teckno Linux - Newbie 2 05-24-2004 02:19 PM
Link Terminal? Omega Linux - Hardware 2 10-28-2002 08:00 PM


All times are GMT -5. The time now is 09:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration