Wednesday, August 22, 2012

Preventing termination of an application launched from terminal

     The traditional way of launching applications was to search for the application icon either from the start menu or through the desktop icon or through any other means.

     Since, Ubuntu users do anything and everything through terminal opening a GUI application too will be their concern. When a user launches an application from terminal and close the terminal because they feel so, results in the termination of the application that was just launched.
With a single command the required application can be launched from terminal and the user may close the terminal if they need and the launched application is still at their service.

    • Open terminal available under applications menu in dash-home.
    • For example, let us assume you want to launch vlc from terminal.
    • Type the following command in terminal and press Enter,
        • nohup vlc &

    • The nohup is a POSIX command which prevents the termination of a process/application when the user closes the terminal or issues an exit command. 
    • After the application is launched try closing the terminal or type exit in the terminal, to your surprise you will find that the application remains in the screen whether or not terminal is present.

No comments:

Post a Comment