Page 1 of 1

Lubuntu: start complete lxde via vnc

Posted: Mon Apr 11, 2011 12:32 am
by Knutowskie
Hey!
All my searching ended up with no solution. Maybe somebody could help me.

I want to access my lubuntu via vnc. At my first try i used x11vnc. This tool allowed me to access the main X session. BUT: it's not stable. Sometimes it crashes and then it kills the whole X server and forces it to restart.

So i watched out for a alternative solution. Now I'm using vnc4server. Seems to be more stable.
BUT: i can't access my main X session (on 192.168.1.1:0). So i have to set up the ~/.vnc/xstartup correct.

Now I'm at this state: i do have a lxpanel over vnc, but the desktop-wallpaper and the desktop-links are missing. Even the design is not equal to the display 0. How i can start a complete LXDE over VNC?

My xstartup now looks like this:

Code: Select all

#!/bin/sh
[ -r HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
openbox &
lxpanel &
Thanks for help!

edit:
I found the solution! i just tried to "startlxde" in my putty window. it says, i have to install lxde-common. Funny thing, on a lubuntu, that comes with lxde, there are not the common packages inside...

After "sudo apt-get install lxde-common" i again tried "startlxde". Seemed to work on putty, but with no visible X. (i enabled X support for applications)
So i tried to insert "startlxde" in my ~/.vnc/xstartup... SUCCESS!!! Yes i have done that before with no effect. Nothing happened, because of the missing package! Even a errormessage was missing.

now my xstartup looks like this:

Code: Select all

#!/bin/sh
[ -r HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
startlxde &
It's not the same design as my default Display, but it's complete with everything. NICE!

Re: Lubuntu: start complete lxde via vnc

Posted: Mon Apr 11, 2011 4:38 pm
by Knutowskie
Hey!
today there was a little problem...

when i boot up my lubuntu, the vnc server automatically starts. But there is a language problem:

when I connect to the lubuntu via VNC without logging in on the main-session, the whole lxde is complete in english.
"locale" says something different from de_DE.UTF-8

when i connect to it after logging in on the main-session, everything is fine. locale says de_DE.UTF-8

So i have to go to the computer to login at the main-session, before i can access it via VNC. this makes vnc a little bit useless in my case.

How i can fix this? Is there a way to tell the vncserver wich language should be set? Or maybe there is a way i can login on the main-session via vnc? Found sth. with gdm, but i'm using lxde... i think this wouldn't work.

When I start my VNC-Session, I'm logged in automatically as an user. maybe this is the problem?

I hope this time someone could help, I've tried nearly everything...

Re: Lubuntu: start complete lxde via vnc

Posted: Tue Apr 12, 2011 12:20 pm
by Knutowskie
Now i have a little workaround for this problem. I post it just in case somebody else got the same problems.
It's not really a solution, but it will work for the time searching and waiting for a real solution of the problem.

1. I removed the script from /etc/init.d/ that autostarts the vnc server
2. I installed openssh on the server and a putty on my win7-pc
3. i log into the putty and start the server manually
4. this leads to a german interface when connecting the vnc, because the user i use to log in to the putty is the same for vnc.

Hope this could help sometimes.

cu

Re: Lubuntu: start complete lxde via vnc

Posted: Tue Apr 19, 2011 9:22 am
by Knutowskie
i want to push this thread, because my problem isn't really solved yet.

does anyone have a idea how i can log in to my system via vnc? this would make it a little bit easier to work with the remote system.
My posted workaround is not really effective. It should be safe because of ssh, but i want a easy to use solution for the user.

Is it possible to install gdm for login issues only? Or does lxdm have an graphical login interface, wich i could start in the xstartup? Important is the language of the desktop and the security. Multiple sessions are not really necessary, but it would be a nice feature.

cu

Re: Lubuntu: start complete lxde via vnc

Posted: Thu Dec 01, 2011 9:21 pm
by hansaplast
Edit ~/.vnc/xstartup for your user(s)

Code: Select all

#!/bin/sh
export XKL_XMODMAP_DISABLE=1
exec ck-launch-session startlxde &      #for an lxde session
vncconfig -nowin &
To start vncserver for a user put code below in ~/.bashrc

Code: Select all

vncserver :1 -geometry 1440x900
Then start vncviewer on the client

Re: Lubuntu: start complete lxde via vnc

Posted: Sun Mar 18, 2012 1:13 am
by xiangxw
use startlubuntu instead, i use it in lubuntu 11.10 and it work very well

Code: Select all

startlubuntu &