1 |
On Sat, 2002-10-19 at 09:45, William Kenworthy wrote: |
2 |
> xhost +localhost |
3 |
> su - |
4 |
> export DISPLAY=localhost:0.0 |
5 |
> |
6 |
> Using "su -", requires a display set. Where does one put the xhost and |
7 |
> export in a generic sence? I have a single user machine and often use a |
8 |
> number of x displays - how could I set up to do the above automaticly, |
9 |
> no matter which X dispaly I am on? |
10 |
> |
11 |
> BillK |
12 |
|
13 |
You really don't want that configured as a "default" it is not the most |
14 |
secure idea. |
15 |
|
16 |
A better alternative is to install ssh on the local machine, configure |
17 |
public/private key pairs for your root account, make ssh only listen on |
18 |
localhost (127.0.0.1), enable automatic X11 forwarding and then whenever |
19 |
you want to run an X app as root do: |
20 |
|
21 |
ssh -X root@localhost /path/to/application |
22 |
|
23 |
The overheads in running a ssh server are really not that much when you |
24 |
are doing it on the local machine only. |
25 |
|
26 |
|
27 |
-- |
28 |
Troy Dack |
29 |
http://linux.tkdack.com |