Monday, June 15, 2020

Slackware64-current with KDE Plasma in Parallels Desktop on macOS

Introduction

I like working from macOS (Catalina, 10.15). I have my habits since 2006 and, now, with iTerm2 + zsh and a few plugins, plus other software (TextMate...), life is good. But there will always be that one moment in your work life where you find yourself wishing you had a GNU/Linux distro at hand, just to try something real quick. Anyway, that's my case.

Unfortunately, I was in a bit of a conundrum: I have the bad habit of getting every distro with a package manager FUBAR in a few months' time. Yes, I'm looking at you, Debian, and at your derivatives [OpenSUSE: you're ok; for everyone else: YMMV]. In macOS, I'm using Parallels Desktop, so at least it's easy to save a working version of the virtual machine before attempting things. I have had some very good luck running OpenSUSE Tumbleweed in Parallels Desktop in the past years, but for some reason when I installed it yesterday it... Didn't ran, and just spent time taking 100% of the processors in the VM (I let it run on 6 cores, 4GB RAM, 1GB video RAM) while trying to load the desktop, after an installation process that went quite well.

I decided to go back to my early teenager-years distro: Slackware, and to what's in my opinion the best desktop environment of this time, KDE Plasma (I've always had a soft spot for Enlightenment, howerver, and I find that the Solus distro gives good options and a nice desktop [with Budgie/Gnome/Mate/Plasma available], for anyone wanting something simple -- but it doesn't work well in Parallels Desktop). Due to a specific Wifi driver in the beginning of the 2000s, I had to use Slackware and recompile the kernel to get Internet to work. I learnt a lot. Would that still work in 2020? Yes, with a few limitations.

Limitations

Let's get right now to the limitations: I haven't been able to install Parallels Tools. As such, I don't have access to my macOS folders from Slackware, neither can I resize the Parallels window to have the X server change the resolution. I tried installing Parallels Tools using the "hack" of deleting the check for requirements (particularly the package manager) but it borked my Xorg install, so use at your own risk.

Installation

Installation itself went smoothly: download the DVD in torrent, select it as boot device in Parallels, and choose your packages. I did make one more partition than needed, for /boot/, because I knew I wanted to go the grub way. I deselected all the KDE packages, as they are part of the KDE 4 version. After installation, I choose to not install Lilo and followed the procedure here to install grub at first install.

After the first boot, I created a user, and followed the mkinitrd procedure here, just to have a cleaner boot. I initially tried adding my configuration in /etc/grub.d/40_custom but after a few updates & upgrades the new kernel was automatically added to grub.

Upgrade

I followed the system upgrade procedure here: blacklist the kernel in /etc/slackpkg/blacklist, manually upgrade the kernel and modules (by downloading them from one of the mirrors), update the initrd, and finally select a mirror for slackware64-current in /etc/slackpkg/mirrors
 
A last grub update :
 
# grub-mkconfig -o /boot/grub/grub.cfg
 
Then: 
# slackpkg update gpg
# slackpkg update
# slackpkg upgrade slackpkg
# slackpkg upgrade glibc-solibs
# slackpkg install-new
# slackpkg upgrade-all
# slackpkg clean-system
# slackpkg new-config
Then a reboot, for luck.

Plasma 5

Installing Plasma 5 can be a bit daunting, if you look at the readme file. But, thanks to AlienBob and Epsi, the procedure is quite simple. First, make sure your system is up-to-date and everything, then manually install slackpkgplus. Enable (add) the ktown repository in /etc/slackpkg/slackpkgplus.conf, and continue the procedure following Epsi's instructions (update GPG, update, etc.).

As root, I deleted (just for luck) /etc/X11/xorg.conf-vesa and didn't run X -configure. With Parallels Tools, I had the "EE No usable screen(s) found" error in X, but by default this seems to work fine! 

Finally, as a user, I launched startx just to make sure, and then in xwmconfig I selected the Plasma Desktop.

When I was sure that everything was setup right, I changed the init to level 4 in /etc/inittab, and rebooted to KDM. I was able with a bit of fiddling to get my MacBook Pro keyboard working with the right layout in Plasma, and to configure zsh as I wanted (in Konsole).

That's it! If you had any luck installing Parallels Tools and getting X to work in Slackware64-current on Parallels Desktop, please let me know. If you have questions about my setup, I'll be happy to answer them in the comments.