-1

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.

2 Answers2

0
unity-hub &>/dev/null & disown

More info at this related question

VXDguy
  • 326
  • 2
  • 7
0

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

palto
  • 496