Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

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)

share|improve this answer
up vote 2 down vote accepted

SOLVED:

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

share|improve this answer
    
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? –  Oleksandr Dudchenko Nov 22 '12 at 9:40
1  
this should be a new question. –  fossfreedom Nov 22 '12 at 22:46

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.