Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to write a simple shell script to open a new session.
Below is the normal step I use.
I use KDE3.1. When I click shell botton at the task bar, the black shell screen show up. I can create a new session by clicking a new shell botton at the bottom-left of the window or click session> New shell. The problem is, I want to run the program I wrote in different session. Every time I want to test my program, I have to click new session and enter command( which is quite long) in each of the session manaully.
Please, can anyone give me a sample script to run at one shell and open new sessions and run the program one at a session automatically. This will be a great help. Thank for every comment.
I'm not sure if I'm following you here but I think what your asking is totally dependent on what terminal you are using. For instance: I use aterm and if I want to start another shell that runs the script /usr/bin/test_script I would do:
aterm -e /usr/bin/test_script
and another shell would spawn running the test_script application. Check out the man pages for the terminal emulator that you are using to see what the appropriate flag is.
Thanks. I use xterm and the window is poping up but I can't control my parent windows anymore. When I run #xterm, another windows popup. I can't go back to execute any command to my old windows (eg. I type ls and nothing happen. It will exe after I exit the new windows). There should be an option to do this. Can anyone help??
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.