This question already has an answer here:
How do I run a program in the background from a shell, with the ability to close the shell while leaving the program running which should not disturb the window i am working on? Lets say my UI is having problems or for some reason, I need to boot up a program from the terminal window.
The program should not disturb my window in which i am working on but it should be opened from the command line and i should be able to get access to it using the normal shortcut ALT+TAB.
Even the command line should exit during this process.
I tried this ....
"gedit file-name & exit"
this is working fine but the gedit file is opening in the foreground i.e it is focused.
(let i be working on some application like mozilla. After running the command ..... gedit file is bieng focused rather than mozilla which should not happen)
It is fine if the answer also comes in a script.