LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > DamnSmallLinux
User Name
Password
DamnSmallLinux This forum is for the discussion of DamnSmallLinux.

Notices


Reply
  Search this Thread
Old 08-14-2004, 06:34 AM   #1
Nice-n-Slow
LQ Newbie
 
Registered: May 2004
Posts: 24

Rep: Reputation: 15
Opening xterms from a script


I did a hard drive install of DSL and I'm loving it. However, I have one somewhat glaring problem.
That is, I have a script residing on another machine that opens xterm in a manner like this

#!/bin/bash
xterm -e "command and options" &
xterm -e "command and options" &
xterm -e "command and options" &

This was not a problem using Knoppix either from the CD or as a hard drive install. It pops open an xterm window and then backgrounds it and opens another and so on. So, I'm wondering why DSL can't pull it off. With DSL, the xterms pop up and then disappear. Does it have something to do with DSL's windows management? Can I upgrade it through synaptic or a DSL package?
 
Old 08-14-2004, 07:18 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
My guess is that the commands aren't being found - when you start xterm like that it will exit when the program does.

For example - this will print "Hello" and then exit immediately so you will barely see it:
xterm -e "echo Hello" &

However you can add a 5 second pause with:
xterm -e "echo Hello;sleep 5" &

If you are getting a "Command not found" type error then you will best see it with:
xterm -e "eco Hello;sleep 5" &

In short - try adding ";sleep 5" after your command to see if you get more info
 
Old 08-15-2004, 04:25 AM   #3
Nice-n-Slow
LQ Newbie
 
Registered: May 2004
Posts: 24

Original Poster
Rep: Reputation: 15
Nice tips.
I did something similar by just running the commands line by line in an Xterm shell with different variations.
With the man pages and some Googling, I came up with this solution.
Instead of using Xterm, I used RXVT and then for whatever reason I had to drop the quotes. I guess it's just a usage issue besteen Xterm and RXVT.
So I switched it to something like this without quotes:

#!/bin/bash
rxvt -e command and args &
rxvt -e command and args &
rxvt -e command and args &

Thanks for the tip though. That was a good idea.
 
  


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
save position & desktop of multiple xterms in Fluxbox esteeven Linux - General 7 05-12-2005 02:50 PM
opening new bash tabs or consoles from a script Nice-n-Slow Programming 7 07-12-2004 09:25 AM
Opening file with default application from shell script? bourbon_beast Programming 4 04-13-2004 01:52 AM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 12:20 AM
creating xterms/consoles set in the background? tommyj27 Linux - Software 8 01-14-2004 11:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > DamnSmallLinux

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