6

I have system which is equipped with Intel Celeron processor 1.1 GHz s370 with 384 Mb of RAM on Intel d815egew motherboard which supports wake-on-lan function. I want to use such a PC for Internet sharing to the local network. Also this PC is a DHCP+DNS server as well as router/gateway. Based on above I decided to install Lubuntu as it is lightweight system. I installed Lubuntu 10.04.4 LTS from alternate ISO. System has no auto login. System boots and has acceptable performance.

Host PC has onboard 4 network adapters:

  • eth0 – ethernet controller which is used for Local Network connections. Has static address 10.0.0.1
  • eth1 – ethernet controller which is not used and not configured so far, I plan to connect printer here later on.
  • eth2 - ethernet controller which is used to connect to Internet, which we plan to share for the local network
  • wlan0 – wireless controller, it is used in role of access poit for local Network and has address 10.0.0.2
  1. We want to control our gateway remotely. So, we need to be able to power it on remotely. To allow this I’ve done the following things:

    • $ cd /etc/init.d/
    • made a new file with command

      $ sudo vim wakeonlanconfig
    • Wrote the following lines to the newly created file, saved and closed it

      #!/bin/bash
      ethtool -s eth0 wol g
      ethtool -s eth2 wol g
      exit
    • Made the abovementioned file executable

      $ sudo chmod a+x wakeonlanconfig
    • Then included it into autostart sequence during boot.

      $ sudo update-rc.d -f wakeonlanconfig defaults


      after system reboot we will be able to poweron system remotely.

  2. Than we need to have a possibility to connect remotely to the host via SSH and VNC. So, I installed following packets with the following commands:

    $ sudo apt-get update
    $ sudo apt-get install openssh-server tightvncserver
  3. Add ssh daemon into autostart sequence during boot.

    $ sudo update-rc.d -f ssh defaults
  4. Power off the host PC

    $ sudo halt
  5. Then I went to remote place, send magic paket and powered the Host up. System started... And I connected to the host via Putty from remote system under Windows. Than logged in and run the command to start vnc server.

    $ tightvncserver -geometry 800x600 -depth 16 :2


    VNC server successfully started and I got message like follows.

    New 'X' desktop is gateway:2
    
    Starting applications specified in /home/dolv/.vnc/xstartup
    Log file is /home/dolv/.vnc/gateway:2.log
    
    
  6. Using UltraVNC Viewer programm under windows I connected to the host's vnc server, enterd the password and.... sow only mouse cursor in form of cross on a grey background of 800x600 dots, no desktop.

Here is my .vnc/xstartup file

#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession

The Question: What I have to change and where to make LXDE session start automatically after tightvncserver starts?

5 Answers 5

8

In your .vnc/xstartup file, replace /etc/X11/Xsession with

/usr/bin/startlxde.

I looked in /usr/share/xsessions/LXDE.desktop to see what it did. You can see how to start any of the session types in /usr/share/xsessions by looking in the desktop files.

(Ubuntu 12.04.1 LTS)

0
6

The mentioned solutions dates back to 2012 and 2013. Same solution doesn't apply to lubuntu 13 or 14 as startlubuntu was removed.

The solution is mentiond in a launchpad Bug #1241958, which is to use lxsession -e LXDE -s Lubuntu instead of /etc/X11/Xsession.

1
  • Yes! This needs more up votes! Mar 26, 2017 at 2:19
5

In my ~/.vnc/xstartup file, I replaced /etc/X11/Xsession with /usr/bin/startlubuntu.

3
  • But now the fallowin issue has arisen: I started tigntvnc server on display :2 and when I try to run Chromium browser via vnc client it starts on the display :0. How to cure this? Nov 22, 2012 at 9:40
  • 1
    this should be a new question.
    – fossfreedom
    Nov 22, 2012 at 22:46
  • 2
    startlubuntu instead of starlubuntu ('t' missing)
    – Len
    Dec 23, 2014 at 8:38
0

I think if you install Lubuntu as the OS, then you get a slightly different configuration than if you installed lxde-desktop onto Ubuntu. In the first case /usr/bin/startlubuntu is present, in the second case likely /usr/bin/startlxde.

In Lubuntu 13.04, my ~/.vnc/xstartup looked like that shown earlier,and gives the grey screen with old-fashioned cursor - this indicates that the virtual desktop has been created, but there's nothing on the desktop.

Making the edit to remove /etc/X11/Xsession and insert /usr/bin/startlubuntu, and restarting tightserver, still gives the same thing.

Then adding the line: lxpanel --profile Lubuntu and restarting tightserver, gives the panel on the desktop, from which you can launch apps. Unfortunately these app windows are not rendered with a title bar or borders, and no taskbar button. A number of icons are different too.

I'm still groping my way towards a solution.

Why doesn't tightvncserver install as a service automatically in the first place ? I mean, what use is a server that doesn't start up on boot? I dare say there are a lot of installation variables for the package maintainers to consider, but rather them than people like me, who don't understand ANY of this stuff.

0

in lubuntu 14.04

#!/bin/sh
xsetroot -solid grey
export XKL_XMODMAP_DISABLE=1
#autocutsel -fork
openbox &
/usr/bin/lxsession -s Lubuntu &
1
  • Welcome to the site and thank you for your input. Please edit your answer to give a bit more details, such as the expected outcome, details of it working before or anything else like that.
    – Phil UK
    Apr 17, 2017 at 22:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .