From owner-freebsd-questions Mon Feb 24 14:48:13 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9852737B41C for ; Mon, 24 Feb 2003 14:48:11 -0800 (PST) Received: from mired.org (ip68-97-54-220.ok.ok.cox.net [68.97.54.220]) by mx1.FreeBSD.org (Postfix) with SMTP id 23E9643FA3 for ; Mon, 24 Feb 2003 14:48:10 -0800 (PST) (envelope-from mwm-dated-1046558888.f33ef8@mired.org) Received: (qmail 7312 invoked from network); 24 Feb 2003 22:48:08 -0000 Received: from localhost.mired.org (HELO guru.mired.org) (127.0.0.1) by localhost.mired.org with SMTP; 24 Feb 2003 22:48:08 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15962.41256.111255.43404@guru.mired.org> Date: Mon, 24 Feb 2003 16:48:08 -0600 To: "Brian Henning" Cc: "freebsd" Subject: Re: DISPLAY variable In-Reply-To: References: X-Mailer: VM 7.07 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ From: Mike Meyer X-Delivery-Agent: TMDA/0.70 (Pensive) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In , Brian Henning typed: > setenv DISPLAY ipaddr:0.0 > what are the display number and screen number used for? The display number denotes which X server at ipaddr you're going to talk to. It's basically added to 6000 to get a port number to connect to. If I start a second X server with "startx -- :1" it will be the second server, listening to 6001, and hence you would use ipaddr:1.x. The screen number denotes which of the monitors that that X server is managing that you want to open on. On my system with two monitors, the second - smaller, as it happens - is at :0.1 on the first server, and :1.1 on the second server. > how do i know what number to use for the display number and screen number? By knowing which X server and monitor you want to use. > for example when i tunnel x11 through ssh for a user i use :10.0 > when i access x11 on the same network i use :0.0 ssh is forwarding the port - 6010 - for server #11 - :10 - to DISPLAY if that environment variable is set. When I ssh from my workstation, I use :10.1 to open things on the second monitor on the workstation. Actually, ssh automatically walks through a list of port numbers until it finds one that isn't used, sets DISPLAY on the server end to the appropriate value, and forwards it to DISPLAY on the client end. If you want, you can forward X11 by hand by forwarding port 6000 + X to port 6000 - assuming you are using :0.0 - and setting your DISPLAY to :X.0 in the shell. I have clients that don't forward ssh for security reasons, and have to do that by hand when I'm on their machines. http://www.mired.org/consulting.html Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message