Saturday, February 7, 2009

Remote access to KDE from a Windows desktop

I would greatly appreciate your visit if you take the time to leave a comment or rate this post. Feelings or suggestions will be welcome.


OpenSUSE is a nice Linux distribution because of its administration tool called YaST. Even if you use openSUSE in text-mode only, YaST is a very friendly system management tool. However, some of us still like the look'n'feel of a window manager like KDE, and sometimes we do not have physical access to the Linux computer. There are solutions like VNC (which is not secure) and VPN (which is hard to set up) that allows us to access the computer remotely.

Recently, I found a "hidden" way to access KDE from another computer. The computer from where I am accessing KDE has Windows Vista Home Premium installed. The Linux computer that I am accessing uses openSUSE 11.1 + KDE. This method, however, should be easy to apply to different system configurations.

The keys to this method are SSH, to make it secure, and the power of the X System, to get KDE working remotely. We are going to forward all the X11 requests from the Linux computer to another computer using SSH tunneling. It sounds easy so far, but the problem comes when we realize that we need an X server to process the requests from the Linux client. Windows, unfortunately, does not have native support for the X System. However, there is a very nice application to add X System functionality to a Windows desktop. It is called Xming and you can download it freely from

http://sourceforge.net/projects/xming

The installation is self explanatory. These are the options that I selected for the installation:

Also, instruct the installation program to place a shortcut for XLaunch on the desktop.

Now, the secure part. Make sure that you can access your Linux computer in text mode using SSH. If you can do this, the rest is easy.

First, we need to make sure the SSH server is configured correctly to handle X11 forwarding. I took the following from

http://solaris.reys.net/english/2006/04/x11_forwarding

1. Open the file /etc/ssh/sshd_config
2. The following lines should be uncommented:

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

3. Restart the SSH Deamon. In my Linux distribution, you just have to type:

rcsshd restart

The SSH client that I am using is PuTTY (I assume that you need to have it installed). Click on the XLaunch icon on the desktop. This will open the following window:

Make sure you select "One window". Then, click next.

Select "Start a program" and click next.

Enter "startkde" in the text field "Start program". Select "Using PuTTY (plink.exe)" and fill out the fields as if you were connecting through SSH. Also, select "With compression". Then, click next.

Leave this additional parameters as they are and click next.

Your configuration is finished. Click "Finish" to start KDE. It might take a while before it starts, but it will eventually. One of the disadvantages of this method is that it is very slow, partly because it uses SSH to encrypt the communication and partly because the quality of the graphics is perfect. It might not be very convenient to access this from the WAN, unless you have a really fast internet for both machines.

Something that you might prefer doing is starting individual applications instead of the entire KDE desktop. It makes it significantly faster. In that case, you type a different command (like "firefox") instead of "startkde".

A useful application of this is that you can run YaST in graphical mode by using the commands:

yast2 --qt
or,
yast2 --gtk

I hope this post was helpful

28 comments:

  1. great! I was looking for this :) Thank u so much!

    ReplyDelete
  2. Astonishing post. Judging from the fact that you only have two comments, I take it for a fact that you got seriously underappreciated with your efforts here.

    I am not a big fan of Linux as a desktop system, to begin with. Linux still has a long way to go to meet the need of most (average) users. But the disadvantage of configuring Linux is also its best advantage and your post is a proof of that. You collected and neatly organized the info that would take some days for me to organize. Thank you. Now I can revive my HDDless P3 system and work with it from my Win7 machine.

    ReplyDelete
  3. Thank you for your comment! I agree with you. While I appreciate and respect the efforts of Linux developers, different factors outside their control make Linux an unsuitable OS for desktops.

    I do get a lot of visits for this post, but very few people comment on it. I really appreciate the fact that you took the time!

    ReplyDelete
  4. Thanks very much.

    I have been doing the research for this and all I needed can be obtained from your fantastic post.

    Good work!

    Stephen

    ReplyDelete
  5. I agree is an easy step. I am unix beginner-middle and i undertand the steps and the instructions. It is no always asa easy...eventhough is not working ihad been waiting for almost 10 minutes and nothing happen but seems that I follow all the instructions...but I am sure i did some mistakes because the nstructions aer easy to dollow..
    Thanks
    fernando parrado
    fernando.parrado@gmail.com

    ReplyDelete
  6. @fernando parrado:

    Hi! Thank you for taking the time to submit a comment. I might be able to help you with your problem. Can you submit details about it? Do you get errors?

    Andres

    ReplyDelete
  7. Absolutely great post! I've followed everything the best that I can but I haven't quite got it working just yet. I'm sure the differences between our setups is what's holding me back but I still appreciate the push in the right direction. I'm thinking once I get this working I will post an entry on how to do this on a cloud based ubuntu that previously had no gui installed. Once I do that I will definitely link back to you! Thanks again for such an extremely helpful article.

    ReplyDelete
  8. Thank you for your comment Johnux! Unfortunately I'm not very familiar with Debian-based Linux systems, so I did not think much about it when I wrote the post, but if I can be of any help, please feel free to post your problem and I'll try to help you.

    ReplyDelete
  9. This is what I've been looking for! Thanks for posting. I followed exactly each step but Xming did not show anything. Here's the log:

    winCheckDisplayNumber - CreateMutex failed: Access is denied.

    Fatal server error:
    InitOutput - Duplicate invocation on display number: 0. Exiting.

    winDeinitMultiWindowWM - Noting shutdown in progress

    I really wish I could get it working!

    ReplyDelete
  10. To fix the fatal error above:

    winCheckDisplayNumber - CreateMutex failed: Access is denied.

    Change your display to a different number (I tried 1 instead of 0) on the very first screen where you can select fullscreen, multiple windows, etc.

    This error appears to be caused by the fact that X server is running on the remote linux box and you are trying to use the same window name, not good.

    ReplyDelete
  11. This was a very good post Thank You.

    ReplyDelete
  12. This seems simple enough and I love the simplicity ... other than I cannot getting working ;o)

    I can connect with PuTTY to my remote (KDE) without any problems but cannot start any windows from it into my client (Win7). When I launch XLaunch as shown above, I get PuTTY Fatal Error: Connection Timeout.

    I'm so close I can smell it ;o) ... any ideas?

    Thanks!

    ReplyDelete
  13. Thank you. This is a clear, concise, accurate, and sufficiently graphical how-to ... far too rare for those of us coerced into using Linux. If Linux promoters thought more like you, Linux might be a real competitor to Windows.

    ReplyDelete
  14. This comment has been removed by the author.

    ReplyDelete
  15. Hey I am so grateful I found your site, I really
    found you by error, while I was browsing on Bing for something
    else, Nonetheless I am here now and would just like to say thanks for
    a marvelous post and a all round entertaining blog (I also love the theme/design), I don’t have time to
    read through it all at the minute but I have saved it and also added in your RSS feeds,
    so when I have time I will be back to read much
    more, Please do keep up the superb jo.

    my weblog :: baileyfulton.com

    ReplyDelete
  16. If you are going for best contents like myself, only pay a visit this web
    page all the time since it offers quality contents, thanks

    Review my web-site: how to lose weight

    ReplyDelete
  17. Their luxury Paphos Car Hire service really works.
    The next day I was phoned by Days Rental in Haverfordwest, the local food
    items are for the real and rising risk of default.


    Also visit my weblog ... paphos car rental

    ReplyDelete
  18. There are several classes like economic class, MPV, luxury, and classic paphos car hires in Las Vegas
    Nevada is the 6th busiest airport terminal in the United States and found
    work in finance. Lately there has been little real hope of reconciliation.


    Feel free to visit my site; ofisut.blogspot.fi

    ReplyDelete
  19. Thanks in favοr of sharing such a good thоught,
    аrtісle is pleasant, thats ωhy i haѵe rеаd it
    entirеly

    Heге is my blog pοst: forever aloevera

    ReplyDelete
  20. This aгticlе pгeѕеnts clear idea in fаvor
    of the neω visitoгѕ of blоgging, that in fаct how to do
    blogging.

    Visit my wеb blog :: Aloe Vera Gel

    ReplyDelete
  21. It's very effortless to find out any matter on net as compared to textbooks, as I found this article at this web site.

    My page ... Aloe

    ReplyDelete
  22. Everything iѕ very οpen with a preсiѕe clarification of the iѕsues.
    It ωаs really informatiѵe. Your site is extгemely helpful.
    Thank you fοг sharing!

    my blοg ρost; Forever Living Products

    ReplyDelete
  23. Hey thеre! I just wanted to aѕκ
    if you ever have аny tгouble ωіth haсkerѕ?
    My last blog (wordpresѕ) was hacκed and I еndeԁ up losіng months
    оf hard wоrk due to no bасkup.
    Do yοu have anу sоlutionѕ to prevеnt hackerѕ?


    Αlso vіsit my homepagе ... forever living products aloe vera

    ReplyDelete
  24. This post will aѕѕіѕt the internet viewers for сгeating new webpаgе or even a blog
    fгom ѕtart tο enԁ.

    Alsο visit my web site forever

    ReplyDelete
  25. worked like a charm!!! Thanks you. I was missing the ssdh_config part ...

    ReplyDelete
  26. Thanks for this tutorial! Helped me out just right!

    ReplyDelete
  27. Thanks and that i have a neat supply: How Much Should House Renovations Cost house renovation salary

    ReplyDelete