Every time I install Mate desktop (a flavor of Ubuntu Linux, packaged as Linux Mint), I have to run through a series of steps to get it back up and running for my needs. Problem is, I have to re-discover many of these as random things stop working next time around. This post is more of a document for myself, than for the world out there.

The Need
I need a Linux server that is always available into which I can either ssh into or vnc in to get things done. Also, this would have my (now) 23 year old home directory, that has everything – old source code, emails, documents, etc. The idea is that this is a protected environment, and I use all my other terminals as a means to access this server.

The Setup
These days I use a Lenovo Ideapad 3, running Linux Mint 21. This is on a local LAN, hard wired and always connected. The reason to use a laptop (and not a blade, although that would be fancy), is because there are times when I might want to take this thing with me on a trip. I’ve used a Dell XPS 13, and prior to that, an HP Elitebook, and much prior to that multiple assembled desktops.

The Process
For these needs and setup, I want a familiar Linux desktop environment, since it is getting difficult to deal with all the Compizities that are coming along. Xfce is a bit too bland. Mate has been awesome, gives the Gnome 2 look and feel, and at the same time it is snappy.

  • Linux Mint: Burn it to a stick
  • Boot up IdeaPad with it and customize the partitions and their mounts
    • Always have two simultaneous partitions with different OSes (30G each) – one for current version, and one for the newer install (newer install gets configured as /)
    • /home is on a different partition
    • /boot on its own
    • I’ve stopped mucking with /etc, I let it get stubbed on by the new install
    • Setup the same username that I’ve used for years in my homedir, with the last password that I had for my current setup. This helps with preserving the private key setup with which the home directory is encrypted.
  • A random quirk on IdeaPad is that the touchpad stops working randomly. Surprisingly, it just gets disabled in System Preferences > Hardware > Mouse > Trackpad > Enable Trackpad, so you just go and enable it there (and not really modprobe for kernel mods).
  • Install some important (and for some reason not included) pkgs:
    • # sudo apt install x11vnc screen vim vim-nox exuberant-tags keepassx
  • Configure x11vnc:
    • Ensure a password is setup:
      • # x11vnc -storepasswd SOME_PASSWORD_I_WANT_TO_USE /tmp/x11vnc.pwd
        # sudo cp /tmp/x11vnc.pwd /etc/x11vnc.pwd
    • Setup the x11vnc startup script:
      • # echo -e "[Unit]\nDescription=Start x11vnc at startup.\\n\n[Service]\nType=simple\nExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pwd -rfbport 5900 -shared -o /var/log/x11vnc.log\n\n[Install]\" > /tmp/x11vnc.service
        # sudo cp /tmp/x11vnc.service /etc/systemd/system/x11vnc.service
        # sudo systemctl daemon-reload
        # sudo systemctl enable x11vnc
        # sudo systemctl start x11vnc
  • Ensure the laptop doesn’t suspend / hibernate on lid closed:
    • # cp /etc/systemd/logind.conf /tmp/logind.conf
      # echo -e "# per\nHandleLidSwitch=ignore" >> /tmp/logind.conf
      # sudo mkdir -p /etc/systemd.bak && sudo cp  /etc/systemd/logind.conf /etc/systemd.bak/logind.conf.backup.`date +%s`
      # sudo cp /tmp/logind.conf /etc/systemd/logind.conf
  •  Reboot

Coming Together
I use VNC Viewer from Real VNC, which has variants on Mac and Android. For everything else, there are ssh clients. Screensaver is configured to blank and locks screen in 2 minutes.

Leave a Reply

Your email address will not be published. Required fields are marked *