Re: setenv ?
Re: setenv ?
- Subject: Re: setenv ?
- From: "Mark J. Reed" <email@hidden>
- Date: Wed, 1 Nov 2006 16:33:48 -0500
On 11/1/06, Rich Cook <email@hidden> wrote:
> I had to put:
>
> export DISPLAY=":0.0"
>
> in my .bash_profile since I got a Mac back when we were still on
> Panther. Otherwise X applications wouldn't connect when run from
> Terminal.app.
True. If you are starting X apps from a non-X app, then you have to
set DISPLAY yourself. But you shouldn't be setting it manually in a
remote SSH session when you're tunneling X back; sshd should be
setting it for you.
A safer thing might be:
export DISPLAY=${DISPLAY:-":0.0"}
Quotes are better around the expansion than inside it. The ones
inside don't hurt and do break up the visually confusing sequence "
:-: ", but if you have a space in the existing DISPLAY value (hey, it
could happen!) the command will break without the outer quotes.
I have this in my .profile:
case "$-" in *i*) # only do this in interactive shells
# ...
echo "DISPLAY is set to ${DISPLAY:=:0.0}"
# ...
;;
esac
--
The primary task of most software projects is to discover and resolve
these unknowns rather than to build a system. -- Philip G. Armour
--
Richard Cook
✇ Lawrence Livermore National Laboratory
Bldg-453 Rm-4037, Mail Stop L-557
7000 East Avenue, Livermore, CA, 94550, USA
☎ (925) 423-9605
(925) 423-6961
---
Information Management & Graphics Grp., Services & Development Div.,
Integrated Computing & Communications Dept.
(opinions expressed herein are mine and not those of LLNL)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden