Swapping CAPS lock and CTRL on Raspbian

I was fiddling with one of my (new) RPi's, and realized there was no UI component to switch the CAPS lock to be CTRL. Really? So, found a couple of things that has to be modified:

First, I edited /etc/default/keyboard, adding

XKBOPTIONS="terminate:ctrl_alt_bksp,ctrl:nocaps"

​​Secondly, I modified my ~/.config/lxkeymap.cfg, adding

option = ctrl:swapcaps

​Boom!

Hacking: 

Fedora 24 issues on VirtualBox

As of some recent upgrades to my F24 VM (running under VirtualBox), my system would not boot properly any more, getting errors like

NMI watchdog: BUG: soft lockup - CPU#0 stuck

 

I couldn't find any details as to why this was, other than someone having similar issues with a bad GPU card (not under a VM). I checked my display settings for the VM, which had the minimum recommended setting of 21MB. This ought to have been plenty, since I run my Linux system in a head-less mode (no display etc.). However, Linux must have changed something, cause this no longer worked, but bumping the GPU memory to 32MB seems to have fixed it. Bizarre.

Hacking: 

Software development on OmniOS

One of the OpenSource projects I work on, Apache Traffic Server, supports Solaris. I build on OmniOS for this development, and as much as I like it, it's semi-difficult to setup a development area properly. I'm likely missing something (like, a developer bundle or meta package), but these are the packages I find necessary to always install:

$ sudo pkg install gcc51 header object-file

Note that GCC installs in /opt/gcc-<version>, and without object-file autoconf / configure does not behave well. In addition, I use the OmniOS additional package repository as well, for goodies such as Emacs:

$ sudo pkg set-publisher -P -g http://pkg.omniti.com/omniti-ms/ ms.omniti.com

Software installed with this goes into /opt/omni.

Update: For some details on getting network setup on your OmniOS box, see http://blog.nemtallahdaher.com/wordpress/?p=127 . In addition to this, I also had to update the nsswitch.conf file of course (just copy over the DNS version of it).

Hacking: 

QNAP and Torrent

I noticed a noticeable amount of Torrent traffic both from, and to, my QNAP NAS server. It turns out, if you enable the Download Station application, it starts doing all sorts of Torrent discoveries on its own. I have no idea why, so for now, I have simply removed the application entirely. I noticed this by doing a

$ tcpdump port 6889

 

Hacking: 

autorun.sh for my QNAP server

I needed to do basically rc.local on my QNAP NAS server, since it setups various things at bootup time. Changes to these setups would therefore not persist a reboot. Via QNAP support, I got a link to a page showing how to setup an autorun.sh script as part of the bootup process. This was all splendid, except I couldn't find my device in the list. So, I found this command to probe the system which boot drive I'm on, and from thereon it was easy to find which partition to mount. What I ran was basically this:

[admin@Freya /]# /sbin/hal_app --get_boot_pd port_id=0
/dev/sdg
[admin@Freya /]# mount -t ext2 /dev/sdg6 /tmp/config
[admin@Freya /]# cat /tmp/config/autorun.sh
#!/bin/sh
/share/CACHEDEV1_DATA/homes/admin/bin/autorun.sh &

I made it such that it simply just run an autorun.sh from my normal drive, this way, I don't have to go through these hoops, and modify the flash image constantly when I want to modify change something. Right now my script is pretty limited, but for example, it now allows me to add a "search" domain to my /etc/resolv.conf. Yeah, for some reason, the QNAP OS does not let you add search domain for the resolvers, if you use static IPs (with DHCP, it gets it from the DHCP server, of course).

Hacking: 

systemd and disk storage

Well, my battles with systemd continues... I had a box with limited disk space, and it was using over 4GB for just systemd journals. You can see the current journal usage with

$ sudo journalctl --disk-usage
​Journals take up 3.9G on disk.

I've tweaked this now, with a setting in /etc/systemd/journald.conf:

SystemMaxUse=1G

In addition, I ran a couple of commands from the command line:

$ sudo journalctl --verify
$ sudo journalctl --vacuum-size=1G

Pages

Subscribe to Ogre.com RSS