Installing Kubuntu

So basically I want to run KDE Plasma under Ubuntu and this can be called Kubuntu.

This article is a little bit cargo-clutish. I.e. “I did this and it seemed to work.” and “I don’t do this because it didn’t seem to work.”

I have a pretty heavy reliance on Salt Stack for system configuration. My salt config is all built around Ubuntu 18.04 LTS.

When I need to install a Kubuntu desktop, this is how I do it:

  1. install Ubuntu Server 18.04 LTS from live installer
  2. apt update && apt dist-upgrade && apt autoremove && reboot
  3. apt install kubuntu-desktop && reboot
  4. apt install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11 && reboot
  5. apt install salt-minion
  6. vim /etc/salt/minion_id
  7. vim /etc/salt/minion.d/minion.conf
    • master: salt.staticmagic.net
  8. service salt-minion restart
  9. salt-call state.highstate

Note that if your Kubuntu install is a VirtualBox guest you need to start it with a normal start if you want the shared clipboard to work. If you start headless or detachable the shared clipboard will not work (in my experience).

If your Kubuntu install is not a VirtualBox guest you can skip the virtualbox-guest-* package installation above.

Changing parent’s directory from a subshell

I was trying to figure out how to have a child process change the current directory of a parent process. Turns out you can’t quite do that. One thing I guess you could do is export a global variable and then have the parent check that when the child returns, but I decided on another approach. What I do is write a file to ~/bin/errdir that contains a single line in the format:

  pushd "/path/to/directory"

I can then source this as a command file after my script has run to change directory into the directory where the last erroneous file was encountered with the command:

  $ . errdir

When I’m finished I can just type ‘popd’ to return myself to wherever I was before I changed into the error directory.