How to connect to X server when GDM (or KDM) is running ? - Xwindows

This is a discussion on How to connect to X server when GDM (or KDM) is running ? - Xwindows ; Hi, Is there any way to connect to X server when GDM (or KDM) greeters are running waiting for user to login. I've tried following from another TTY -- begin dump -- abbe@chatteau-d-lf ~$ DISPLAY=:0 xterm -- end dump -- ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: How to connect to X server when GDM (or KDM) is running ?

  1. How to connect to X server when GDM (or KDM) is running ?

    Hi,

    Is there any way to connect to X server when GDM (or KDM) greeters are
    running waiting for user to login. I've tried following from another
    TTY

    -- begin dump --
    abbe@chatteau-d-lf ~$ DISPLAY=:0 xterm
    -- end dump --

    But it failed with error, "Connection refused" and "No authentication
    data found". So, what do I pass to X server to authenticate myself. And
    which routine should I use for authentication as XOpenDisplay() expects
    only single parameter, i.e. display name.

    Thanks
    Ashish Shukla
    --
    http://wahjava.googlepages.com/


  2. Re: How to connect to X server when GDM (or KDM) is running ?

    On 08/02/2006 03:01 AM, आशीष शुक्ला wrote:
    > Hi,
    >
    > Is there any way to connect to X server when GDM (or KDM) greeters are
    > running waiting for user to login. I've tried following from another
    > TTY
    >
    > -- begin dump --
    > abbe@chatteau-d-lf ~$ DISPLAY=:0 xterm
    > -- end dump --
    > [...]


    AFAIK, it's not possible. A user must log into X before the
    display can be used by other processes than GDM.



  3. Re: How to connect to X server when GDM (or KDM) is running ?

    > Is there any way to connect to X server when GDM (or KDM) greeters are
    > running waiting for user to login. I've tried following from another


    Yes, at least for xdm, but you must do it as user root. You must find
    the name of the file that holds the XDM athorization key, then use it
    to connect to the desired display. For example

    # ps ax | fgrep -- -auth
    [...] X [...] -auth /var/X11/xdm/authdir/authfiles/A:0-hLfP0g (Xorg)

    Now we know the file name, so use it to connect to display is ":0.0":

    # setenv XAUTHORITY /var/X11/xdm/authdir/authfiles/A:0-hLfP0g
    # setenv DISPLAY :0.0
    (for csh)

    # XAUTHORITY=/var/X11/xdm/authdir/authfiles/A:0-hLfP0g
    # DISPLAY=:0.0
    # export XAUTHORITY DISPLAY
    (for sh/ksh/bash)

    # xdpyinfo
    (will show display information)

    Be warned, however, that xdm uses to grab the keyboard so your
    interactive applications may not work (see the xdm manual page).

    Sorry for the late answer. I'm not reading X news very often.

    --- Casantos


+ Reply to Thread