Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Launch GUI programs as root' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Launch GUI programs as root
Authored by: englabenny on Apr 05, '03 07:37:27AM

Well this is basic, but I thank you all for it - the tip to change appearance of the root worked fine and is great, but I have another Q:
Is is possible to open an App as a different user than the current or root? For example if I want to just quickly change another users prefs or manage his iTunes Library?

I know "su benny" then "open -a iTunes" does not work, but is there not a workaround?



[ Reply to This | # ]
Launch GUI programs as root
Authored by: Usr bin Login on May 05, '03 07:53:12PM
Is is possible to open an App as a different user than the current or root? For example if I want to just quickly change another users prefs or manage his iTunes Library?

I know "su benny" then "open -a iTunes" does not work, but is there not a workaround?


Try:
su - user

That should ensure that not only are you running as that user, but with that user's environment variables as well.

from man su:
-l Simulate a full login. The environment is discarded except for HOME, SHELL, PATH, TERM, and USER. HOME and SHELL are modified as above. USER is set to the target login. PATH is set to ``/bin:/usr/bin''. TERM is imported from your current environ- ment. The invoked shell is the target login's, and su will change directory to the target login's home directory. This option is identical to just passing "-", as in "su -".

Usr bin Login

---
--------


QA implies some sort of quality to begin with.

[ Reply to This | # ]