2

I have several profile for terminal. I can open all profiles on boot but they open in different windows with this cmd in startup applications:

gnome-terminal --window-with-profile=ablack && gnome-terminal --window-with-profile=agreeen && gnome-terminal --window-with-profile=aubergine && gnome-terminal --window-with-profile=beige && gnome-terminal --window-with-profile=cyan && gnome-terminal --window-with-profile=grey && gnome-terminal --window-with-profile=orange && gnome-terminal --window-with-profile=white && gnome-terminal --window-with-profile=yellow && gnome-terminal --window-with-profile=ablack    

I tried to open one window with several tabs with this cmd without success:

gnome-terminal --window-with-profile=ablack && gnome-terminal --tab-with-profile=agreeen && gnome-terminal --tab-with-profile=aubergine && gnome-terminal --tab-with-profile=beige && gnome-terminal --tab-with-profile=cyan && gnome-terminal --tab-with-profile=grey && gnome-terminal --tab-with-profile=orange && gnome-terminal --tab-with-profile=white && gnome-terminal --tab-with-profile=yellow && gnome-terminal --tab-with-profile=ablack   

How to make it work?

4

To open a gnome-terminal window with few tabs we should use the option --tab. See gnome-terminal --help-all. Also in man gnome-terminal we can find this explanation:

--window-with-profile=PROFILENAME
     Open a new window containing a tab with the given profile. 
     More than one of these options can be provided.
--tab-with-profile=PROFILENAME
     Open a tab in the window with the given profile. 
     More than one of these options can be provided, to open several tabs.

So, to open gnome-terminal window with few tabs, we should use command as this one:

gnome-terminal --tab-with-profile=ProfileA --tab-with-profile=ProfileB --tab-with-profile=ProfileC

Compose your own command and test it into a terminal. If it works satisfactorily add it as an entry in Startup Applications:

enter image description here

There are few possible approaches how to open few gnome-terminal windows with few tabs in each. I would suggest to use a command as follow:

gnome-terminal --tab-with-profile=ProfileA --tab-with-profile=ProfileB && gnome-terminal --tab-with-profile=ProfileC --tab-with-profile=ProfileD

Another idea is to create separate Startup Applications entry for each gnome-terminal window.

  • @mamesaye, what happened, when you tried it? – pa4080 Sep 5 '17 at 15:49
  • nothing happen on reboot. So I tried gnome-terminal --window-with-profile=ablack --tab-with-profile=agreen && gnome-terminal --tab-with-profile=aubergine && gnome-terminal --tab-with-profile=beige && gnome-terminal --tab-with-profile=cyan && gnome-terminal --tab-with-profile=grey && gnome-terminal --tab-with-profile=orange && gnome-terminal --tab-with-profile=white && gnome-terminal --tab-with-profile=yellow and it worked on reboot. – mamesaye Sep 5 '17 at 16:25
  • @mamesaye I will update the answer in few minutes. – pa4080 Sep 5 '17 at 16:26
  • 1
    It should be one single gnome-terminal command with multiple --tab-with-profile (or --tab and --profile) options. – egmont Sep 5 '17 at 16:53
  • 1
    Each gnome-terminal command, even when --tab is used, opens a new window because it has no way of knowing which existing window you want the new tab to appear in. Only if you have multiple --tab options then they open tabs in the same new window. – egmont Sep 5 '17 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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