Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was wondering does anyone know a way to make some kind of shortcut under Ubuntu that when I click on it, it will open up multiple SSH sessions (or execute other actions) in a tabbed gnome-terminal?

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

Use the following format: gnome-terminal --tab -e "cat /dev/urandom" --tab -e "top"

share|improve this answer
    
Good answer Christoffer I figured it out just shortly before seeing your post. Any idea how to make this a shortcut on the desktop? –  Mark Davidson Aug 13 '10 at 11:55
1  
Right-click -> Create Launcher: Type: Application, Command: gnome-terminal --tab -e "first_command" --tab -e "second_command" –  Christoffer Madsen Aug 13 '10 at 12:01
    
Yea that's a good way of doing it I had forgotten about using a Launcher. –  Mark Davidson Aug 13 '10 at 13:36
add comment

I think I have just about worked this out now.

gnome-terminal --tab -t htop -e htop --tab -t top -e top --maximize

Will open up a new tabbed gnome terminal with htop running in the first window and top in the second for this example.

To create the shortcut I just made a simple bash program to run the command.

#!/bin/bash
gnome-terminal --tab -t htop -e htop --tab -t top -e top --maximize

Marking it as executable. Then it works by double clicking it. The only annoying thing about this is that it asks

Do you want to run "Terminal Session", or display its contents?

Is there someway to disable this?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.