• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: DISPLAY setting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DISPLAY setting


  • Subject: Re: DISPLAY setting
  • From: Rich Cook <email@hidden>
  • Date: Wed, 31 Oct 2007 17:42:56 -0700

Handy and fancy!  Thanks.

On Oct 31, 2007, at 5:16 PM, Greg Parker wrote:

On Oct 31, 2007, at 4:01 PM, Rich Cook wrote:
Why do you need to set DISPLAY at all? I did not know ssh looked at your DISPLAY, I thought it always tunneled port 6000.

ssh looks at the DISPLAY present where you type `ssh -X/Y example.com`. It needs to know where on the local machine to send the data that it picks up from the remote machine. If DISPLAY is not set then it doesn't forward anything.


Example:

foo% echo $DISPLAY
foo:0.0
foo% ssh -X bar
(ssh sets up forwarding from bar:10.0 to foo:0.0, i.e. bar port 6010 to foo port 6000, and sets DISPLAY on bar)
bar% echo $DISPLAY
bar:10.0
bar% xterm
(data flow: xterm -> bar port 6010 -> bar's sshd -> foo's ssh -> foo port 6000 -> foo's X server -> foo's screen)



On Oct 31, 2007, at 3:52 PM, Greg Parker wrote:

On Oct 31, 2007, at 3:06 PM, Bobby Jones wrote:
The scenario I was thinking about is ssh from Tiger to Tiger once you remove DISPLAY to accomodate Leopard. I had DISPLAY exported in /etc/bashrc for all my Tiger installs. . . but Leopard obviously doesn't play well with that.

So now I remove that to accommodate Leopard's X. . . but now when I ssh Tiger to Tiger. . .obviously there is no DISPLAY being passed. So I guess now I have to manually set DISPLAY every time I ssh from Tiger to Tiger if I've removed DISPLAY to accommodate Leopard's new X11?

The best way to handle this is to set DISPLAY if not already set, in some appropriate shell startup file. The file to use and syntax depend on which shell you're using; presumably adding an appropriate `if` statement where you're already handling it in Tiger will work.


The results:

Tiger: DISPLAY is not set, script sets it
Leopard: launchd set DISPLAY, script leaves it alone
SSH -Y out: ssh sees DISPLAY set at one end, ssh starts X forwarding and sets DISPLAY at the other end
SSH -Y in: ssh set DISPLAY, script leaves it alone



-- Greg Parker email@hidden Runtime Wrangler


_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription: http://lists.apple.com/ mailman/options/x11-users/email@hidden


This email sent to email@hidden

--
✐Richard Cook
✇ Lawrence Livermore National Laboratory
Bldg-453 Rm-4037, Mail Stop L-557
7000 East Avenue, Livermore, CA, 94550, USA
☎ (office) (925) 423-9605
☎ (fax) (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)
Help/Unsubscribe/Update your Subscription: http://lists.apple.com/ mailman/options/x11-users/email@hidden


This email sent to email@hidden


--
✐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
☎ (office) (925) 423-9605
☎ (fax) (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


References: 
 >DISPLAY setting (From: Andrew Gallatin <email@hidden>)
 >Re: DISPLAY setting (From: Ben Byer <email@hidden>)
 >Re: DISPLAY setting (From: Bobby Jones <email@hidden>)
 >Re: DISPLAY setting (From: Rich Cook <email@hidden>)
 >Re: DISPLAY setting (From: Bobby Jones <email@hidden>)
 >Re: DISPLAY setting (From: Greg Parker <email@hidden>)
 >Re: DISPLAY setting (From: Rich Cook <email@hidden>)
 >Re: DISPLAY setting (From: Greg Parker <email@hidden>)

  • Prev by Date: X.org contributions vs Apple contributions [was Re: Tiger X11 on Leopard]
  • Next by Date: Re: DISPLAY setting
  • Previous by thread: Re: DISPLAY setting
  • Next by thread: Re: DISPLAY setting
  • Index(es):
    • Date
    • Thread