-1

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.

Jasser
  • 206
  • 2
  • 14

1 Answers1

0

It sounds like what you want is something to prevent window focus. Window focus settings and commands might depend on whether your using Unity, Gnome, etc. I have only ever done something like this with an xfce based Linux.

I don't have an Ubuntu box on hand to try this out, but this might get you on the right path: https://superuser.com/questions/142945/bash-command-to-focus-a-specific-window