How to get more than one X-window?

Václav Haisman V.Haisman@sh.cvut.cz
Sun Jul 9 14:43:00 GMT 2006



Stepp, Charles wrote, On 9.7.2006 3:36:
> 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.news@yahoo.com] 
> Sent: Friday, July 07, 2006 4:15 PM
> To: cygwin@cygwin.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?
You need to tell it that it should use different display number. But
don't ask me how, I don't remember. Better read the xwin -help and
experiment.

> 
> 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).

--
wilx


--
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/



More information about the Cygwin mailing list