[GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC & XRDP

Post Reply
stangri
Posts: 74
Joined: Thu Apr 10, 2014 10:06 am
languages_spoken: english
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

[GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC & XRDP

Post by stangri »

So the easy desktop sharing of Linaro is nowhere to be found in 13.10 image, so here's what I found to work quite well to give me a desktop of the currently logged in user. The beauty of it is that this runs on a headless odroid -- you don't have to have TV/Monitor connected to odroid or in any way simulated.

SSH as root to your odroid box:

Code: Select all

ssh root@odroid
And install the x11vnc:

Code: Select all

aptitude update
aptitude install nano x11vnc avahi-daemon
Now run the following commands (make sure to replace {yourpasswordhere} with the password you want to use when connecting):

Code: Select all

x11vnc -storepasswd {yourpasswordhere} /etc/x11vnc.pass
chmod 744 /etc/x11vnc.pass
Now run this to create a new conf-file for x11vnc:

Code: Select all

nano /etc/init/x11vnc.conf
This will open a blank (we're creating a new file) file editor. Paste the code below into the file editor:

Code: Select all

start on (login-session-start or desktop-session-start)
stop on desktop-shutdown

respawn

emits vnc-server-start

script
/usr/bin/x11vnc -forever -bg -geometry 1024x768 -usepw -shared -noprimary \
	-auth /var/run/lightdm/root/:0 -display WAIT:0 -rfbauth /etc/x11vnc.pass \
	-avahi -env X11VNC_AVAHI_NAME="`hostname`" -desktop "`hostname`'s Remote Desktop"
initctl emit vnc-server-start
end script
Now press Ctrl-X, Y, Enter to save file and exit nano.

If you're running Mac (maybe it will work with modern Windows versions as well, I haven't used Windows after Windows NT) x11vnc will use your odroid machine's name to advertise itself thru Bonjour/ZeroConf/mdns/avahi and it will show up in the Finder's sidebar. That allows you to use the Mac OSX'es built-in Screen Sharing app to connect to your odroid thru VNC.

You can then either run:

Code: Select all

/usr/bin/x11vnc -geometry 1024x768 -usepw -auth /var/run/lightdm/root/:0 -display :0 -forever -bg -rfbauth /etc/x11vnc.pass
or just reboot odroid to make sure all the settings from the config file are picked up.

Voila, you now have remote desktop access to your odroid. :)


You can also add an XRDP to that so it's a bit easier to connect from Windows.

After all the steps above do the following:

Code: Select all

sudo apt-get install xrdp --no-install-recommends
After that edit the /etc/xrdp/xrdp.ini file to read:

Code: Select all

[globals]
bitmap_cache=yes
bitmap_compression=yes
port=3389
crypt_level=high
channel_code=1
max_bpp=24

[xrdp1]
name=Local Console
lib=libvnc.so
username={username}
password={password}
ip=127.0.0.1
port=5900
If you're using default settings, you may want to put odroid as both username and password.

After that you can connect to your ordroid with Microsoft Remote Desktop!

UPDATE: removed " -gui tray" from the x11vnc command line as it apparently not working well on the official 14.04.
Last edited by stangri on Thu Dec 11, 2014 4:42 pm, edited 14 times in total.

stangri
Posts: 74
Joined: Thu Apr 10, 2014 10:06 am
languages_spoken: english
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

14.04 LTS post-upgrade fix

Post by stangri »

Now on the official Xubuntu 13.10 with the script-updated kernel/firmware I ran into a bit of the problem after upgrading to 14.04.

Once you upgrade you can connect to VNC/XRDP just fine, however the windows title bars do not show up correctly. The popular solution on the forum is to just do:

Code: Select all

sudo mv /etc/X11/xorg.conf.d/exynos.conf /etc/X11/xorg.conf.d/exynos.conf.old
However that breaks X11 loading up and you can no longer use remote desktop (neither VNC no XRDP), so there're two alternatives:
1. Headless box with no need for 3D and you need to get it working faster than within 1 minute:
here's another command you need to run if the remote desktop breaks for you:

Code: Select all

sudo cp /etc/X11/xorg.conf.default /etc/X11/xorg.conf
sudo reboot
2. You need 3D support and can spare a minute recompiling Mali, please follow RobRoy's advice here.

reboot odroid afterwards and both VNC and XRDP should work.
Last edited by stangri on Sat May 03, 2014 1:47 pm, edited 6 times in total.

robroy
Posts: 3459
Joined: Mon Feb 25, 2013 2:29 am
languages_spoken: English
ODROIDs: Q2, X, X2, U2, U3, XU-E, XU3, XU4, C1, C1+, C2, GO, GO Advance, H2+
Location: Northern California
Has thanked: 3 times
Been thanked: 38 times
Contact:

Re: [GUIDE] Easy remote desktop (official Xubuntu 13.10) + X

Post by robroy »

Nice guide! What other platforms does it support beyond Windows Remote Desktop?
Rob Roy, Editor-in-Chief of ODROID Magazine (submit an article | make a donation)

stangri
Posts: 74
Joined: Thu Apr 10, 2014 10:06 am
languages_spoken: english
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop (official Xubuntu 13.10) + X

Post by stangri »

Rob,

I use it to connect to Odroid's desktop from Mac -- both Chicken of VNC (for VNC connections) and the Microsoft Remote Desktop (for RDP connections) are free applications. I don't have any desktop Linux at home (besides Odroid) so I don't know about Linux apps, but can you maybe suggest some free Linux apps for both VNC and RDP connections to complete this write-up? It's nothing ground-breaking, but I think it's nice to have a very short remote desktop guide for stock Xubuntu 13.10 for us newbies.

mdrjr
Site Admin
Posts: 11964
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 5 times
Been thanked: 110 times
Contact:

Re: [GUIDE] Easy remote desktop (official Xubuntu 13.10) + X

Post by mdrjr »

Lovely guide. I like RDP.. it looks faster.

Btw, a Good VNC/RDP client on Linux is Remmina :)

robroy
Posts: 3459
Joined: Mon Feb 25, 2013 2:29 am
languages_spoken: English
ODROIDs: Q2, X, X2, U2, U3, XU-E, XU3, XU4, C1, C1+, C2, GO, GO Advance, H2+
Location: Northern California
Has thanked: 3 times
Been thanked: 38 times
Contact:

Re: [GUIDE] Easy remote desktop (official Xubuntu 13.10) + X

Post by robroy »

mdrjr wrote:Lovely guide. I like RDP.. it looks faster.

Btw, a Good VNC/RDP client on Linux is Remmina :)
^^ this
Rob Roy, Editor-in-Chief of ODROID Magazine (submit an article | make a donation)

stangri
Posts: 74
Joined: Thu Apr 10, 2014 10:06 am
languages_spoken: english
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by stangri »

Both VNC and XRDP guides are merged into the first post, second post details the post-14.04 upgrade fix to get everything working again.

robroy
Posts: 3459
Joined: Mon Feb 25, 2013 2:29 am
languages_spoken: English
ODROIDs: Q2, X, X2, U2, U3, XU-E, XU3, XU4, C1, C1+, C2, GO, GO Advance, H2+
Location: Northern California
Has thanked: 3 times
Been thanked: 38 times
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by robroy »

However that breaks X11 loading up and you can no longer use remote desktop (neither VNC no XRDP), so here's another command you need to run if the remote desktop breaks for you:
It's not the "sudo mv exynos.conf" command that's breaking X11, it's exposing a mismatch between your Mali drivers and the Xorg Server version. The ArmSOC drivers that come with 14.04 will show the desktop, but sliding windows around will be very slow. Moving the exynos.conf file out of the way re-enables Mali, producing an error and failing to show the screen.

Code: Select all

sudo cp /etc/X11/xorg.conf.default /etc/X11/xorg.conf
sudo reboot
If this is one of my images that you're using, then this command just disables the Mali drivers. If you look on the 14.04 threads that I contributed to, the follow-up step is not to disable Mali, but to recompile Mali for the new version of Xorg Server: http://forum.odroid.com/viewtopic.php?p=20685#p20685. Your solution will prevent any hardware-accelerated programs from starting, which may not be noticeable until you run XBMC, play a game, or use KDE Plasma Workspace.

You can see the server mismatch error message by inspecting /var/log/Xorg.0.log via SSH or USB-UART console when the screen comes up blank after the "mv exynos.conf" command.
Last edited by robroy on Sat May 03, 2014 1:44 pm, edited 1 time in total.
Rob Roy, Editor-in-Chief of ODROID Magazine (submit an article | make a donation)

stangri
Posts: 74
Joined: Thu Apr 10, 2014 10:06 am
languages_spoken: english
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by stangri »

Rob,

thanks, yours is a nicer solution. I've written the guide with the headless install in mind so Mali was not a priority.

PS. Not sure if it's yours or not, but I was using official Xubuntu 13.10 prior to upgrading to 14.04.

stangri
Posts: 74
Joined: Thu Apr 10, 2014 10:06 am
languages_spoken: english
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by stangri »

Added new x11vnc parameters to advertise service thru avahi, allowing easy use of Mac OSX'es built-in Screen Sharing app to connect to odroid thru VNC.

10alex
Posts: 3
Joined: Mon Mar 24, 2014 10:56 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by 10alex »

I have problem with XRDP (guide from user stangri), I follow instructions and VNC connection from Win7 working, but in stead of GUI I have grey background with mouse pointer X without any icons.
I follow other topics with this issue but not find what is solution for this. I also try tightVNC and result is same (grey background).
I have last official Xubuntu 13.10 version on eMMC and till now not try directly connection on monitor/TV, only VNC connection.

stangri
Posts: 74
Joined: Thu Apr 10, 2014 10:06 am
languages_spoken: english
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by stangri »

Hey Alex,

if you already have any other VNC servers installed, I'm not sure if the guide will work for you. The instructions I've posted are tested to work when ran on a fresh stock distribution.

10alex
Posts: 3
Joined: Mon Mar 24, 2014 10:56 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by 10alex »

I first try with tightVNC installation and result was grey background. I can't find what is problem (looking in odroid.forum) I try with XRDP and same problem.
Can it be with some display/resolution parameter? Where I can find XRDP log file?
Thanks for any suggestion!

stangri
Posts: 74
Joined: Thu Apr 10, 2014 10:06 am
languages_spoken: english
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by stangri »

This is the guide for X11VNC and not the TightVNC server.

XRDP is in a sense an add-on, if the VNC doesn't work, I don't think XRDP will.

10alex
Posts: 3
Joined: Mon Mar 24, 2014 10:56 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by 10alex »

Thanks stangri, now I see that XRDP iz add-on, I didn't ready very carefully you instructions. On end I remove tightvNC and XRDP and install only X11VNC and now working fine.

Sorry for late answer but I was busy and this weekend find time to check it.

stangri
Posts: 74
Joined: Thu Apr 10, 2014 10:06 am
languages_spoken: english
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by stangri »

Just tested on the official Lubuntu 14.04 -- everything seems to work just fine.

venkatbo
Posts: 543
Joined: Mon Feb 25, 2013 3:10 pm
languages_spoken: english
ODROIDs: C0/C1+/C2; U3+; XU3-Lite/XU4; H2; VU/VU7+; Touchscreen Show TFT Cloudshell SmartPower mAHRS DAC GPS Multiscope Ocam
Location: Bay Area, California
Has thanked: 4 times
Been thanked: 5 times
Contact:

Re: 14.04 LTS post-upgrade fix

Post by venkatbo »

stangri wrote: ...
Now on the official Xubuntu 13.10 with the script-updated kernel/firmware I ran into a bit of the problem after upgrading to 14.04.
...
So I tried to upgrade form Xubuntu 13.10:

Code: Select all

Linux u3-2 3.8.13.16 #1 SMP PREEMPT Tue Feb 11 10:47:21 BRST 2014 armv7l armv7l armv7l GNU/Linux
to 14.04 using the kernel-update.sh, as indicated by Rob's article Keeping your ODROIDs Up to Date, Page 13, Mar. 2014 Magazine Issue.

Code: Select all

itsme@u3-2:/usr/local/bin$ sudo ./kernel-update.sh
...
Installing new uInitrd
ERROR: could not open directory /lib/modules/3.8.13.16: No such file or directory
FATAL: could not search modules: No such file or directory
...
*** Installing 720P60Hz HDMI default boot.scr
cp: cannot stat \u2018/media/boot/boot-auto.scr\u2019: No such file or directory
...
*** Check /media/boot for new available boot.scr's!!!
*** There's a possibility to use DVI mode (disables SOUND-OVER-HDMI)
*** This is for some screens that new this kind of compability mode
*** There are also several frequencies supported now.
*** WARNING WARNING WARNING WARNING WARNING ***
*** Mali GPU doesn't support all available combos.
*** If you find one that doesn't work, try another boot.scr.
Unclear if above errors were fatal or not... So rebooted and ran the following commands:

Code: Select all

$ sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove
I got more errors this time. So following suggested alternatives, I still got the eroors:

Code: Select all

$ sudo apt-get update --fix-missing
Err http://ports.ubuntu.com saucy InRelease
Err http://ports.ubuntu.com saucy-updates InRelease
Err http://ports.ubuntu.com saucy-security InRelease
Err http://ports.ubuntu.com saucy Release.gpg
  Could not resolve 'ports.ubuntu.com'
Err http://ports.ubuntu.com saucy-updates Release.gpg
  Could not resolve 'ports.ubuntu.com'
Err http://ports.ubuntu.com saucy-security Release.gpg
  Could not resolve 'ports.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/saucy/InRelease
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/saucy-updates/InRelease
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/saucy-security/InRelease
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/saucy/Release.gpg  Could not resolve 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/saucy-updates/Release.gpg  Could not resolve 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/saucy-security/Release.gpg  Could not resolve 'ports.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Rebooted. Checking uname -a, still points to old info. Nothing changed. Can only ssh into U3. Access via Logitech K400 fails. It was working earlier. 1080p desktop UI, seems to be ok, but all window borders are dotted now ;!).

So, would like to know what the latest greatest upgrade procedure is to go from: xubuntu 13.10 (official) to xubuntu 14.04. 'am reading that some folks have had success, but unsure what the proper steps are.

thanks.

stangri
Posts: 74
Joined: Thu Apr 10, 2014 10:06 am
languages_spoken: english
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by stangri »

I suggest you ask this in the kernel-update thread, I don't really see how's that related to x11vnc.

PS. I've only used kernel-update to update the kernel, I think upgrade to 14.04 is done thru do-release-upgrade, however afaik that is not recommended for our armhf platforms.

venkatbo
Posts: 543
Joined: Mon Feb 25, 2013 3:10 pm
languages_spoken: english
ODROIDs: C0/C1+/C2; U3+; XU3-Lite/XU4; H2; VU/VU7+; Touchscreen Show TFT Cloudshell SmartPower mAHRS DAC GPS Multiscope Ocam
Location: Bay Area, California
Has thanked: 4 times
Been thanked: 5 times
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by venkatbo »

stangri wrote: I suggest you ask this in the kernel-update thread, I don't really see how's that related to x11vnc.
I was able to install vncserver/xrdp support on xubuntu 13.10 (official) and was trying to see if I could retain all of that, even after "upgrading" to a 14.04 "image". A statement from the first post:
stangri wrote: Now on the official Xubuntu 13.10 with the script-updated kernel/firmware I ran into a bit of the problem after upgrading to 14.04.
seemed to indicate that was what was done... but I guess not. Was hoping to avoid doing a fresh 14.04 install and repeating the vnc/xrdp support...

thanks

stangri
Posts: 74
Joined: Thu Apr 10, 2014 10:06 am
languages_spoken: english
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by stangri »

I've updated the /etc/init/x11vnc.conf and cleaned up the post. No need to modify the conf file anymore, it grabs the avahi advertised name from machine's name. Also shows a nicer title for the VNC/Screen Sharing window.

harry123
Posts: 12
Joined: Wed May 28, 2014 1:38 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by harry123 »

Hi, I followed above procedure to connect to odroid u3 via vnc (without rdp). This works fine the first time from mac os (native) and ios 8 (real vnc viewer). Still, everytime I connect from ios and close the connection, I cannot reconnect - seems like the connection is closed. This does not happen from connections/disconnection from mac os.

Any ideas? And yes, I do use the "-forever" option...

Update: I guess it's not the ios connection, but it rather seems like some sort of a timeout after inactivity (tried mocha vnc client as well). After some 10 minutes the connection cannot be reastablished.

Any ideas?

I think I've found it here: https://gfcyborg.wordpress.com/2014/12/ ... reensaver/
To fix that, you just have to remove light-locker and get back to something more classic (e.g.: xscreensaver), so the fix is:

sudo apt-get purge light-locker
sudo apt-get install xscreensaver

stangri
Posts: 74
Joined: Thu Apr 10, 2014 10:06 am
languages_spoken: english
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by stangri »

Must have to do something with specific light locker settings then. I have Light Locker installed and xscreensaver not installed on my machine and there's no inactivity disconnect.

The Light Locker is enabled with the following settings:
Blank screen after: Never
Switch off display: Never
Automatically lock session: Never
Lock on suspend: OFF

As I've mentioned I run my odroid headless so I'm not concerned with switching off the display nor locking out current session. I'm assuming you have a monitor connected to yours?

Please do post back how does it go for you with xscreensaver.

stangri
Posts: 74
Joined: Thu Apr 10, 2014 10:06 am
languages_spoken: english
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by stangri »

Well, I don't know wherever it's a Yosemite thing or an ordroid thing, but I've noticed that lately I didn't have odroid show up in Finder's panel (Mac OS X 10.10.1), so the following in the crontab helped:

Code: Select all

00 * * * * service avahi-daemon restart  > /dev/null 2>&1
01 * * * * restart x11vnc  > /dev/null 2>&1
Might not be a great solution if you need to use the vnc/rdp for the extended priods of time as x11vnc is being restarted every hour, but at least it stays in the Finder.

wisnoskij
Posts: 20
Joined: Tue Jan 20, 2015 10:04 am
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by wisnoskij »

And this is only set up to work over your home network, or am I misunderstanding the ip=127.0.0.1? Can/will this work over the internet?

stangri
Posts: 74
Joined: Thu Apr 10, 2014 10:06 am
languages_spoken: english
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by stangri »

It will if you open ports.

crazymumu
Posts: 45
Joined: Wed May 06, 2015 10:00 am
languages_spoken: english
ODROIDs: Odroid u3
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by crazymumu »

Hi, I am using xu4 board which installed official Ubuntu 14.04 and set up xrdp like you said.
But I have issues:

started connecting
connecting to port 127.0.0.1 5900
tcp connected
security level is 2(1=none , 2=standard)
password failed
error - problem connecting

Any suggestions will be appreciate.

Thanks.

michael
Posts: 12
Joined: Sat Feb 01, 2014 2:21 am
languages_spoken: english
ODROIDs: U3 Community
Has thanked: 0
Been thanked: 0
Contact:

Re: [GUIDE] Easy remote desktop Xubuntu 13.10 & 14.04 VNC &

Post by michael »

@crazymumu I had that same exact problem. I fixed it by re-running the -storepasswd command with the same user's password I was using for logging in.

Post Reply

Return to “Ubuntu (All Linux'es)”

Who is online

Users browsing this forum: No registered users and 8 guests