[opensuse] 11.0 ssh -X, sudo yast2 call ncurses, su root yast calls qt -- why?
Devs, When managing remote systems via ssh, if yast2 is called by "sudo yast2" the ncurses interface is used. This happens even if you specify --qt "sudo yast2 --qt module". The opposite occurs when you su to root on the remote host and then call yast2. You get the normal gui interface then. Why the difference? (this came up when i set an alias of 'sudo /sbin/yast2 sw_single' and the ncurses interface appeared. It seem that if you are forwarding X, then you should get the gui interface regardless of whether yast is called by sudo or you su root before calling it) -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Monday 28 September 2009 01:12:41 am David C. Rankin wrote:
Why the difference?
different $PATH and / or other environmet variables? in my setup, $PATH is not the same after "su". -- phani. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sunday 27 September 2009 21:42:41 David C. Rankin wrote:
Devs,
When managing remote systems via ssh, if yast2 is called by "sudo yast2" the ncurses interface is used. This happens even if you specify --qt "sudo yast2 --qt module".
The opposite occurs when you su to root on the remote host and then call yast2. You get the normal gui interface then.
Why the difference?
sudo doesn't pass along the X authentication data. su uses pam_xauth to do that, but sudo can't use that because of the way it does session management (i.e. it doesn't do session management at all). If you want to use graphical applications after sudo, you're going to have to use the traditional tricks with xhost, or possibly copy the session key to root's xauth database, or some such. Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Anders Johansson skrev:
On Sunday 27 September 2009 21:42:41 David C. Rankin wrote:
Devs,
When managing remote systems via ssh, if yast2 is called by "sudo yast2" the ncurses interface is used. This happens even if you specify --qt "sudo yast2 --qt module".
The opposite occurs when you su to root on the remote host and then call yast2. You get the normal gui interface then.
Why the difference?
sudo doesn't pass along the X authentication data. su uses pam_xauth to do that, but sudo can't use that because of the way it does session management (i.e. it doesn't do session management at all).
If you want to use graphical applications after sudo, you're going to have to use the traditional tricks with xhost, or possibly copy the session key to root's xauth database, or some such.
Anders
I believe you need to attach to the remote box using ssh with the X option, aka ssh -XC user@ip-of-remote-box On the remote box, do a 'su' to become root. Then, once connected as root to the remote box, issue yast2. This should give you the graphical YaST on your local screen, albeit slow... -- ------------------------------ Med venlig hilsen/Best regards Verner Kjærsgaard Open Source Academy +45 56964223 Novell Certified Linux Professional 10035701 Linux Counter no 114954 ------------------------------ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sunday 27 September 2009 04:48:41 pm Verner Kjærsgaard wrote:
Anders Johansson skrev:
On Sunday 27 September 2009 21:42:41 David C. Rankin wrote:
Devs,
When managing remote systems via ssh, if yast2 is called by "sudo yast2" the ncurses interface is used. This happens even if you specify --qt "sudo yast2 --qt module".
The opposite occurs when you su to root on the remote host and then call yast2. You get the normal gui interface then.
Why the difference?
sudo doesn't pass along the X authentication data. su uses pam_xauth to do that, but sudo can't use that because of the way it does session management (i.e. it doesn't do session management at all).
If you want to use graphical applications after sudo, you're going to have to use the traditional tricks with xhost, or possibly copy the session key to root's xauth database, or some such.
Anders
I believe you need to attach to the remote box using ssh with the X option, aka
ssh -XC user@ip-of-remote-box
On the remote box, do a 'su' to become root.
Then, once connected as root to the remote box, issue yast2. This should give you the graphical YaST on your local screen, albeit slow...
Thanks Anders, Verner and phanisvara, Solution --> stick with su ;-) -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
When managing remote systems via ssh, if yast2 is called by "sudo yast2" the ncurses interface is used.
The opposite occurs when you su to root on the remote host and then call yast2. You get the normal gui interface then.
sudo doesn't pass along the X authentication data. su uses pam_xauth to do that, but sudo can't use that because of the way it does session management (i.e. it doesn't do session management at all).
-- snip --
Solution --> stick with su ;-)
not really a solution, more a workaround. Sudo can be configured to ask for the invoking user's password, or, indeed, to not ask for a password at all. Su, on the other hand, always requires the destination user's password, so is only suitable as a "solution" when sudo is configured to have the same behaviour. Here is a snippet that could be used as the beginning of a hack that would extract your X auth data which you'd feed to the X auth after doing your sudo. You'd want to set the DISPLAY variable after doing your sudo too, probably. xauth nextract - `xauth list | grep \`hostname\`/unix\`echo $DISPLAY | sed -re 's/.*:(.*)\..*/:\1/'\` | awk '{print $1}'` -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sunday 27 September 2009 08:15:18 pm Philip Dowie wrote:
Here is a snippet that could be used as the beginning of a hack that would extract your X auth data which you'd feed to the X auth after doing your sudo. You'd want to set the DISPLAY variable after doing your sudo too, probably.
xauth nextract - `xauth list | grep \`hostname\`/unix\`echo $DISPLAY | sed -re 's/.*:(.*)\..*/:\1/'\` | awk '{print $1}'`
Thanks Philip, That will get me started! -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
David C. Rankin wrote:
Devs,
When managing remote systems via ssh, if yast2 is called by "sudo yast2" the ncurses interface is used. This happens even if you specify --qt "sudo yast2 --qt module".
The opposite occurs when you su to root on the remote host and then call yast2. You get the normal gui interface then.
Why the difference?
I just tried mine -- works fine. You did edit your sudoer's file to allow sudo to pass the correct environment variables ...hmmm...actually looks like I disabled the env filtering altogether. Guess it got to be too much of a hassle. Works for me as I don't have other users on my system. I think it was working fine -- I don't believe the default includes things like 'DISPLAY' or 'REMOTEHOST', which I needed for redirection to work, so I had to add those to the 'env_keep' tag in the sudoer's file.... good luck, linda -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (6)
-
Anders Johansson
-
David C. Rankin
-
Linda Walsh
-
phanisvara das
-
Philip Dowie
-
Verner Kjærsgaard