Re: SSH X11 Setting the Display Variable
- From: Daniel Llewellyn <daniel@xxxxxxxxxxxxxxx>
- Date: Fri, 29 May 2009 14:49:18 +0100
On Fri, May 29, 2009 at 05:17, Chris Mirchandani <novashadow@xxxxxxx> wrote:
OK, I found one hole in this script. If I ssh in as any user, the script does what it is supposedto do and the DISPLAY variable value is left as set by ssh. However, if I su -l to another userDISPLAY=192.168.11.1:0.0. If I su to the same user without -l the DISPLAY variable value is leftas set by ssh when the initial user was logged in. Any ideas and/or suggestions?
I wouldn't have said that was a hole "per se", more a "feature" with
the way that `su -l` is designed to work. The point of the -l switch
is that the environment is set from a clean slate when entering the
new user context. This means that any pre-existing DISPLAY variable
will be blanked out along with the rest of the new shell's
environment. Then /etc/profile is run through to set up the initial
environment for said new shell, which will detect the lack of DISPLAY
variable and set up the default (192.168.11.1:0.0).
--
Regards,
Daniel Llewellyn
- References:
- SSH X11 Setting the Display Variable
- From: Chris Mirchandani
- Re: SSH X11 Setting the Display Variable
- From: Daniel Llewellyn
- RE: SSH X11 Setting the Display Variable
- From: Chris Mirchandani
- SSH X11 Setting the Display Variable
- Prev by Date: RE: SSH X11 Setting the Display Variable
- Next by Date: Re: tcp_wrapper support under solaris 10
- Previous by thread: RE: SSH X11 Setting the Display Variable
- Next by thread: tcp_wrapper support under solaris 10
- Index(es):
Relevant Pages
|