LinuxQuestions.org
Help answer threads with 0 replies.
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 01-19-2007, 04:40 PM   #1
P-P
LQ Newbie
 
Registered: Jan 2007
Location: UK
Distribution: openSuSE 10.2
Posts: 7

Rep: Reputation: 0
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
 
Old 01-19-2007, 04:52 PM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Add the command to your ~/.bashrc file (or whatever, depending on your default shell).
 
Old 01-19-2007, 07:30 PM   #3
petersum
Member
 
Registered: May 2006
Location: Karachi, Pakistan
Posts: 140

Rep: Reputation: 15
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.
 
Old 01-19-2007, 07:35 PM   #4
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 41
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.
 
  


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
Run Shell COmmand on start-up evilmonkey Linux - Software 3 05-21-2006 06:24 PM
How to run a command automatically on start up TKD Suse/Novell 6 11-03-2005 05:41 AM
New to XFCE4 how do I run a command at its start. Royle Debian 1 02-19-2005 01:11 PM
how is black xterm background in IceWM when issue a xterm command? BRAHmS Linux - Software 1 02-14-2005 04:51 AM
start terminal & run command automatically peeples Linux - General 2 09-08-2003 03:57 PM


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