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 am running redhat 8. When I run this command: "gnome-terminal -e ls" the ls command is executed in the new window but then terminates the window. The same is true when I tried xterm.
In the terminal profile if I select "execute command and restart" the ls command is executed several times and the new window then seemed to be hung.
Yes gnome-terminal works but xterm still will not stay on after running the comand. I remembered I got a response from somewhere that this is a bug in gnome. Maybe it works in kde?
I was struggeling with this too. Needed the term to stay open after ssh'ing into another machine. Could not get the term to accept interactive commands so in stead made use of .bashrc to execute custom commands:
if [ "$customcmd" ]; then
$customcmd
fi
export customcmd="echo test" before calling gnome-terminal and then use unset to return to status quo.
Open a default terminal. Right click in it. Mouse over "Profiles" and then "Profile Preferences". Click that. The second tab at the top -- "Title and Command", click that. At the bottom click the box that has the dialog "When command exits" on the left of it and choose "Hold the terminal open". Then close.
I've set up a bash script as suggested in the previous post but I have several servers that I want to group together. Any idea how to open multiple tabs instead of several new terminal windows?
Code:
#!/bin/bash
gnome-terminal -x sh -c "ssh server1"
gnome-terminal -x sh -c "ssh server2"
gnome-terminal -x sh -c "ssh server3"
Last edited by 13thfloor; 03-08-2012 at 01:30 PM.
Reason: provide more info
I've set up a bash script as suggested in the previous post but I have several servers that I want to group together. Any idea how to open multiple tabs instead of several new terminal windows?
Code:
#!/bin/bash
gnome-terminal -x sh -c "ssh server1"
gnome-terminal -x sh -c "ssh server2"
gnome-terminal -x sh -c "ssh server3"
Well, you can right click in the gnome-terminal window and click "Open Tab" a couple times and ssh into each server in each tab. Change between tabs with "alt-1", "alt-2" and "alt-3" if you have three tabs open. This does not work with KDE unless you go through hoops to change the key bindings but it works in Gnome.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.