Find the answer to your Linux question:
Results 1 to 6 of 6
I am developing software that will run upon boot up and has a gui. Let say a security app. When the system boots up the application will run. I will ...
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    3

    Want user to see root GUI app.

    I am developing software that will run upon boot up and has a gui. Let say a security app.

    When the system boots up the application will run. I will change the startup script of rc.local to start the application.

    But when a user logs in I want them to be able to see the gui of the application. Each system will only have one user. The application does need to have root permission to run.

    How do I do that?

  2. #2
    Linux Guru
    Join Date
    Nov 2004
    Posts
    6,110
    I think a more correct way would be to run the root application as a daemon, then allow a clientside GUI application to interact with it. There are plenty of examples of this in action such as the nm-applet frontend to NetworkManager.

    Because Linux/Unix is truly multi-user each user has their own X session as such; it is not that you can just have an application "on the screen". More generally if something is going to run as root it's best to limit it to what it needs root access for as opposed to firing up a full set of graphics libraries at that same level of privilege.

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Posts
    3
    Quote Originally Posted by bigtomrodney View Post
    I think a more correct way would be to run the root application as a daemon, then allow a clientside GUI application to interact with it. There are plenty of examples of this in action such as the nm-applet frontend to NetworkManager.

    Because Linux/Unix is truly multi-user each user has their own X session as such; it is not that you can just have an application "on the screen". More generally if something is going to run as root it's best to limit it to what it needs root access for as opposed to firing up a full set of graphics libraries at that same level of privilege.
    Yeah, I agree; But the app is already written and we now need to get it running on Linux.

    Is there some way to do it with xhost?

  4. #4
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Quote Originally Posted by weaver4 View Post
    But when a user logs in I want them to be able to see the gui of the application. Each system will only have one user. The application does need to have root permission to run.

    How do I do that?
    Set the setuid flag, make it own by root and have it started automatically when the users logs in.
    Debian GNU/Linux -- You know you want it.

  5. #5
    Just Joined!
    Join Date
    Dec 2009
    Posts
    3
    It needs to run automatically on boot-up.

  6. #6
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Disable the login manager then so that the system boots right trough to the desktop.
    Debian GNU/Linux -- You know you want it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...