Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
I want to autostart a program in Ubuntu 8.10. That is: I want to start the program when the ordinary user (no special permissions) logs in. The command line equivalents ...
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Posts
    12

    Question rc.local - howto?

    I want to autostart a program in Ubuntu 8.10. That is: I want to start the program when the ordinary user (no special permissions) logs in.

    The command line equivalents are roughly in the format:

    1. cd /home/directoryx
    2. sudo <java command>

    If this were done as a command line there would now be a request for the password.

    I need to avoid this request for the password. Can this maybe be fed into the startup script? Or is there another solution?

    I am new to this rc.local script so any information would be useful.

    Is there any good alternative to the rc.local script?

  2. #2
    Linux Newbie
    Join Date
    Feb 2009
    Location
    Third ring of Pergatory
    Posts
    199
    rc.local runs at boot up after the system goes muti user, before anybody logs in. Are these users using a standardized desktop/windows manager? Fluxbox has a file called "apps" which is a script file specifically for login scripts. I think xfce has the same file in it's root directory. You could hard code the password into the script if you had too.

  3. #3
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    Quote Originally Posted by dijetlo View Post
    You could hard code the password into the script if you had too.
    why not just set sudoers to allow passwordless operation for the specific command you want to run? use visudo to edit sudoers file ...

  4. #4
    Linux Newbie
    Join Date
    Feb 2009
    Location
    Third ring of Pergatory
    Posts
    199
    Your right, it's a java app so it's got to stay in the sand box. I'm just leary of sudoers.

  5. #5
    Just Joined!
    Join Date
    Oct 2008
    Posts
    12
    Quote Originally Posted by dijetlo View Post
    rc.local runs at boot up after the system goes muti user, before anybody logs in. Are these users using a standardized desktop/windows manager? Fluxbox has a file called "apps" which is a script file specifically for login scripts. I think xfce has the same file in it's root directory. You could hard code the password into the script if you had too.
    This is just a standard gnome desktop with some icon and app adds and subtracts.

    The main point is that the java app carries a selective locking/ networking setup.

    It may well be that the whole will be operated entirely by plain non-technical users who would die of fright at a command line!

  6. #6
    Linux Newbie
    Join Date
    Feb 2009
    Location
    Third ring of Pergatory
    Posts
    199
    [QUOTE=joel00;674831]This is just a standard gnome desktop with some icon and app adds and subtracts.[/quote[
    Gnome has session manager-that's a likely place to put the script for the targeted users.

    Quote Originally Posted by joel00 View Post
    It may well be that the whole will be operated entirely by plain non-technical users who would die of fright at a command line!
    Sudo will get you past that hurdle.

  7. #7
    Just Joined!
    Join Date
    Oct 2008
    Posts
    12

    Sudo in .rc script

    [QUOTE=dijetlo;674846]
    Quote Originally Posted by joel00 View Post
    This is just a standard gnome desktop with some icon and app adds and subtracts.[/quote[
    Gnome has session manager-that's a likely place to put the script for the targeted users.


    Sudo will get you past that hurdle.
    But precisely how do I input the password into the scripted sudo from a user who does not know the password?

  8. #8
    Linux Newbie
    Join Date
    Feb 2009
    Location
    Third ring of Pergatory
    Posts
    199
    Read theman page on "visudo" and "sudo", what your actually doing is making the command passwordless for these users.

  9. #9
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    Suggest you read this, take a look here (example entry at post #6) and review the man pages.

  10. #10
    Just Joined!
    Join Date
    Oct 2008
    Posts
    12

    autostart with a sudo command

    Quote Originally Posted by Jonathan183 View Post
    why not just set sudoers to allow passwordless operation for the specific command you want to run? use visudo to edit sudoers file ...
    Can you give me a specific example of this? Bearing in mind I do not want to give either the password to the user or give a general sudo permission to that user.

Page 1 of 2 1 2 LastLast

Posting Permissions

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