

- #UBUNTU OPEN TERMINAL HERE SHORTCUT WINDOW UPDATE#
- #UBUNTU OPEN TERMINAL HERE SHORTCUT WINDOW WINDOWS#
'xdotool key Control_L+Shift_L+T', # Open new terminal tab 'title SSH\ Activity', # Window title (escape spaces) 'xdotool type "./ssh-activity"', # Suspend after 15 minutes 'xdotool type "cd ~"', # Change to home directory # 'move 2100 1000', # triple monitor setup 'sleep '+str(BASHRC_TIME), # Bash command wait a sec 5 # Secpmds fpr window to appearĬommands = [ 'gnome-terminal &', # Launch terminal in background # dellstart - Autostart GUI applications on Dell Fileserverįrom _future_ import print_function # Must be first importīASHRC_TIME = 2 # Seconds to load ~/.bashrc The python program: #!/usr/bin/env python

Opens gedit and last five opened files in separate tabs.
#UBUNTU OPEN TERMINAL HERE SHORTCUT WINDOW WINDOWS#

-title="tab 1" = title this tab "tab 1".-tab = open up a unique tab for what comes next.gnome-terminal = open up a gnome-terminal.Here's a breakdown of that command above: This is exactly the type of thing my desktop shortcut does so I can open up a bunch of programming windows at once: gnome-terminal -tab -title="tab 1" -command="bash -c 'cd /etc ls $SHELL'" -tab -title="tab 2" -command="bash -c 'cd ~ ls $SHELL'" -tab -title="tab 3" -command="bash -c 'cd ~/temp3 ls $SHELL'" Here's a more complicated example which opens up 3 separate tabs in the same gnome-terminal. The $SHELL part at the end forces the shell to stay open so you can then see its output and continue using it (I learned this somewhere else on Stack Overflow): gnome-terminal -tab -title="test" -command="bash -c 'cd /etc ls $SHELL'" Here's a contrived example, which opens up a single tab, titles it "test", then runs the simple command cd /etc ls inside it. I use this type of approach so I can double-click a single icon on my desktop and have it open up a bunch of terminals (with various tabs named according to what work I'm going to do in them) and programs to set up my programming environment, for instance, for daily work. Or, you can just add a symlink to this script to your desktop. usage: this is really useful to add to your startup programs so this script will run, open a terminal, create and name a tab in the terminal, and run a command for you.
#UBUNTU OPEN TERMINAL HERE SHORTCUT WINDOW UPDATE#
UPDATE : this answer is now perhaps obsolete.Ĭonsider clicking this link and using this other answer of mine instead: Open Terminal with multiple tabs and execute applicationĪided by answer, and my own comment under his answer, and inspired by upvote of my comment, here's my preferred way to do it, especially when I want the terminal to stay open so I can then manually use it.Įx.
