[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: XDMCP chooser in linux.. as solaris



Hello again:

No luck trying to obtain any way to connect to remote xdmcps using
gdmchooser.  For this reason I had created the following shell script.

This script is  called without parameters. Only will run correctly if all X
remote sessions are launched with xinit executions. In a few words, this
code obtain the greatest $DISPLAY value from all remote sessions, add 1 to
this value, executes gdmchooser and if a server is returned, tries to
launch xinit with the necessary values.
If firewall rules in both local or remote machines blocks X protocol, you
will only obtain a gray or black screen with the mouse pointer.

Tehory of operation:

     Suppouse that you have your machine up and running in graphic mode.
Have xhost +<lan or ip range for servers that you wanna connect >,
and firewall rules that permit X protocol. Of course, you have gdmchooser
installed.
     Execute the xrchooser script

     #./xrchooser.sh

     If all goes well, you will obtain the gdmchooser screen. If the Close
button is pressed, the script finishes with 'No server selected from
gdmchooser' message.
     But if a server is selected from gdmchooser, the script executes a
xinit call with this form:

     # first assign a new value to the DISPLAY environment var. This value
is the highest display used by any xinit process currently running,
     # to this value 1 is added to get the next DISPLAY value unused. If no
earlier xinit processes are executing, the :1 value is assigned to DISPLAY
     # by default.
     export DISPLAY=localhost.localdomain:<display_value>

     # And xinit is called in background

     xinit -- -query <gdmchooser_selected_server> :<display_value> &

     Then the display offers the remote server gui login.

     You can work with different Xsessions at the same time. Only need to
know the following equivalence:

      If DISPLAY=:0 ( the default X session in your machine), then the
screen is located at Ctrl+Alt+F7
      If DISPLAY=:1 ( the default X session in your machine), then the
screen is located at Ctrl+Alt+F8
      If DISPLAY=:2 ( the default X session in your machine), then the
screen is located at Ctrl+Alt+F9
           .
      .
      .
      And so...

     When you have finished to work with this X session, then logout from
session to obtain the remote gui logon again. Then you can kill this X
remote session
     with Ctrl+Alt+Backspace. This only kills the actual session, not
others, but if you kill your local sesission, all other will die, of
course.

     TODO:
     When xinit is called, one xterm is created in the local X session. If
you close this term, the X sesion dies. May be is possible to avoid the
xterm execution.


HTH

Regards

(See attached file: rxchoose.sh)




Attachment: rxchoose.sh
Description: Binary data


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]