How to VNC into a running Plasma session

The easy answer is “have the user run krfb inside the session first”. But what if you are the user, and you're already remote from the host by the time you remember you needed to do that?

You need to have configured krfb with a remote control password and any other relevant settings, first. See below, but typically you've already done this at some point, so you can move straight to the important part:

ssh you@yourserver
DISPLAY=:0.0 krfb --nodialog

Then try to connect using krdc, or your VNC viewer of choice.

What if you don't have the password, etc., configured? Then:

ssh -X you@yourserver
krfb

This will display the window locally. Configure and close. This mode of operation doesn't work for actually showing the remote session, evidently because the X session forwarded though SSH is somehow a new/separate session. The key to showing the remote session is passing that DISPLAY environment variable.

Other thoughts: Have a slow network? Disable key repeat, or it might stutter. Also, sshuttle is very handy if you have limited port forwarding (but it won't help the network speed situation).

Read this post

Introducing UWU, the Uncomplicated Web Uploader

On occasion it's been useful to transfer files to/from colleagues at different organizations. But when they want to send me something, doing so securely (i.e., not via email) can be a bit of a chore. I've found solutions tend to require too much technical setup for the sender (e.g., key-based SFTP), need too much on-going management at the server (e.g., user-based SFTP), or are part of a much heavier integrated solution (e.g., a fully-fledged personal cloud suite). I just wanted a minimal CGI script that I can run on something as basic as my Raspberry PI. So I made UWU.

UWU, the Uncomplicated Web Uploader, is a simple portal for uploading files to a server through a web browser. It's loosely inspired by woof, and while that tool does have an upload mode, it can't be set up to run on an HTTPS-secured server. UWU can. In addition, a standalone server for private/trusted networks can be run, without any prerequisites other than Python 3.

UWU provides separate “spaces” which a user can upload to, each with enforced file size and count quotas. By design, UWU does not support viewing the existing contents of spaces [...]

Read this post

Severing independent email threads with KMail

I use KMail and it, like many other popular email clients, sorts messages into threads. It does this based on reference information embedded in the (usually hidden) headers of each message. Of course, sometimes those headers are off. Most commonly this happens because a sender uses a reply-to-all function to send a new message to an existing list of addresses—this new message has a completely different subject from the original (to which it's ostensibly replying), but the sorting at the receiver's email client still considers it part of the old thread because reply-to-all functions add headers referencing the original message, as well as others in the original thread.

Fortunately, KMail has the ability to remove those headers through manually applied filters. The bonus is that, once you do this, the corrected threading will propagate to other email clients—I use K-9 Mail (not related to KMail) on my phone, for example.

First, there are two email headers that are relevant, each serving a different purpose: In-Reply-To, which links to the previous email that the present one is a direct reply to, and References, which lists several emails that are considered part of the thread (according to reply-to-all). For a [...]

Read this post

How to make private git repositories open for public access

Some of my personal projects are tracked using private git repositories, hosted on this server. I can access these via ssh, but for a while I've had in mind to make at least a couple of them publicly accessible... somehow. After finally getting around to looking into it, this turns out to be deceptively simple using git-daemon (instructions for Debian distros):

  1. Install the git-daemon-sysvinit package.
  2. Enable the daemon by editing /etc/default/git-daemon. Reboot, or start the git-daemon service by hand.
  3. Add a symlink to each git repo you want to make public under /var/lib/git. These will then be accessible via git://<hostname>/git/<linkname>.
  4. Ensure the git protocol port (9418) forwards to the server.

Simple! The git protocol is faster than serving over http(s), and the standard configuration ensures that anonymous clients can pull, but not push, which is exactly what I was after.

Over the next little while I'll introduce the couple of projects that I'm opening up for public access.

Read this post

Using Unison with Android over USB

For some time, I've been happily using Unison in conjunction with my Android phone's USB mass storage function to synchronize files between my phone and my desktop. It was simple: I'd plug in my phone with USB and enable the SD card to be used as a mass storage device, then mount it in Linux and run Unison as if the phone was a local folder (with appropriate tweaks to support the FAT filesystem).

Alas, my phone was getting on in years (or months, as it is in tech), and with support long dropped and capacity nigh exhausted, I had to upgrade. With my new phone I've been promoted to the “new hotness” that is Android 6 Marshmallow, but one of the functions that was dropped along the way was the ability to expose the SD card as mass storage over USB. Admittedly it wasn't a perfect solution, requiring unmounting the SD card within Android itself while using it over USB, but the current approaches introduce their own deficiencies. In any case, my previous workflow wasn't going to work anymore.

Of course I didn't want to stop using Unison, or have Unison re-copy everything, or even merely re-scan everything. I [...]

Read this post

Accessing machines on a home network with sshuttle

You might have noticed that I'm running a little Raspberry Pi, acting as a server for my website as well as some other small server-ish tasks. This machine is actually on my home network and I also use it as the front-face to that network for incoming connections. There are other machines on this network, and while they are behind a NAT and so not addressible from the outside world, this is fine most of the time. But on the odd occasion where I'd like to directly address any other machine on that network, I have to do so through the Raspberry Pi. Depending on what it is I'm trying to do, exactly, that can be tricky.

I've just discovered sshuttle. It acts similarly to a VPN, using SSH under the hood to transport TCP packets through a server that you specify. The cool thing is that it doesn't require any complicated pre-configuration on the server—just Python. All you have to do is run it on the client machine you want to connect from. Nifty!

Debian has it packaged: run sudo aptitude install sshuttle. The binary itself apparently installs under /usr/sbin, which doesn't seem to be in a [...]

Read this post

A new beginning: Relaunching my website

Some time ago in a far off land, I kept a website. It was a cozy little website, housing a few bits and bobs that I had made and thought to share should other people find them at all useful. It was hosted with my ISP, accessible via a free domain, which made things cheap and easy for me, but also meant that if I were ever to move I'd have to find a new host, or lose my site.

Of course I moved and I lost my site. This was a couple of years ago, now. From then until now I've been meaning to get this thing back up and running at some point, but lack of time and real impetus meant that it didn't happen. Recently I got my butt into gear and began a focused effort to finally get it off the ground, getting myself some cheap hardware and a new domain name for the purpose.

What you see here is the result—welcome to Quantum Furball! Over the next little while I'll be reposting old things (backdated as accurately as I can guess), along with things I should've posted at the time, and I hope to [...]

Read this post


Page 1 of 1