Score:-1

How to start deatached process from terminal

us flag
Inf

I downloaded and installed Unityhub and I have to click on the file to run it. I would like to have a command in terminal to run it. For example I start my VScode simply typing code in terminal. I want to start UnityHub by typing something like unity-hub in terminal.

I created symlink so I can run it by typing unity-hub. But the process is attached to the current terminal. I tried nohup unity-nub & but i get unwanted output like

$ nohup unity-hub &
[1] 21947
$ nohup: ignoring input and appending output to 'nohup.out'

I would like to mimic the "code" behaviour when it starts an application as if I clicked on its file. Without any input in terminal.

Score:0
cn flag
unity-hub &>/dev/null & disown

More info at this related question

Score:0
us flag

To get absolutely no output in the current terminal, you can start the nohupcommand inside another sh like:

sh -c "nohup unity-hub &>/dev/null &"

You may need to specify the full path to unity-hub if it's not local to current folder and sh (or bash) doesn't have it in the PATH.

You can also create your custom .desktop file to simply launch the app from the apps menu.

See Ubuntu documentation UnityLaunchersAndDesktopFiles or this article How to Create a .Desktop File For Your Application in Linux

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.