![]() |
Running root commands with load-applet?
Before I upgraded to OS2008, I was able to run commands that required root level permissions, from load-applet's Run Command menu item. Unfortunately, I forgot to write down how I did it. :(
I thought it was using sudo, but that doesn't seem to have worked. Does anyone know how to do this? (I'll remember to write down the answer this time) Update: Since I was running a script file (.sh) I was able to use the following code to get it done. This is a workaround, as I was able to do it from a single line before. Code:
#!/bin/sh |
Re: Running root commands with load-applet?
add the command you whant tto run from load applet in /etc/sudoers
and run it from load-applet uusing sudo. EG: in sudoers add the $CMD (fullpath) and run it as 'sudo $CMD' |
Re: Running root commands with load-applet?
Maybe a silly question..
Did you install 'becomeroot' in your new 2008os? (It is needed to run you script). |
Re: Running root commands with load-applet?
Quote:
Code:
su chroot /mnt/initfs dsmetest -l 3 |
Re: Running root commands with load-applet?
is there a load applet for 2008 that lets you run commands? The one I saw in the 2008 repository doesn't.
|
Re: Running root commands with load-applet?
No, my mistake. It's actually osso-statusbar-cpu version 0.6.1chinook1. Sorry about the confusion.
|
Re: Running root commands with load-applet?
really dumb question, please: how do I get osso-statusbar-cpu to run cmdline (i.e. non-UI) commands? I tried "osso-xterm -e blah", but no good...
|
Re: Running root commands with load-applet?
Click on its icon and select "Run command...", or if it's something you want to do repeatedly, click on "Settings...", then the "Commands" button, and enter it as a new command.
|
Re: Running root commands with load-applet?
"echo touch /x | sudo gainroot" where "touch /x" is the program (run as su but with user environment)? This might need to be in a script for some launchers.
|
All times are GMT. The time now is 01:57. |
vBulletin® Version 3.8.8