sudo-for-cygwin icon indicating copy to clipboard operation
sudo-for-cygwin copied to clipboard

Automatically starting sudoserver

Open warnes opened this issue 11 years ago • 0 comments

Hi,

I've been looking into autostarting sudoserver when I log in, without having a terminal window displayed. I have come upon a solution that seems to work. Let me know if you have anything simpler!

  1. Create a Scheduled Event to launch sudoserver:
    1. Launch Task Scheduler from the Windows Start menu
    2. In the 'Actions' menu at the right, click 'Create Task': create task
    3. Fill in the 'General' tab as below: general Make sure that 'Run with highest priveleges' is selected!
    4. On the 'Actions' tab, click 'New' and fill in the dialog box as below: edit action and click "Ok".
    5. The resulting action should look like this actions
    6. Fill in the Triggers tab: triggers
    7. Fill in the Conditions tab: conditions
    8. Fill in the Settings tab: settings
    9. Click on 'Ok' to save the new event: savechanges
    10. On the 'Action' panel click on 'Run' to execute the event run
  2. Now open a Cygwin window and test it out by typing:
$ sudo touch /etc/hosts

If you get an error message, something is wrong. Otherwise, success!

Debugging tips: Replace 'run.exe' with 'mintty.exe' to open a window showing the output of sudoserver.py.

warnes avatar May 16 '14 14:05 warnes