Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am very happy with ssh -X when I'm connecting to my machine over internet. But at home, I want to connect with my notebook to my desktop machine without ssh. What's the best way of doing this? (Both machines run Linux, Xubuntu.)

share|improve this question
    
Please clarify your question. Exactly what is it that you want to be able to do? –  Michael Hampton Aug 5 '12 at 19:06
    
Use my local machine as X server with a remote one (on LAN), without SSH. –  ern0 Aug 5 '12 at 19:23
    
Why not use ssh? It's the right tool for the job. –  Gilles Aug 5 '12 at 22:34
1  
SSH is a kinda overhead, especially for tiny machines, like Raspberry Pi. Other reason: simple is beautiful. –  ern0 Aug 6 '12 at 8:48

2 Answers 2

up vote 5 down vote accepted

If you want to run a X command on a remote system and and show the client on your local system the solution is rather simple:

  • You have to ensure that your X Server accepts connection via TCP, nowadays this is typically disabled as it is a security problem. You basically have to run your Xorg server without the -nolisten tcp option. For gdm3 you can add DisallowTCP=false to /etc/gdm3/daemon.conf under the security context. Afterwards you have to restart gdm3. Now ps axuf | grep Xorg should show your X-Server without the -nolisten tcp option.

    Now your XServer should listen on port 6000, you can check with netstat -anp | grep 600.

  • You have to allow access from your remote system to your local Xsession, this can be either done via xhost to generally allow access from a specific system, e.g. xhost +host or via supplying the magic cookie, see DISPLAY and AUTHORITY for more information.

  • Now you just have to specify the DISPLAY variable on your remote host, e.g: export DISPLAY=localsystem:0. Now all x clients will automatically try to use your local system. If you didn't allow TCP access (or have a firewall in between) or you didn't provide the needed authorization (e.g. wrong xhost command, did not copy the xauth cookie) your commands won't be able to connect to your system.

Please be aware that the connection is not encrypted and you basically typing plaintext. If you use xhost you also allowed all clients from that specific host access to your Xserver, e.g. they can read keyboard inputs etc.

share|improve this answer

If you don't want to use ssh, then you can use tools like, Remote Desktop Client, Connect to Server and Desktop Sharing which are by default installed in your Kubuntu desktop editions.

Edit: I would recommend you to use Remmina Remote Desktop Client to connect to any VNC server running somewhere else.

share|improve this answer
    
Does desktop sharing use X? –  ern0 Aug 5 '12 at 19:24
    
@ern0: use the Remmina Remote Desktop Client, that uses X. –  pradeepchhetri Aug 5 '12 at 19:30
    
ssh -x is not really related to connecting to a remote desktop, it is used to execute X applications remotely and show the content on the host –  Ulrich Dangel Aug 5 '12 at 20:20
    
I know what is X, I'm using it since 1980 (but never configured) –  ern0 Aug 6 '12 at 8:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.