Results 1 to 3 of 3

Thread: X11 Issue

  1. #1
    Join Date
    Aug 2008
    Beans
    7

    X11 Issue

    I am running Ubunto 12.10 on a desktop, and am trying to connect to an AIX server to use X. When I ssh to the server, I do 'ssh -Y <hostname>'. As my user id(id matches between ubuntu client desktop and AIX server), I can do xclock. But in order to do what I need to do, I need to su to a different user id on the AIX server. Whenever I do that, and run xclock, I always get:

    X11 connection rejected because of wrong authentication.
    X connection to localhost:10.0 broken (explicit kill or server shutdown).


    Version info of client:
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 12.10
    Release: 12.10
    Codename: quantal

  2. #2
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: X11 Issue

    Hi

    Quote Originally Posted by cbo0485 View Post
    I am running Ubunto 12.10 on a desktop, and am trying to connect to an AIX server to use X. When I ssh to the server, I do 'ssh -Y <hostname>'. As my user id(id matches between ubuntu client desktop and AIX server), I can do xclock. But in order to do what I need to do, I need to su to a different user id on the AIX server. Whenever I do that, and run xclock, I always get:

    X11 connection rejected because of wrong authentication.
    X connection to localhost:10.0 broken (explicit kill or server shutdown).


    Version info of client:
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 12.10
    Release: 12.10
    Codename: quantal
    This is due to X11 cookies. When you login your coockies match but when you su <user> the cookies don't match and the X server kills the connection to you.

    You need to ensure that the user you are su'ing to has the same cookie you are using.

    Try this

    when you connect and before you su to the new user

    From the terminal type

    Code:
    xauth list $DISPLAY
    This will list your current secret cookie that your X client and the X server share to authenticate.

    Here is mine (slightly edited)

    Code:
    matthew-S206:/home/matthew % xauth list $DISPLAY
    matthew-S206/unix:0  MIT-MAGIC-COOKIE-1  52829xxxxxxxxxx51fab2e2abddfb26d
    matthew-S206:/home/matthew %
    You then need to ensure that the user you are su'ing to will use the same cookie as you.

    xauth should do this for you

    Code:
    xauth add <cookie details>
    On my system it wouold be

    Code:
    xauth add matthew-S206/unix:0  MIT-MAGIC-COOKIE-1  52829xxxxxxxxxx51fab2e2abddfb26d
    Which is basically "xauth add" and a copy and paste of the cookie details returned from xauth list $DISPLAY.

    Then try su'ing to the new user.

    Post back on efficacy as this is an AIX box.

    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  3. #3
    Join Date
    Aug 2008
    Beans
    7

    Re: X11 Issue

    Worked. Thanks for the help. Never would have found that

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •