• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

running python as a different user

I'm trying to run an app in python under a different user

for example.

I want to load up gdesklets on start up. I've got the bash script written up to do it....but unfortunately, it automatically runs as root.

is there any way to make python run as a different user even if executed as root?

ie, root#python /usr/share/gdesklets/gdesklets start (is what i have so far)

but I'd like run gdesklets as someone else (ie, user) but executed as root?

does this make sense?
 
This is untested but it may work:

1) Make a shortcut to the program.
2) Right click-> Properties -> Advanced
3) Check "Run with Different Credentials"

After that nothing happens on my PC since I only have one account. But it sounds like it might do what you want.

EDIT: Nvm sounds like you aren't on windows.
 
Forget sudo. It's a great program, but this is what su was made for. It's either su -c user command, or more likely su user -c command. I don't feel like testing it out or checking my script archives to figure out which one it is. 😛

Ok, I tested it out: su user -c command
 
Back
Top