problem starting gui app as different user from gnome launcher
Hi,
This is my first post ever. I hope I am in the right forum. If not, my sincere apologies. I'm trying to start a gui application (pgadmin3) from a gnome launcher. Because the app needs to modify files that belong to user postgres, I would like to run it as user postgres. So far I've had no luck with any incantations I placed in the command field of the launcher. Code:
su -c 'pgadmin3' postgres b) user postgres does not have a set password (it is not a user that would normally login). Code:
sudo -u postgres pgadmin3 bypass the need for a password; but then I ran into the problem that X won't allow user postgres to start a gui app. In any case, I've read that sudo is not safe to use with gui apps. Code:
gksu -u postgres pgadmin3 Code:
gksudo -u postgres pgadmin3 Code:
gksudo pgadmin3 created by pgadmin3 were owned by root which causes permission problems for all the other applications that need these files. A script like so: Code:
#!/bin/bash possibly unauthorized, user can run X. Finally I went off the deep end and wrote this: Code:
#!/bin/bash and "su"s. Does anybody know whether there is an accepted way to do this? Any help would be greatly appreciated. Edward |
You forgot one important thing: info about the distro & desktop you're running.
My first suggestion is to install 'sux', it's a wrapper around su that makes it possible to run GUI-apps as other user. (This is not necessary in all distros, in some just 'su' works fine.) I have never used it just to launch a single app so I can't promise it'll work, easy to try though! |
Thank you for your reply. I am using gnome 2.30.2 on debian squeeze. I will try sux and report on what I find.
Edward |
Solved
Thanks so much -
Code:
gksudo sux - postgres pgadmin3 |
Maybe I should be more complete in my report. On gnome 2.30.2 on debian squeeze:
Code:
sux - postgres pgadmin3 Code:
gsudo sux - postgres pgadmin3 Code:
gksu sux - postgres pgadmin3 |
All times are GMT -5. The time now is 09:38 AM. |