Category Archives: Other tech

Oversized KDE and QT programs in MATE.

Published / by Andrew

I just fixed a couple of very annoying problems related to Linux desktop, and I thought I’d write a couple of blog posts on the subject.

The first topic is oversized KDE/QT programs running in MATE. This was extraordinarily frustrating to figure out. There aren’t a lot of resources on running KDE software in non-KDE environments that I can find, and to make matters worse, KDE seems to be a trainwreck. The systemsettings program just crashes when I try to change settings, the debugger crashes when I try to generate the report, their website just says “File not found”, and to make matters worse, this happens during the Reddit blackout, which is where most search results lead me.

(Sidenote: Are people only just now realizing that the people running Reddit are evil? We need a different site, for heaven’s sake, preferably one with Reddit’s older interface without the js bloat and one that doesn’t censor political dissidents.)

TL;DR– Jump to bottom where it says “Here’s the solution”.

It took me awhile to figure out that it’s determined by a variable called `QT_SCALE_FACTOR`. It *should* be 1, but somehow it’s getting set to 2. Where this variable is being set has been a mystery because I’ve found it being set nowhere, *and* the value that I explicitly set in `~/.profile` is being overridden when X starts. I grepped my entire drive and found no place that that value was being set. I just knew it was being set *only* when X is running, because when I log in to CLI, it’s set to 1. After I run `startx`, it changes to 2.

(Sidenote: Please, please do not set environment variables like this! Always make sure any script or binary file setting environment variables is viewable via grep, because otherwise it’s a nightmare to find where a variable is being set when trying to solve problems.)

Here’s the solution:

I never did find out where that was being set, but I did find out what setting to change in MATE to fix it. To my surprise, it’s not a KDE or QT setting– It’s in Monitor Preferences (System -> Preferences -> Hardware -> Displays), and it’s the “Scaling” section here.

Those radio buttons only seem to affect QT programs. Mine was set to “auto detect”, but it needs to be set to 100%. That’s it. It was really that simple in the end, but it was made unnecessarily difficult.

An idea for anonymous blogging

Published / by Andrew

I’m trying to think of a way to have a completely anonymous “blog” of sorts that’s not in the dark web. I’m sure there are already many solutions to this, but my basic idea is using the copypasta format with encryption. The text itself contains what’s needed to maintain the anonymity and it can be copy-pasted anywhere.

And it’s certainly possible that this exact idea or a better version of it is already in use.

My current idea is chaining hashed messages. To be clear, I am not an expert on encryption– This goes by my memory of Cryptology in grad school.

As some background, a hashing algorithm is used to store passwords. (Usually salting and hashing, but we’re only going to be focusing on hashing here.)

A hash is what’s called “one way” encryption. That term can technically mean many things, but in our case we specifically mean that anything can be encrypted, and nothing can be decrypted. So, what’s the point, then? Validation. I can hash something you give me to make sure it matches a value that we already have.

Imagine Rumplestiltskin. He won’t tell me his name, but I can guess as many times as I want. As soon as I get it right, he’ll tell me that I got it right.

The hash value and algorithm are Rumplestiltskin. I can’t get the message out of the hashed value or the algorithm, but as soon as I guess right, they’ll tell me it’s right

It’s validation, and it’s why we use it for passwords. (In practice, it’s more complicated than that, but that’s the idea.) It tells me “This password that this guy gave me matches the hash I have, so it must be right, even though I didn’t know what the password was.”

So, my goal here is to make messages that can spread via copy-paste and we can validate that they all came from the same source. Using the copypasta format (if you can call that a format), anybody can copy-paste it to social media, blog it, email it, print it, whatever. Using a hash algorithm, anybody can validate that all messages came from one source, while the source remains anonymous.

With all the background out of the way, here’s the basic idea: Every message is chained to the previous message using a hash. Essentially, every message has the following format:

{Message content}
{Password that matches previous messages hash.}
{Hash of next password, which will be secret until the next message is released.}

Of course the first message establishes the chain, so it would skip the password matching previous hash, since there is no previous hash.

Every individual message says “You’ll know the next message that comes from me because it’ll have the password that matches this hash.” Nobody will, in theory, be able to guess the password, but everyone will be able to validate it when it comes out.

There is one problem, though. What’s to stop someone else from copying the password and hash, or just the password, for that matter, and falsely claiming the message is linked to that password? Then we’d have two messages that both claim to be from the same source.

Maybe some blockchainy thing could solve that problem, but the only solution that comes to my mind is using a single source of truth from a trusted third-party source. Say, all messages will always be first posted to Pastebin, which I use as an example because you can post to it without an account and via the Tor network. If all messages will always be posted first to pastebin, then the first message to appear with the password will necessarily be the one from the correct source. Failing that, old-fashioned internet sleuthing should be able to find the first message posted with the password.

It’s certainly possible that there are holes in this idea or that it’s already super common and I was just oblivious. (There was one time when I had an idea for a new encryption method and it turned out to be what HBO used in the 80s to encrypt their stream, or something like that.)

I will also almost certainly never use this, myself. I’m not interested in being the type of person that would need something like this. I am no Publius.

But I enjoy thinking through this kind of thing, so I thought I’d share it.

Troubleshooting Kodi — “Couldn’t connect to network server.”

Published / by Andrew

I just had an aggravating experience with using Kodi over my home network. I thought I’d go ahead and post it here in case anyone else is having the same problem, and also to cement it into my brain in case I have this problem again.

I have my music hosted on my desktop computer (which is increasingly more and more of a server machine, as I only use it via SSH from my laptop in my living room), and I set up Kodi to connect to the directory through SSH. From two different devices, I’m getting the same message: “Couldn’t connect to network server.”

These devices are a laptop and an Android phone. The cause of the problem turned out to be the same in both (at least, I think), but Kodi has a horrible problem in not explaining why it couldn’t connect to the network server, making debugging really irritating. The problem is that I had reinstalled the OS on the server machine, so the SSH verification keys were different. SSH was rejecting the connect as a security measure.

While the problem was the same for both devices, the solution was really different for each.

For the laptop, I only removed the offending key. It wasn’t a big deal– I just tried to SSH to my desktop from the laptop, and it gave me the instructions. Then I needed to restart Kodi, and everything worked fine.

My phone is a different story. The convenient tools for SSH just aren’t available here, and I don’t have any idea how to remove the bad key here. I actually just did the scorched earth option– I went to the app’s options, went to the Storage section and taped “Clear storage”. That removed all settings, all add ons, everything. Not too big a deal for me, personally, because I don’t use Kodi for much on my phone. But it removed the bad key.

There is also an additional problem with the Android version in that it does not support SSH/SFTP natively. I had to go to the Addons repository and install something to get SSH support.

From there, everything is finally back to normal.

On the off-chance that the Kodi team is reading this– Please give better error messages with network problems.