Tuesday, May 7, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 10768  / 2 Years ago, fri, august 26, 2022, 2:03:27

I can start a command in a new Gnome Terminal as follows:



nohup gnome-terminal --window-with-profile=Background --command ls >/dev/null 2>&1&


(Based on https://askubuntu.com/a/46630/7146 and https://stackoverflow.com/a/10708326/236081)



However, I want the new terminal window to start minimised in the Launcher. How can I do that?


More From » command-line

 Answers
3

I based my solution on some of the answers given for minimising and maximising windows. In this case, though, I wanted to target just this Gnome Terminal (but not other Gnome Terminals), so I gave it a name using --title:



nohup gnome-terminal --title="Tiny Terminal" --window-with-profile=Background --command "$argv" >/dev/null 2>&1&


And created a Devil's Pie rule for windows named "Tiny Terminal":



(if
(is (window_name) "Tiny Terminal")
(begin (minimize) )
)


(If you prefer, you can use gdevilspie to create this rule in a GUI.)



This achieves the original desired affect. However, when I tried it out, I realised that I also wanted the terminal to restore to a maximised state, which is addressed in a separate answer.


[#24424] Saturday, August 27, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cugure

Total Points: 188
Total Questions: 110
Total Answers: 103

Location: Dominican Republic
Member since Sun, Sep 4, 2022
2 Years ago
;