LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 02-14-2006, 04:58 AM   #1
bertheylen
LQ Newbie
 
Registered: Feb 2006
Posts: 11

Rep: Reputation: 0
Running script from KDE start menu


Hello,

I would like to run a simple shell script by clicking on an item in the KDE start menu.

For example:
i make the script "test" which has the line echo "hello world".

Using the graphical interface i add an item to the start menu and assign the proper command (ie /home/root/test).

If i click the item, the script executes, but the problem is that the shell exits immediately.

I tried different things, for example using "/home/root/test $". I also tried getting the users input, but the scripts then exists after the user types someting...

Can anyone help me out?
Many thanks in advance!
 
Old 02-14-2006, 05:37 AM   #2
cigarstub
Member
 
Registered: Sep 2005
Posts: 145

Rep: Reputation: 15
Many people posting prob here try to hide wat really they want to do bc of Interllect propert, u need to be open. I guess u want to start some app auto on startup of Lin then just edit /etc/inittab adding it there.
 
Old 02-14-2006, 05:45 AM   #3
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Sounds like you need a terminal to open and the print hello world in it and then remain open?

For command line do something like

aterm -e /home/root/test

and then put the command 'read' in your test script ie

echo "Hello World"
read

This will keep terminal open till you press enter. Substitute aterm for whichever terminal you use.

note -e switch causes terminal to open and execute follwing command. I don't know if it's the same switch for all terms but it works for aterm, xterm and rxvt

Also you must have correct permissions to execute anything in /home/root/ so chown username it, or are you running kde as root (not a good idea)

Last edited by dive; 02-14-2006 at 05:54 AM.
 
Old 02-14-2006, 06:03 AM   #4
bertheylen
LQ Newbie
 
Registered: Feb 2006
Posts: 11

Original Poster
Rep: Reputation: 0
The complete story is that i am working on a remastered knoppix. There will be some security tools implemented (most of them commandline based).

I want the user to be able to start these tools from the start menu.

For example i want to start NMAP from the KDE start menu:

- the user clicks on the item
- terminal opens, showing a brief text "this is nmap, blablabla, most common parameters are blablabla"
- terminal remains open so the user can use nmap

Thats it basically .

Using 'read' in the scripts indeed causes the terminal to remain open, but if anything is typed by the user, and enter is hit, the terminal closes again...

Hope this gives you more information
 
  


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
KDE start menu breaked on a self-compiled KDE kleag Mandriva 3 09-01-2005 08:17 AM
running start up script Kendo1979 Linux - General 2 11-08-2004 12:48 PM
Add KDE menu in Gnome start menu melinda_sayang Slackware 2 03-06-2004 05:26 AM
KDE start menu brianvdc Linux - Newbie 4 09-16-2003 07:58 PM
kde start menu help! tonicnote Linux - General 0 07-03-2003 03:41 PM

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

All times are GMT -5. The time now is 11:25 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