gnome terminal open new tab with script from GUI

To open multiple tabs in new window use following script:

gnome-terminal \
--tab -e "tail -f file" \
--tab -e "ssh user@hostname" \
--tab -e "vim file"

This command will open new terminal window with 3 tabs and in first tab command “tail -f file” will executed, in second tab “ssh user@hostname” will executed and in third tab “vim file” will executed.

Add above command in a script lets call it as tmp.sh

Now enable execute permission for script tmp.sh to execute from GUI using tutorial I posted on one of my previous post Run shell/bash script from GUI.

After enabling execute permissions from GUI just double click on the scrip and select run option, this should open new terminal window with tabs. In each tab a specified command will executed.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s