This is a big note to myself about fixes, workarounds I find useful while using GNU/Linux Debian unstable with Plasma/i3 as my daily system. You’ll basically find a list of problems followed by the solution(s) that worked for me. AND some cool things to do with Linux in general.

Contents

  • Hangouts screensharing with Chromium not working
  • Tracking configuration files
  • chsh: PAM authentication failed
  • Use i3 as windows manager on the top of Plasma
  • Play DRM content on Chromium
  • External HDD and Plasma
  • GTK Themes not working as expected
  • Android Virtual Device - not starting with hardware acceleration
  • Steam - Source-based games not starting
  • Steam - ‘failed to load steamui.so’
  • LibreOffice looks ugly in Plasma
  • Debian: mixing repositories
  • Plasma - Disable mysql and akonadi
  • Plasma - Custom launchers in Icon-Only Task Manager (Taskbar)


Hangouts screensharing on Chromium not working

If you try and enable the screen sharing feature during a call on Hangouts on Chromium on Debian, it happens absolutely nothing, no error is reported.

This is because the Chromium package in the debian repositories is built with the enable_hangout_services_extension=false flag (every other feature of Hangouts actually works).

You can download the source, edit the rules file and enable that flag. The produced Chromium package will have the screen sharing feature correctly working.

Check here to see the detailed build instructions or to download the ready binary.

Another option is using Firefox ESR.

Context: debian Sid - August 31, 2017 - chromium_60.0.3112.78-1

Tracking configuration files

Manually setup a git repo in /etc or take a look at the etckeeper package. Don’t use a public repository, /etc can expose sensitive data such as password hashes or private keys.

apt get install etckeeper git incrontab

nano /etc/etckeeper/etckeeper.conf , set VCS="git" (comment the other options) and set PUSH_REMOTE="origin".

# Go to the configuration directory.
cd /etc
# Initialize etckeeper.
etckeeper init
# Add the remote repository.
git remote add origin git@HOSTNAME:REPONAME
# First commit.
etckeeper commit "Initial commit."
# Set the upstream and push.
git push -u origin master
exit

You can use https and username:password@HOSTNAME/REPONAME.GIT while adding origin to automatically do things on behalf on that user.

Now, let’s tell incrotab to trigger an automatic commit on every created, modificed or deleted folder or file in /etc :

# Edit incrotab jobs
incrontab -e 
# Add this line
/etc IN_MODIFY,IN_CREATE,IN_DELETE,IN_MOVED_TO etckeeper commit "incrontab trigger"


chsh: PAM authentication failed

If you keep getting PAM authentication failed when trying to change shell, even when running as root, you probably have some invalid settings. Change the shell manually using vipw /etc/passwd. chsh should be back working now.

vipw can be used to safely edit /etc/shadow and etc/group, too.

Use i3 as windows manager on the top of Plasma

It’s possibile and works well. Look here


Play DRM content on Chromium

You need the widevine plugin, which ships with Chrome and Firefox by default but isn’t available for Chromium.

Install the package chromium-widevine. If the problem persist, manually copy the files libwidevinecdm.so and libwidevinecdmadapter.so from a Chrome install (/opt/google/chrome/) to /usr/lib/chromium/.


External HDD and Plasma

Long story short: you should pay attention using external (mechanical) HDDs with Plasma. The bug is 7 years old and it’s just being ignored (or just not considered a bug).Plasma isn’t spinning down external HDDs and turning off them off while still being powered causes damage, so you have to pay attention on what happens when you mount/unmount them. I’ve experienced no spin-down till 5.7 and if you manually do that, Plasma just keeps forcing its setting. Here are some workaround for this specific issue:

  • Turn off your computer, remove disk, turn on your computer.
  • Kill X server, udiskctl spin down, start X server.
  • Eject in dolphin, hdparm -y /dev/sdb, press HDD enclosure power button/Remove USB cable to external HDD.

However, this eventually stopped happening (not sure if this was a debian-patch, another debian package related thing, KDE 5.8.x or me messing up so take this with a grain of salt) but it started putting my HDD to standby-mode (spinned down but still mounted) after a 5 seconds inactivity timeout and making the drive basically useless without copying locally the files. Here’s how you force another standby value:

sudo hdparm -S 245 /dev/sdb (= spindown after (245-240)*30 minutes)

Keep in mind that you will still be subject to the hardware timeout of the HDD itself. If you want to keep this setting between reboots you can edit the /etc/hdparm.conf as follows:

/dev/sdb {
    spindown_time = 245
}


GTK Themes not working as expected

You need these packages: gnome-accessibility-themes gnome-themes-standard-data gnome-themes-standard gtk2-engines-pixbuf. To make GTK applications integrate well into KDE you can use qtcurve or oxygen-gtk-theme (sort of uniform look).

And here’s some GTK2 and GTK3 themes (Arc Dark package).

If you still having problems with a theme, that’s probably because GTK 3.2 broke everything.


Android Virtual Device - not starting with hardware acceleration

libGL error: unable to load driver: i965_dri.so or GLX generic errors.

If you can’t launch the emulator from Android Studio with hardware emulation enabled because of these errors it’s probably because the AVD is starting using wrong versions of the libraries.

Manually start the emulator and append -use-system-libs as flag, like this:

avivace@debian-tp:~/Android/Sdk/tools$ ./emulator -avd AVD_NAME -use-system-libs

The emulator starts with default console port 5554 and should be automatically seen as available device by Android Studio.

As of 11/13/2016, it’s not possibile to change the default args/flags Android Studio uses to launch the AVD because the Emulator tab is missing from the Configuration dialog (it’s a known bug from Android Studio v1.5).


Steam - Source-based games not starting

Confirmed to help with Portal, The Stanley Parable with these errors on start:

error while loading shared libraries: libtcmalloc_minimal.so.4: cannot open shared object file: No such file or directory
error while loading shared libraries: libtcmalloc_minimal.so.4: wrong ELF class: ELFCLASS64

SDL failed to create GL compatibility profile (whichProfile=0!
SDL failed to create GL compatibility profile (whichProfile=0!

Be sure to have these libraries installed: libtcmalloc-minimal4:i386 libtxc-dxtn-s2tc0:i386 libstdc++.

Rename every occurency of the file libstdc++.so.6 to libstdc++.so.6.old inside every Steam folder and every Steam game. This will make the game use the system version and not the ones bundled.

Start the game from Steam.


Steam - ‘failed to load steamui.so’

Dependencies!

  • Run sudo dpkg --add-architecture i386,apt-get update
  • Install the following packages:libgl1-mesa-glx:i386 libc6:i386 libgl1-mesa-dri:i386.
  • Add non-free in sources.list and install Steam from the repos apt-get install steam


LibreOffice looks ugly in KDE Plasma

Install libreoffice-gtk3 and libreoffice-kde packages.


Debian: mixing repositories

Just to name a few, Teamviewer, megasync, and MATLAB requires some dependecies that are still not in stretch/debian repo.

Tuning apt preferences and sources you can mix repositories and satisfy some dependecies with packages from backports, testing or even experimental, just expect something to break (you shouldn’t do this on a production system).

Some useful resources to start playing around with apt:


Disable mysql and akonadi

You can disable the indexing editing ~/.config/akonadi/akonadiserverrc with StartServer=false.


Custom launchers in Icon-Only Task Manager (Taskbar)

If you want a custom command as a launcher in the taskbar, you’re gonna have a hard time.

Manually create your launcher in /usr/share/applications/ and drag-and-drop it to the taskbar when you are ready. KDE does some kinds of black magic validation on the file, so make sure that the launcher

  • has a .desktop extension;
  • has correct permissions -rw-r--r-- ;
  • complies with the following bare bones structure.
[Desktop Entry]
Comment[en_US]=
Comment=
Exec=Command 'fileToOpen'
GenericName[en_US]=GenericNameenUS
GenericName=GenericName
Icon=/home/user/icon.png
MimeType=
Name[en_US]=Name_enUS
Name=Name
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=

I have en_GB as locale but it keeps reading Name and Description from the en_US strings. I kept the placeholders so you can actually see where they are showing.

To force a reload of the launcher, remove it and drag-and-drop it again.