Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: XRDP working with GNOME - howto (HACK)

  1. #1
    Join Date
    Apr 2006
    Location
    UK
    Beans
    164
    Distro
    Ubuntu 6.10 Edgy

    XRDP working with GNOME - howto (HACK)

    This solution is a bit of a messy hack, but it should work until xrdp/Xvnc are fixed.

    What is XRDP?

    It is a vnc-like server to allow you to connect to ubuntu from a windows machine (or using rdesktop) in the same way that Windows Remote Desktop does. (i.e. no additional software on the windows machine is needed). website here.

    What is this guide

    This guide will help set up xrdp on Ubuntu and, optionally get it working with GNOME (this has been a difficulty for many people). The GNOME solution is a bit of a hack, and certainly not perfect, but its the first working solution I've seen. It has been tested by myself on Edgy only, although it should work on any other version too. Let me know!
    The manner in which it works with gnome is to have an extra layer of vnc (using x11vnc). The problem is that you MUST have already logged on as yourself before trying to use xrdp. But IMO its better than nothing. The end result is actually a lot more like the bahaviour of RDP on Windows XP.

    The first two sections (sufficient for running kde with xrdp) should be usable by anyone, and can be easily undone.

    The third section should probably only be used by those who understand what the instructions do.





    THE GUIDE:

    1) GETTING XVNC TO WORK

    xrdp relies on Xvnc, which has problems with fonts (which we will fix!)

    Code:
    sudo apt-get install Xvnc
    now create a password file for Xvnc (this password is only for testing now, it will not be needed later so anything can be used)

    Code:
    vncpasswd
    now, running Xvnc at the moment will probably not work. try it:
    Code:
    Xvnc :1
    It will almost definitely give erroros about fonts but if it doesn't exit outright, and instead waits around for a connection you can proceed to section 2).

    Otherwise, you need to link to your fonts directory so that you can run Xvnc.

    Code:
    cd /usr/share/X11
    sudo mv fonts fonts.bak
    This renames your fonts folder. If something drastic goes wrong, just rename it back!

    now to link to the proper folder:
    Code:
    sudo ln -s /usr/share/fonts/X11/ fonts
    now try Xvnc again:
    Code:
    Xvnc :1
    and hopefully it wont crash, which should mean xrdp can run properly!






    2) INSTALLING XRDP

    It needs to be downloaded and compiled, so we'll need to install some tools:

    Code:
    sudo apt-get install build-essential libpam0g-dev libssl-dev x11vnc vncviewer fakeroot checkinstall x11vnc
    now download the latest version (0.3.2) from sourceforge, or type

    Code:
    cd ~
    wget http://mesh.dl.sourceforge.net/sourceforge/xrdp/xrdp-0.3.2.tar.gz
    now, cd to the folder you downloaded it to and type:

    Code:
    tar -zxvf xrdp-0.3.2.tar.gz
    cd xrdp-0.3.2/
    make
    fakeroot checkinstall
    If it asks questions just accept the defaults
    This will result in an error about not being able to install the package, but ignore that.
    Once its done there should be a .deb package in the xrdp folder that can be installed in the usual manner (by double-clicking it, or using sudo dpkg -i _packagename_)

    The package can be uninstalled by using synaptic or
    Code:
    sudo apt-get uninstall xrdp
    now run
    Code:
    sudo /usr/local/xrdp/xrdpstart.sh
    If you run KDE then the howto is now complete!

    either way test it by running
    Code:
    rdesktop localhost
    You should be able to log in if you have KDE installed but it probably wont work if you use gnome. This seems to be a problem with Xvnc, and there currently seems to be no proper solution(i'm not sure about other desktop environments like XFCE).



    EDIT --- it has been pointed out to me that at this point usingthe command
    Code:
    sudo apt-get install vnc4server=4.1.1+xorg1.0.2-0ubuntu1
    to downgrade to a different version of vnc4server makes gnome work fine.
    However, following section 3 will enable xrdp to run like the windows version: i.e display the same session as you were previously logged onto. If this is what you want, follow the instructions below, however you may be better advised to instead use rdp as it was meant to be used, then run x11vnc on their previous display. Proceed only if you understand whats going on, and its limitations.



    3) GNOME

    Now comes messy but necessary part if you really want gnome.

    To explain:
    XRDP uses a file called startwm.sh to determine which Desktop environment to use. Any program can be run in this file (the defaults are things like gnome-session, but gnome session can't run inside Xvnc).

    The only solution I can find is to first run x11vnc, which runs a vnc server that captures an already running session (hence the need to be logged in already) and then run vncviewer in fullscreen mode instead of having a desktop environment running.

    so, backup startwm.sh
    Code:
    cd /usr/local/xrdp/
    sudo mv startwm.sh startwm.sh.bak
    sudo gedit startwm.sh
    and enter the following code into the file:
    Code:
    #!/bin/bash
    x11vnc -display :0 -localhost &
    sleep 5
    vncviewer localhost:0 -fullscreen
    and make it executable:
    Code:
    sudo chmod +x startwm.sh
    Now, make sure you are logged on to your desktop, go to a windows machine and log onto you ubuntu machine using remote desktop, and hopefully it'll work.



    PS. This guide is entirely my own work. I found the font fix on these forums, i'm not sure where but its posted many times by many people. The hack I came up with myself. This is my first tutorial and I wrote it in a bit of a hurry as I was so excited to have found a way to make xrdp, ubuntu and gnome work together; I've been trying for about a year - periodically looking for solutions. All comments, criticisms, sugesstions and requests for help are welcome, but try to post exactly where things went wrong and what any errors were.
    Good luck.
    Last edited by richardward101; March 24th, 2007 at 06:47 PM.

  2. #2
    Join Date
    Jul 2006
    Location
    UK
    Beans
    43
    Distro
    Hardy Heron (Ubuntu Development)

    Re: XRDP working with GNOME - howto (HACK)

    I've set up the server. I have gnome and kde installed on this computer. Whenever I try to connect to rdp, I get KDE. Is there a way to change this?
    Last edited by Webspot; April 1st, 2007 at 02:37 PM.

  3. #3
    Join Date
    Apr 2006
    Location
    UK
    Beans
    164
    Distro
    Ubuntu 6.10 Edgy

    Re: XRDP working with GNOME - howto (HACK)

    Yes, there should be.

    If (as I infer from your message) you have installed xrdp and done nothing else, the file you need to look at is /usr/local/startwm.sh (which needs to be edited by root).
    If you look at this file it should be clear (without knowing EXACTLY whats going on - I don't quire know exactly either) that the first Desktop it tries too run is KDE. the solution it to delete the bits that don't refer to gnome (or just delete everything and put your own startup command in). However, as described just before part 3, gnome cannot run in xrdp unless you downgrade Xvnc, so follow the instructions just before part 3. however, if you want to rdp into your existing session automatically (as per windows, except you must be already logged in from GDM or KDM), then follow the instructions in part three.
    I'm going to rewrite this guide in a better format with better descriptions of the different options, if you can't get it running as you want before I do that then feel free to PM me on these forums.

  4. #4
    Join Date
    Jul 2006
    Location
    UK
    Beans
    43
    Distro
    Hardy Heron (Ubuntu Development)

    Re: XRDP working with GNOME - howto (HACK)

    I am sure I had changed that file. But I guess I didn't, as I found the default stuff in it.

    Changed the file and it works fine now.

    Thanks!!

  5. #5
    Join Date
    Jun 2005
    Beans
    145

    Re: XRDP working with GNOME - howto (HACK)

    Hi!
    I'm trying to install xrdp on Feisty but I get this error:
    Code:
    /usr/bin/ld: cannot find -lxrdp
    collect2: ld returnerade avslutningsstatus 1
    make: *** [xrdp] Fel 1
    Any idea?

  6. #6
    Join Date
    Aug 2006
    Beans
    7

    Re: XRDP working with GNOME - howto (HACK)

    Same error, english text, i need help to
    Code:
    gcc -L/usr/gnu/lib -L../libxrdp -Wl,-rpath,. -o xrdp xrdp.o xrdp_process.o xrdp_listen.o xrdp_bitmap.o xrdp_wm.o xrdp_painter.o xrdp_region.o xrdp_cache.o xrdp_font.o funcs.o xrdp_login_wnd.o lang.o list.o file.o os_calls.o thread_calls.o xrdp_mm.o -ldl -lpthread -lxrdp
    /usr/bin/ld: cannot find -lxrdp
    collect2: ld returned 1 exit status
    make: *** [xrdp] Error 1

  7. #7
    Join Date
    Aug 2006
    Beans
    7

    Re: XRDP working with GNOME - howto (HACK)

    I had to make as root, deaktivate "Remote Desktop" in Feisty , install vncserver and do Xvnx :1 to make it work

  8. #8
    Join Date
    Aug 2007
    Beans
    1

    Re: XRDP working with GNOME - howto (HACK)

    Getting this to work in Ubuntu 704 has kept me up late. In the end, I installed tightvncserver to solve the problem. I followed the instructions in the Install.txt document bundled with xrdp 4.0 with some minor alterations - installed x11vnc. Can anyone tell me why vncserver and vnc4server would not work, yet tightvncserver did?
    Last edited by SmartestAzz; August 28th, 2007 at 06:25 AM. Reason: To Ask A Question

  9. #9
    Join Date
    Sep 2007
    Beans
    1

    Question Re: XRDP working with GNOME - howto (HACK)

    Sorry I'm a really newbie...
    Where can I find Xvnc and Xrdp repository for Ubuntu???
    If I try:
    Code:
    sudo apt-get install Xvnc
    I get:
    Code:
    Can't find Xvnc

  10. #10
    Join Date
    Mar 2006
    Beans
    3

    Re: XRDP working with GNOME - howto (HACK)

    I tried the to follow the howto but couldn't find the Xvnc (only x11vnc) and didn't succeed in build xrdp from source... could anyone provide an ubuntupackage?

Page 1 of 3 123 LastLast

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
  •