SUMMARY: Allowing "su" to write to own X display

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

 



On Tue, 5 Apr 2005, Lucio Chiappetti wrote:

> What is the correct way of having "su" being able to access its own X
> console without issuing any xhost or other command manually ?

General consensus (thanks to William Kwan, Jim Westbrook, Dan Kolb, Eric
Heydrick, Jeffrey L. Taylor, Brian Miller) is to use command "sux", or
better "sux -".

Thanks, I did not know of its existence.

One further reply by "Binand" was :

1. Isn't there a "Console in root mode" option somewhere in the menu?
   There is one in Fedora/RHEL.
2. You might want to try ssh -X -l root localhost

I was not considering such options because they somehow involved
additional processes (also I was not concerned only about using su to
become root, but also to become some other user). In particular I noticed
that using "konsole" starts a number of "unnecessary" KDE processes
("unnecessary" since I'm using the lighter fvwm).

In this respect sux itself is not exempt from overhead as it is a wrapper
bash script (and I'm using tcsh :-) )

Last piece of info by Jeffrey L. Taylor : 'as of SuSE 9.3, "su -" will
behave the same' as sux -


My little bit is instead the following procedure :

  - "user" logged at console
  - issues "su -" or "su - otheruser"
  - then does setenv XAUTHORITY ~user/.Xauthority

This works without the need to issue an "xhost local:" command BEFORE the
"su". It won't require extra processes ... but somehow to automatize it
some su login file should detect the user they come from ... this is not
in $USER or $LOGNAME ... one can use "whoami" vs "who am i"


Still I do not understand how I can get rid of .Xauthority altogether
(setting authorize=false in the kdm configuration is not enough) or why if
I have X0.hosts containing "local:" a further xhost local: is necessary.

----------------------------------------------------------------------------
Lucio Chiappetti - INAF/IASF - via Bassini 15 - I-20133 Milano (Italy)
For more info : http://www.mi.iasf.cnr.it/~lucio/personal.html
----------------------------------------------------------------------------
_______________________________________________
LinuxManagers mailing list - http://www.linuxmanagers.org
submissions: LinuxManagers@xxxxxxxxxxxxxxxxx
subscribe/unsubscribe: http://www.linuxmanagers.org/mailman/listinfo/linuxmanagers

[Index of Archives]     [Kernel]     [Linux SCSI]     [Video 4 Linux]     [Linux Admin]     [Yosemite News]

  Powered by Linux