14/07/2016
Reminder: password protect PDF files.
pdftk inputfile.pdf output outputfile.pdf userpw somepassword
18/06/2016
If Plasma's network manager doesn't display available networks after suspend/lock screen/etc....
sudo service network-manager restart
Bingo.
31/05/2016
Damn you, kscreen
Actually, I like kscreen. The desktop display configuration interface is clicky, draggy and intuitive, and apparently they store settings for specific external monitors by EDID and feed them into xrandr once you connect the monitor.
Enter my Zenbook, various microHDMI to VGA/HDMI dongles, external monitors and projectors. What happens, usually 10 minutes before an important presentation, on a bus without internet and my boss getting antsy, is KDE presenting me with a black screen and the mouse pointer stuck at the top screen edge. Panic mode fix: create a new user from the terminal. In the end I was stuck with 3 different temporary user accounts and no graphical interface unless the µHDMI to VGA dongle was plugged in. Don't judge me, I was overworked.
Still, the troublesome configuration had to be somewhere in my home directory, so I needed to do some more creative renaming, i.e. .kde to .notkde, restarting sddm and praying to the deity of the moment.
Kscreen's config files happened to be in ./local/share/kscreen, I just deleted them all, problem solved.
Got a kernel update in the process and now I need to consolidate user accounts…
Update: As of 09/2020, kscreen still has problems with dongles. (PD USB-C hub with HDMI, XPS13 with BenQ screen) I got sick of constantly nuking the config files and tried apt remove kscreen. Config files still got written. Turns out you have to disable the kscreen service (System Settings->Startup). And now I'd better get used to Xrandr.
03/02/2016
Three KDE5 quirks bugging me most right now
Plasma 5 is gorgeous, but still a bit experimental in places. Erm, make that six and counting.
- Baloo desktop search. Once the index is written (takes hours on first run), it's actually usable. However, the config dialog in the system settings is incomplete. You're better off editing ~/.config/baloofilerc, as explained here:
https://community.kde.org/Baloo/Configuration
Also, entirely disabling baloo search knocked out Dolphin's nice in-browser file search. - Dolphin hangs on startup in the home directory when hidden files are set to visible and Kile is running at the same time. (caused by Kile's ~/.lyxpipe.in and ~/.lyxpipe.out) Apparently fixed upstream: https://bugs.kde.org/show_bug.cgi?id=352828
- The device notifier has lost the automount configuration. There's a hack using the kde4
versions:
Edit /usr/share/kde4/services/kded/device_automounter.desktop using the following line (value was 1 before): "X-KDE-Kded-phase=0"
Use kcmshell4 kcmkded and kcmshell4 device_automounter_kcm to enable and configure automounting. Apparently fixed upstream as well.
Source: https://forum.kde.org/viewtopic.php?f=289&t=126846 - Dolphin context menu is missing the Ark extraction services. Fixable by sudo ln -s /usr/share/kde4/servicetypes/konqpopupmenuplugin.desktop /usr/share/kservicetypes5/
Source: https://bugs.launchpad.net/ubuntu/+source/dolphin/+bug/1499530 - Dolphin etc. doesn't remember changes in mime type associations. Apparently it reads from one mimeapps.list file and saves to a different one. The solution is to link both to the same file.
ln -s ~/.local/share/applications/mimeapps.list ~/.config/mimeapps.list
Source: https://bbs.archlinux.org/viewtopic.php?id=202636 - Dolphin doesn't display PDF previews, even though they can be enabled in Preferences with kdegraphcis-thumbnailers installed.
Workaround: sudo ln -s /usr/lib/x86_64-linux-gnu/plugins/* /usr/lib/x86_64-linux-gnu/qt5/plugins/ Sources: https://bugs.kde.org/show_bug.cgi?id=351913 http://osdir.com/ml/ubuntu-bugs/2016-04/msg19852.html
30/11/2015
apt-get update gets stuck
Apparently, this was caused due to IPv6 being enabled on my system. See this askubuntu discussion.
Fixes (as copied from the link above):
- edit /etc/gai.conf and uncomment the last line to change the order of precedence to IPv4 first:
#
# For sites which prefer IPv4 connections change the last line to
#
precedence ::ffff:0:0/96 100 - Alternative: disable IPv6. Not sure whether that is a good idea, so first try option 1. Anyway, you can reverse this action by deleting the lines added to /etc/sysctl.conf (everything below #disable ipv6).
echo "#disable ipv6" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p - Check whether IPv6 is enabled with cat /proc/sys/net/ipv6/conf/all/disable_ipv6, output is 0/1 for enabled/disabled.
- "Have you tried switching it off and on again?"
27/11/2015
Bunched up fonts in printing (from Okular)
Pull up the "Fonts" tab in File->Properties… and look for non-embedded fonts in the document. In this case, Helvetica is substituted wrongly.
<test qual="any" name="family"><string>Helvetica</string></test>
<edit name="family" mode="assign" binding="same"><string>Arial</string></edit>
</match>
</fontconfig>
Afterwards, I ran fc-cache from a shell and checked whether the substitution was correct:
$ fc-cache
$ fc-match Helvetica
Arial.ttf: "Arial" "Normal"
Note: I didn't delve into why the substitution went wrong. Tex Gyre Hero actually seems to be working Helvetica substitute, and the weird bunching showed up all over the printout, not just in the sans serif parts. Whatever, it worked.
Note2, January 2024:
Another reason for misidentified fonts is if the font name encoded in the TTF file is different. In that case, changing it to what Okular expects works as well. See thisHowTo and handy python script provided by David Condrey on Superuser.
14/09/2015
Adding matplotlib to locally installed blender
https://eumenidae.blogspot.com/2020/01/installing-external-python-modules-for.html
I had some trouble getting a local blender 2.75 in my home directory to use matplotlib - using the system wide python3.4 for some reason failed, so in the end I just copied over files to the local version until blender stopped complaining.
Required packages for Ubuntu 14.04: python3-pyparsing, python3-dateutil¸ python3-matplotlib, python3-cycler, python3-six. Using the following destination root directory ~/bin/blender/2.75/python/lib, I copied these files and folders:
| source | destination |
| /usr/lib/python3/dist-packages/pyparsing.py | python3.4/site-packages/ |
| /usr/lib/python3/dist-packages/dateutil | python3.4/site-packages/ |
| /usr/lib/python3/dist-packages/matplotlib | python3.4/site-packages/ |
| /usr/lib/python3/dist-packages/mpl_toolkits | python3.4/site-packages/ |
| /usr/lib/python3/dist-packages/pylab.py | python3.4/site-packages/ |
| /usr/lib/python3/dist-packages/cycler.py | python3.4/site-packages/ |
| /usr/lib/python3/dist-packages/six.py | python3.4/site-packages/ |
| /usr/lib/python3.4/distutils | python3.4/ |
26/03/2015
KDE spell check, personal dictionary
According to https://forum.kde.org/viewtopic.php?f=20&t=98628, it's text files in the
~/.config/enchant folder, so for each localisation you're using, just edit the word list in e.g. 'en_GB.dic'.
For changes in the list to take effect, switch to a different localisation and back again.

