delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/07/08/21:36:32

X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Subject: RE: How to get more than one X-window?
Date: Sat, 8 Jul 2006 18:36:13 -0700
Message-ID: <BD6B3BD6A3C3EC4FBC45FF024CE10437029D8333@WAPRDVSEBE10.gsm1900.org>
In-Reply-To: <e8mfb7$d5c$1@sea.gmane.org>
From: "Stepp, Charles" <Charles DOT Stepp AT T-Mobile DOT com>
To: <cygwin AT cygwin DOT com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k691aSPH020254

I have the following in my .sh_profile. This ensures that my DISPLAY
gets set correctly in each shell:

# ----------------------------------------------------------------------
# Added - Tue May 30 12:26:30 EDT 2006
# ----------------------------------------------------------------------
DISPLAY=$("$HOME"/SetDisplay)
export DISPLAY
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

And the SetDisplay script:

$ cat SetDisplay 
#!/usr/bin/ksh

IP=$(nslookup $(hostname) | sed -n '/Name:/,$s/Address:[ ]*//p')
//g')print $IP | sed 's/
DISPLAY=${IP}:0
print $DISPLAY
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Here's a script I use to create a new xterm. It calls stuff that sets
rotating colors out of a list of colors I use, but that stuff can be
ripped out and this can be simplified.
#!/usr/bin/ksh
export DISPLAY=127.0.0.1:0.0
cd "$HOME"
trap "exit;exit" 1
if [[ ! -f "$HOME/Colors.txt" ]]
then
        cp /usr/local/bin/Colors.txt "$HOME"
fi
if [[ ! -f "$HOME/geometries.rot" ]]
then
        cp /usr/local/bin/geometries.rot "$HOME"
fi


COLORS=$(./rotate.pl ./Colors.txt | awk '{print $1 " " $2}' | sed 's/
/~/')
G=$(./rotate.pl ./geometries.rot)

FG=${COLORS%%~*}
BG=${COLORS##*~}
export DISPLAY
print -- "-fg $FG -bg $BG"
xterm -fg $FG -bg $BG -geometry "$G" -ls -sb -sl 2000 -cr red -fn
8x13bold &

-----Original Message-----
From: Vanguard [mailto:vanguard DOT news AT yahoo DOT com] 
Sent: Friday, July 07, 2006 4:15 PM
To: cygwin AT cygwin DOT com
Subject: How to get more than one X-window?

I did the install of Cygwin a couple days ago but have been fumbling
around trying to get more than one X-windows session opened on the
screen.  I will open Cygwin (which loads a bash shell) and then run
"xwin -query <hostname>" to get a login session on that host (on the
particular host to which I am currently connecting, I get logged in
under KDE).  I then want another X-window opened to another host.  I
work on several hosts at a time.  If it were just the one host, I can
open xterms inside the one X-windows session shown on my Windows host.

When, in a bash shell, I try to run another "xwin -query
<otherhostname>", a bunch of text pops up which basically tells me that
the X server is already running.  Well, yeah, it got started by the
first xwin command.  Doesn't the Cygwin X-server handle more than one X
session at a time?

I'm actually used to using Reflection X or Exceed X to connect to Unix
hosts from my Windows box but I don't have those available at some
locations and they said to use Cygwin (because it was free).





--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019