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. ![]() 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.
0 Comments
Leave a Reply. |