Archive for Linux

Fix No gksu(do) Permissions Prompt on Gparted, Synaptic, Mounting Drives, Etc. in Debian

I run Debian Stretch (testing) as my daily driver, and at some point I stopped being able to start programs like start Synaptic, Gparted, Synaptic etc. without manually typing gksu(do). The solution is as simple as it is seemingly unnecessary and stupid:

sudo apt install policykit-1-gnome

The problem is apparent upon reading the description:

This implementation was originally designed for GNOME 2, but most
GNOME-based desktop environments, including GNOME 3, GNOME Flashback,
MATE and Cinnamon, have their own built-in PolicyKit agents and no
longer use this one. The remaining users of this implementation
are XFCE and Unity.

Reported as Debian bug #843224. My first?

D’oh, I wrote this on November 5, 2016. I’ll still publish it anyway in case it’ll still help someone searching for a solution.

CommentsTags: ,

Workarounds for Turning Off Your DisplayPort Monitor

Sometimes you jot down a few quick notes for yourself without bothering to turn them into a blogpost that might be useful to others. This is one of those notes. First, I’ll introduce my computer monitor workflow as it’s been since time immemorial, also known as ’95 or ’96. Just like how I turn off lights I don’t use, I’ve always turned off my monitor when I wanted it. This has never been a problem, until in early 2015 I had to use DisplayPort for the first time. If you want an UltraHD monitor, which you do if you care even the tiniest bit about sharpness and clarity, you have to use DisplayPort.

But DisplayPort isn’t nice. Turning off your monitor is treated the same as disconnecting it. In Windows this means everything resets itself to some absurdly low resolution, whereas in Linux the consequences can be even worse (like having to SSH in from another computer to run an xrandr command to reactivate the monitor). This means you either face a colossal waste of energy or continuous annoyance at the fact that your monitor has turned itself off yet again. In my view monitor timeouts should be at least twenty minutes, just as a failsafe in the extremely unlikely event that you forgot to turn it off. Luckily I found two reasonable workarounds within the first week or two of having acquired my UHD monitor.

The first?

xset dpms force off

This has the same effect as your monitor timeout, only at your volition. I tend to find the blinking light on the monitor somewhat annoying, but this nevertheless remains your best bet to quickly turn the screen off as part of your regular workflow.

The second method consists of actually turning the monitor off. Besides getting rid of the blinking light I figure it saves just a tiny bit more electricity to boot. Which is useful if you want to keep your computer active, but not your monitor. For this method you have to switch to TTY (Ctrl + Alt + F1-6) before turning your monitor off. Then when you turn your monitor back on, X won’t know it’s been missing. Switch back with Ctrl + Alt + F7.

I’m still hopeful that there might simply be an xorg.conf setting I’ve overlooked, but in any case these workarounds serve their purpose. Note that xset dpms force off is also tremendously useful on laptops that don’t have a function key for turning off the screen. Standby often just isn’t what you want.

CommentsTags: ,

Scanning with an HP MFP (multi-function peripheral) on Debian

You need to install hplip. It looks like something’s still off about the colors compared to Ubuntu and Windows, and I can’t figure out what the difference is. Alas. :/ Also, don’t buy HP.

CommentsTags: , , ,

Less is More

A minimal Debian install comes without the ability to view man pages. Fair enough, it’s minimal after all. But they can be quite useful. A sudo apt install man later results in man pages being shown. That’s all, folks? Unnfortunately not, because the man pages are shown using the more command, which doesn’t allow for scrolling up and down with the arrow keys or j and k, Pg Up and Pg Dn, and all the other usual niceties. To fix you need to sudo apt install less, a “pager program similar to more.” And better, at least on any machine with sufficient RAM. Meaning anything anyone is likely to use in 2016, or probably also in 1990 for that matter.

CommentsTags: ,

Let’s Encrypt on Debian/Jessie

Wow, that was easy. I’ve been reading about Let’s Encrypt all over the place, and I wouldn’t like any snooping on my feeds password, now would I?

  1. Add the jessie-backports repository.
  2. sudo apt install -t jessie-backports certbot python-certbot-apache
  3. sudo letsencrypt --apache -d [-d]

This stuff expires every 90 days, so you still need a cron job to renew.

sudo crontab -e

Let’s say 4 at night every Sunday.

* 4 * * 0 letsencrypt renew >> /var/log/letsencrypt-renew.log


CommentsTags: , ,

Cloud, Kluit, Clod?

Just a quick demonstration of the power of I dubbed my “personal cloud” experiment kluit: a Dutch word meaning both clod and the ball of earth around the roots of a tree. In other words, kluit is firmly grounded because you’ve got your own ground with you wherever you go. Be like Dracula. With a name in mind, I also wanted a matching logo. Following a quick search for leaves, root (or was it tree) and after a little initial play something like attraction, this is the quick and satisfying result.

A couple of floating leaves still connected with their roots. This arrangement symbolizes how creating your personal cloud keeps it grounded.

And of course the remix is free for all. Enjoy.

Comments (1)Tags: , , ,

Using Syncthing to Replace Dropbox on Android

According to the timestamp on Getting Started.pdf, I’ve been a happy Dropbox user since 2010. For probably equally many years, they’ve had the most obnoxious Android app. Perhaps I don’t want to put my whole Dropbox on my Android phone (although I’m not so sure I don’t), but obviously you should be able to select a whole directory to sync. Solutions like Dropsync are unfortunately super slow, probably because it seems to be mostly a clever hack that syncs files one by one.

Instead of a similar alternative, I’ve really always been irked by the lack of an easy to use Unison-like sync for my phone. Running Unison in a chroot just doesn’t quite cut it… The obvious solution is something like Syncthing or Bittorrent Sync, which works regardless whether or not there’s a remote server involved. And if there is, it’d be a remote server under my own control.

Syncthing isn’t ideal because of its lack of subdirectory selection. But since in reality it’s almost exclusively a one-way street anyway, it doesn’t matter so much. The main point is that this is all easier than running an FTP server on the device, plugging it in over USB, running a webserver on it to drop files into a browser window or whatever other overly complicated solutions might exist. To install Syncthing, get it on F-Droid. Or Google Play, if you don’t think it’s obnoxious.

You can get by almost entirely on F-Droid alone. In fact it’s where most of the best software is found.

Unfortunately Syncthing can’t sync wherever. Oh well, we’ll just sync within its own directory instead.

On my phone, Syncthing can’t handle the MicroSD card, but we can trick it.

It’ll make some things a touch more complicated. Maybe a symlink? Oh drat, FAT32 strikes again. Meh.

Aard Dictionary doesn’t care where it’s located.
Add a favorite, a shortcut, or both. It’ll be difficult to interact with the directory otherwise.

The sync problem isn’t really solved yet, but it’s sure a lot better. All in all, Android is still awful and you should probably consider getting an Ubuntu Phone instead. The end.

As for Syncthing, perhaps its most interesting property is that it can largely replace both Dropbox and Unison. In fact it can probably completely replace Unison for me, because I haven’t actually bothered replicating my stuff onto a separate physical HDD in years. And Syncthing definitely makes it easier to add more of my laptops and whatnot into the mix. On the flipside, the fact that I run Unison once a week or so forces a kind of built-in review of the changes I made, so I can undo them if desired. In this way it’s more like a backup. But of course, Syncthing can sync between more than two computers at once, while the changes are happening. It’s worth a look, if nothing else.

Comments (1)Tags: , ,

xorg.conf: EmulateWheel stopped working on libinput update

I didn’t spot it in the Debian changelog, but apparently the latest libinput10 update on Debian/stretch (unstable) broke my EmulateWheel option. Because the scroll ring on my trackball is broken, it’s all I’ve got. It’s also rather nice on trackballs without any kind of scrolling functionality at all, such as the Logitech Trackman Marble.

Let’s start by examining my current xorg.conf:

$ cat /etc/X11/xorg.conf 
Section "InputClass"
	Identifier	"Kensington Trackball"
	MatchProduct	"Kensington Expert Mouse"
	Option		"SendCoreEvents" "True"
	Option		"ButtonMapping" "0 1 2 4 5 6 7 3"
	Option		"EmulateWheel" "True"
	Option		"EmulateWheelButton" "1"

Scanning man libinput doesn’t list any entries for those options anymore, but it does contain the following:

Option "ScrollButton" "int"
Designates a button as scroll button. If the ScrollMethod is button and the button is logically held down, x/y axis movement is converted into scroll events.
Option "ScrollMethod" "string"
Enables a scroll method. Permitted values are none, twofinger, edge, button. Not all devices support all options. If an option is unsupported, the default scroll option for this device is used.

Note how this would allow you to disable two-finger scroll on e.g. our Wacom drawing tablet if you don’t like it. (But I do!) In any case, adjusting my xorg.conf accordingly:

Section "InputClass"
        Identifier      "Kensington Trackball"
        MatchProduct    "Kensington Expert Mouse"
        Option          "SendCoreEvents" "True"
        Option          "ButtonMapping" "0 1 2 4 5 6 7 3"
        Option          "ScrollMethod" "button"
        Option          "ScrollButton" "1"

Works like a charm. Better yet, it now also scrolls horizontally. Which can be disabled with Option "HorizontalScrolling" "false" if you so desire. All’s well that ends well.

Comments (4)Tags: , ,

SSH publickey denied?

I was suddenly having trouble connecting to GitHub, after pulling in an OpenSSH update to version 7. Chances are that means the problem is security-related, meaning it’s worthwhile to take the time to investigate the cause.

$ git pull
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

A little debugging showed the following:

$ ssh -vT
OpenSSH_7.1p2 Debian-2, OpenSSL 1.0.2f  28 Jan 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to [] port 22.
debug1: Connection established.
debug1: Skipping ssh-dss key /home/frans/.ssh/id_dsa for not in PubkeyAcceptedKeyTypes
debug1: No more authentication methods to try.
Permission denied (publickey).

Of course I could quickly fix the problem by adding PubkeyAcceptedKeyTypes ssh-dss to ~/.ssh/config, but checking tells me that “OpenSSH 7.0 and greater similarly disables the ssh-dss (DSA) public key algorithm. It too is weak and we recommend against its use.” So, although I could obviously re-enable it easily, I guess I’ll have to generate a new key. I hope GitHub’s guide is accurate for generating something sufficiently secure, because I’m kind of ticked off that something I generated in 2013 is already considered “legacy.” I hope I’m to blame and not an earlier version of GitHub’s guide.

Incidentally, to change the passphrase one would use the -p option, e.g.:

ssh-keygen -f id_rsa -p


LuaLatex Font Hassles

The TeX Gyre Pagella font I was using turned out not to contain Cyrillic characters. Unfortunately, fontspec doesn’t seem to have an easy means of setting a fallback font — I checked the manual, I swear! So I found a lookalike font named Palladio Uralic and used it instead. Before you can use a newly installed font, you have to run luaotfload-tool --update.

%So is Palladio. Used as fallback. Thanks to
\newfontfamily\palladio{Palladio Uralic}


« Newer EntriesOlder Entries »