Saturday, April 27, 2024
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 54429  / 1 Year ago, tue, december 20, 2022, 3:12:19

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?


More From » remote-desktop

 Answers
6

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


[#36013] Wednesday, December 21, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
arsleyeuth

Total Points: 72
Total Questions: 121
Total Answers: 112

Location: North Korea
Member since Mon, Oct 31, 2022
2 Years ago
;