LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   start xterm and run command? (http://www.linuxquestions.org/questions/linux-software-2/start-xterm-and-run-command-520968/)

P-P 01-19-2007 03:40 PM

start xterm and run command?
 
is it possible to launch a xterm and automaticly get it to run a command, like
cd /home/user/Dekstop

thanks

colucix 01-19-2007 03:52 PM

Add the command to your ~/.bashrc file (or whatever, depending on your default shell).

petersum 01-19-2007 06:30 PM

I am using Slax where xterm is called Konsole.
I made this shell script to start wvdial...

#!/bin/sh
konsole --noclose -e wvdial ptcl

I gave it an icon and put it on the desktop.
I expect you could do something similar!
The command follows the -e and additional arguments if needed come last.

taylor_venable 01-19-2007 06:35 PM

Or if you want xterm to run the program and then quit, use the -e switch. Everything after -e is run after the xterm is created. Once the program is done, the xterm will close. Obviously, this isn't very useful for "cd" but may be desirable to run mutt/pine/vim or the like directly from a launcher.


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