Results 1 to 8 of 8

Thread: xhost howto?

  1. #1
    Join Date
    Sep 2008
    Location
    Slovenia
    Posts
    335

    Default xhost howto?

    Hi there. Here's the situation. I have a brand new installation of suse 11.2 x86_64 with Gnome. I installed nx client/server/node from NoMachine NX - Download: NX Server for linux Evaluation without problems. But when I try to run the nx client, nothing happens, if I try to run it from konsole I get
    Code:
    nxclient: cannot connect to X server :0.0
    googling around I found out the problem is with "xhost" command. So if I execute
    Code:
    xhost +
    before trying to run the client, the client then starts up ok. However if I reboot pc, I have to repeat the procedure, which is a bit annoying. Therefore I would like to permanently allow connection to my X from specific hosts (but for now just the localhost) and not from all (which is what I did executing "xhost +"). If I do.
    Code:
    xhost+localhost
    xhost+192.168.15.40
    that doesn't help, the nxclient still doesn't start. So my question is, how can I permanently add access to X from my localhost for nxclient? Any suggestion much welcome

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,202
    Blog Entries
    15

    Default Re: xhost howto?

    Quote Originally Posted by arcull
    Hi there. Here's the situation. I have a brand new installation of suse
    11.2 x86_64 with Gnome. I installed nx client/server/node from
    'NoMachine NX - Download: NX Server for linux Evaluation'
    (http://www.nomachine.com/select-pack...?os=linux&id=1) without
    problems. But when I try to run the nx client, nothing happens, if I try
    to run it from konsole I get
    Code:
    --------------------
    nxclient: cannot connect to X server :0.0

    --------------------
    googling around I found out the problem is with "xhost" command. So if
    I execute
    Code:
    --------------------
    xhost +
    --------------------
    before trying to run the client, the client then starts up ok. However
    if I reboot pc, I have to repeat the procedure, which is a bit annoying.
    Therefore I would like to permanently allow connection to my X from
    specific hosts (but for now just the localhost) and not from all (which
    is what I did executing "xhost +"). If I do.
    Code:
    --------------------
    xhost+localhost
    xhost+192.168.15.40
    --------------------
    that doesn't help, the nxclient still doesn't start. So my question is,
    how can I permanently add access to X from my localhost for nxclient?
    Any suggestion much welcome
    Hi
    Your running Desktop effects? Try disabling? I use a script in my
    ~/bin directory to start the client;
    Code:
    #!/bin/bash
    xhost +
    /usr/NX/bin/nxclient --session \
    "/home/<username>/.nx/config/<nx-host>.nxs"
    xhost -
    Change the username and host for your requirements and then save for
    example as nx-host along with chmod 700 nx-host

    --
    Cheers Malcolm (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.42-0.1-default
    up 4 days 3:26, 2 users, load average: 1.43, 0.61, 0.34
    GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18


  3. #3
    Join Date
    Sep 2008
    Location
    Slovenia
    Posts
    335

    Default Re: xhost howto?

    thanks malcolmlewis, will try to disable effects and report back

  4. #4
    Join Date
    Sep 2008
    Location
    Slovenia
    Posts
    335

    Default Re: xhost howto?

    Hi
    Your running Desktop effects? Try disabling? I use a script in my
    ~/bin directory to start the client;
    Code:

    #!/bin/bash
    xhost +
    /usr/NX/bin/nxclient --session \
    "/home/<username>/.nx/config/<nx-host>.nxs"
    xhost -

    Change the username and host for your requirements and then save for
    example as nx-host along with chmod 700 nx-host
    Disabling effects doesn't help, however your script is a good tip, so I did copy it and adjusted a little bit. The "major" change I did is to change the lines
    Code:
    xhost +
    xhost -
    with
    Code:
    xhost +local:
    xhost -local:
    , because from what I read arround, the "xhost +" allows connection from everywhere to my pc, which is not what I want for security reasons, not even for the time the nx client is running. Therefore the "local:" switch enables only non-network local connections to my pc, which I find more secure, please correct me if I'm wrong . Thanks again for the script

  5. #5
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,202
    Blog Entries
    15

    Default Re: xhost howto?

    Quote Originally Posted by arcull

    > Hi
    > Your running Desktop effects? Try disabling? I use a script in my
    > ~/bin directory to start the client;
    > Code:
    >
    > #!/bin/bash
    > xhost +
    > /usr/NX/bin/nxclient --session \
    > "/home/<username>/.nx/config/<nx-host>.nxs"
    > xhost -
    >
    > Change the username and host for your requirements and then save for
    > example as nx-host along with chmod 700 nx-host Disabling effects
    > doesn't help, however your script is a good tip, so I

    did copy it and adjusted a little bit. The "major" change I did is to
    change the lines
    Code:
    --------------------
    xhost +
    xhost -
    --------------------
    with
    Code:
    --------------------
    xhost +local:
    xhost -local:
    --------------------
    , because from what I read arround, the "xhost +" allows connection from
    everywhere to my pc, which is not what I want for security reasons, not
    even for the time the nx client is running. Therefore the "local:"
    switch enables only non-network local connections to my pc, which I find
    more secure, please correct me if I'm wrong . Thanks again for the
    script
    Hi
    It can either be host or username
    --
    Cheers Malcolm (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.42-0.1-default
    up 5 days 4:41, 2 users, load average: 0.11, 0.33, 0.25
    GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18


  6. #6
    Join Date
    Sep 2008
    Location
    Slovenia
    Posts
    335

    Default Re: xhost howto?

    Hi
    It can either be host or username
    I've read about that too, but haven't seen an example of "username" usage, can you write an example please, thanks

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,202
    Blog Entries
    15

    Default Re: xhost howto?

    Quote Originally Posted by arcull

    > Hi
    > It can either be host or username I've read about that too, but
    > haven't seen an example of "username"

    usage, can you write an example please, thanks
    Hi
    Have a look at the manpage You could use for example;
    Code:
    xhost + inet:<username>@
    <username>@ (unix.<UID>@) being added to access control list
    --
    Cheers Malcolm (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.42-0.1-default
    up 6 days 10:17, 3 users, load average: 0.09, 0.16, 0.16
    GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18


  8. #8
    Join Date
    Sep 2008
    Location
    Slovenia
    Posts
    335

    Default Re: xhost howto?

    Hi
    Have a look at the manpage You could use for example;
    Thanks for this, I've read the manual, but obivously didn't get it, how to use it for specific username, thanks again.

Posting Permissions

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