Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-28-2007, 03:22 AM   #1
LQ Newbie
Registered: Feb 2006
Posts: 26

Rep: Reputation: 15
creating useful launchers

Hey all,

I'm trying to figure out how to make scripts or launchers do my bidding.
basically I'd like to have an icon i can click on to run commands or more specifically lists of commands. most of these would require sudo privileges. One of the things I'd like to do is have a button "turn on" another X server which would use ssh and the -X switch to login to an X server on another computer on my LAN.

currently what I have to do to accomplish this is:

switch to tty2 and:
X :1
now this renders this tty stuck running 2nd x server

switch to tty1 and:
xterm -display :1
this opens up a terminal in the x server for me to execute the next command

ssh -X myuser@
and then:
This sets up a fully functional remote gnome session on my 2nd xserver, which is pretty nice. There are probably better ways to do this, but this is what I figured out, any improvements would be appreciated.

now for the purpose of this post, I'd like to know how to automate this into a single click of a script or launcher of sorts. Is this possible? how would I configure my local gnome session to prompt me for passwords the way everything else does (with the pretty little password dialog).

Thanks for reading, and hopefully posting...
Old 04-29-2007, 12:11 PM   #2
Senior Member
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
Well, you can make a simple sh script. Basically, all you do is list the commands you want to execute in a file since you say you're using Gnome, I'll assume you have gksduo or gksu, the programs that do the password asking. To figure out which you have, open a terminal, type them in, and see which doesn't complain about not existing.

Then, with the passwords, your script should look kinda like this:
gksu firstCommand && secondCommand && thirdComand
gksudo firstCommand && secondCommand && thirdComand
Then, you can just add a normal launcher to the gnome toolbar, and where it asks for the executable location, pass it your script


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
Menus, Panels, and Launchers? Bojamin Linux - Newbie 11 09-06-2005 04:43 PM
'Command' field in Gnome launchers Comreak Linux - Software 7 06-05-2005 02:25 AM
Gnome's vanishing launchers oberonix Linux - Newbie 3 08-31-2004 09:07 AM
where did my mandrake buttons/launchers go? bigPipes Linux - Newbie 2 03-12-2004 11:15 PM
How to get Gnome Launchers working? terosaur Linux - Software 1 11-11-2003 04:03 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:39 PM.

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