[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to run an X program as a different user?



> Essentially I want user A to run a specific X app as user B. So I
> think I need to write a tiny shell script like this:
> 
> #!/bin/sh
> xhost +B
> sudo -u B /path/to/app arg1 arg2 arg3
> xhost -B

Alternatively,

sux B /path/to/app arg1 arg2 arg3
Needs user B's password.
Requires package sux.

If you have sshd set up with X forwarding enabled, you could also do
ssh -X B@localhost /path/to/app arg1 arg2 arg3
but this one feels like overkill.

-- 
Cheers,
Clive
(end of message)


Reply to: