11 September 2018

Solving "device not managed" for Ethernet connections in Network Manager

At some point or another, Network Manager in Debian sid stopped managing my Ethernet connection. The source of the issue is /etc/NetworkManager/NetworkManager.conf:


The [ifupdown] clause seems to be telling NM not to do it. The solution is to turn the frown upside down, but doing so in NetworkManager.conf means the setting will likely be clobbered the next time NM is updated. The solution to that is to create a file in in conf.d named 10-globally-managed-devices.conf. NM upgrades should leave custom files in conf.d alone.


28 August 2018

Solving Pixel Launcher closing in Android Emulator

After quite a while away from Android development, I’m back (I think). And it seems the state of Android emulation on Linux continues to be fraught. :-(

The latest issue I've had was in an Android 7.1.1 (API 25) AVD, where the app launcher kept crashing after launching something every single time. User weiyin’s response to here solved it for me. In short, the workaround consists of turning off "App suggestions" in the Pixel Launcher app.

You have to use the command line for this because if you try to get to the Pixel Launcher’s settings from the UI (Settings > Apps > etc.), the Pixel Launcher stops when you try to launch its settings screen! Instead, with the AVD running do this magic foo:

$ cd {your-path-ro}/Android/Sdk/platform-tools
$ ./adb shell am start com.google.android.apps.nexuslauncher/.SettingsActivity

From there you can turn off the offending setting.

06 August 2018

The new su PATH behavior

The su command that's now being packaged with Debian sid has significant change in behavior. In the past, when you did an:
$ su
the PATH would get set to root's PATH. Now, it remains the user's path:
$ su
# echo $PATH
This means you won't pick up /usr/sbin where a lot of commands you'd typically use with root privileges live.

The fix to this is that you now have to append a dash to the command:
$ su -
# echo $PATH
I don't know whether this impacts gksu or if sudo and/or gksudo are affected. gksu is affected as well, but with gksu there doesn't appear to be a way to get back to the old behavior.

12 January 2018

Fixing Skype for Linux scaling

After a long hiatus from (actually a deliberate avoidance of) Skype, I need to install it again -- at least temporarily. And the latest version of Skype for Linux is appears to be an Electron app, which means its scaling on my non-standard 118 dpi screen is seriously wonky.

The typical fix for this with Chrome/Chromium and Electron apps is to pass the --force-device-scale-factor option to the executable. Applying this option to Skype works as well, but you need to dig a bit to find where to add it. I ended up modifying /usr/bin/skypeforlinux so the last line reads:

nnohup "$SKYPE_PATH" --force-device-scale-factor --executed-from="$(pwd)" --pid=$$ "$@" > "$SKYPE_LOGS/skype-startup.log" 2>&1 &

23 January 2017

Fixing Chromium remote extension loading in Debian sid

The newest Chromium in Debian sid disables remote extension loading by default. This has the effect of disabling extensions en masse. I'm not sure what the reasoning is, but it's damn inconvenient.

It's claimed that one way to get the old behavior back is to add


to the list of flags in /etc/chromium.d/default-flags. This will affect all users on the system, and the file could be overwritten by an upgrade. In addition, until I know better what's behind the change, I'd really like to apply the change only to my account, not to all users.

I did this by adding:
# fix latest Debian Chromium disabling remote extensions
export CHROMIUM_FLAGS=$CHROMIUM_FLAGS" --enable-remote-extensions"
to my ~/.profile. Be sure to log out and back in to experience the change.