Starting krfb in minimised mode

Submitted by Druss on Mon, 2013-08-05 16:16

I've got Kubuntu running my HTPC and XBMC starting up in full screen on boot. Besides XBMC's remotes which I operate from an Android tablet, I also use a VNC client on said tablet to connect to the HTPC to operate other programs. As a VNC server, I've got krfb also starting up on boot which is where my problem lies. krfb does not start minimised in the system tray. There is also no option to get it to do so in its configuration screen.

Here is a guide on how I have krfb configured to start it minimised.

CAPS LOCK issues when VNCing into Kubuntu and krfb

Submitted by Druss on Mon, 2013-08-05 15:30

I'm trying to VNC into my Kubuntu box using Jump Desktop from my Android tablet. All works well and everything is quite peachy. Everything that is, except for typing with the keyboard. Typing anything results in letters being displayed in capitals. Using the SHIFT key in the Android keyboard does fuck all. However, when I connected a keyboard to the Kubuntu box and pressed the CAPS LOCK key, my Android keyboard started typing in smalls.

MySQL encoding error: Warning (Code 1366): Incorrect string value: '\xE9, a <...' for column 'body' at row 3

Submitted by Druss on Sun, 2013-06-02 13:10

While performing a CSV import recently, I ran into the following error messages:

Warning (Code 1366): Incorrect string value: '\xE9, a <...' for column 'body' at row 3
Warning (Code 1366): Incorrect string value: '\xE6. He ...' for column 'body' at row 24
Warning (Code 1366): Incorrect string value: '\xE9, and...' for column 'body' at row 26

The first message was triggered due to the accented é in the word, protegé, in the input. The rest of the field was not imported. The others were similarly triggered.

Changing a file's encoding using Vim

Submitted by Druss on Sun, 2013-06-02 13:07

During imports and stuff, it's imperative that all steps utilise the same encoding/character set. If a text file is not using the preferred encoding, we can use Vim to change it during its save action as follows:

:set fileencoding=utf8

or if you want to save it to a different file and leave the current file unchanged:

:w ++enc=utf-8 newfile.txt

Vim does not respect certain regex character classes during substitutions

Submitted by Druss on Sat, 2013-06-01 07:48

Just now while attempting to perform a substitution in GVim, I found that the regex was not working as expected. Apparently, instead of matching all non-whitespace characters denoted by the shorthand class \S, the engine was matching the letter S instead, which was odd. It turns out that, as usual, I was the one at fault. What I was doing wrong was attempting to use the character class within [] groups.

Vim runs out of memory during a find and replace

Submitted by Druss on Sun, 2013-05-26 07:59

Earlier today, I had to perform a substitution in Gvim within a 2GB file. Unfortunately, after a few thousand operations, Vim ran out of memory with the following error:

  Out of memory!
Out of memory!  (allocating XXX bytes)

Windows too complained about running out of virtual memory and my system slowed down to treacle-like response times.

Upgrading KTorrent in Kubuntu Precise

Submitted by Druss on Tue, 2013-05-14 12:24

KTorrent on the LTS release of Kubuntu—Precise Pangolin aka 12.04—is perfectly fine except for the fact that it comes only with version 4.1. Unfortunately, this package is missing a few features that I was looking for, especially the option to add magnet links via its web interface.

Upgrading from 4.1 to 4.3 (the latest version at the time of writing) is pretty straightforward if one is happy to accept PPA sources.


Subscribe to RSS