Fixing URxvt copy/paste

URxvt, or if you wish to call it rxvt-unicode, has this weird thing turned on by default where it binds ctrl+shift keys to all sorts of insanity (keycap picture insert mode and stuff like that). Dammit, I want my “normal” terminal behavior back! By “normal” I think that if I press: Ctrl + Shift + V -> paste contents of my main clipboard (from X) Ctrl + Shift + C -> copy current selection to clipboard So to restore that functionality here’s the magic thing you need in your ....

January 23, 2019 · 1 min · Ivan Tomica

Replacing a broken drive on FreeBSD ZFS

These days, one of the drives on one of my machines started developing bad habits of reallocating blocks which is an early sign that drive might go bad. To prevent such misfortune I decided to replace it with a new one. Once the old drive was yanked out and new one was put into the machine (there are other ways, but I was forced to do it this way) it was only left to partition the new drive and add it to appropriate places....

December 19, 2017 · 4 min · Ivan Tomica

Fix delete key in CSH or TCSH

CSH is the default shell for root user on FreeBSD system. Basic usage is pretty much the same as any other shell like bash, zsh, fish or whatever. Until you try to execute some bash specific for loops, or attempt to use Delete key. Whaaaat? - Yes, apparently delete doesn’t give the correct character in csh and just prints ~. I don’t know if that’s xterm (or xterm compatible) terminal thing or just a csh thing but it doesn’t matter....

October 6, 2017 · 1 min · Ivan Tomica

Minecraft server in FreeBSD Jail

To run latest Minecraft 1.12.1 (as of this writing) within FreeBSD Jail you need few things. First of, you need to install Java 8: pkg install openjdk8 openjdk8-jre After Java is installed, you’ll notice that there’s a warning like: This OpenJDK implementation requires fdescfs(5) mounted on /dev/fd and procfs(5) mounted on /proc. If you have not done it yet, please do the following: mount -t fdescfs fdesc /dev/fd mount -t procfs proc /proc To make it permanent, you need the following lines in /etc/fstab: fdesc /dev/fd fdescfs rw 0 0 proc /proc procfs rw 0 0 This obviously needs to be done on the host system level as it is not allowed within Jail....

August 28, 2017 · 2 min · Ivan Tomica

Sync messages across IRC clients with ZNC ClientBuffer plugin

One of the main reasons for setting up ZNC bouncer for me was to be able to have same IRC account on multiple computers and have messages synced across them. This isn’t “default functionality” so you need to install additional ClientBuffer plugin. To install the module on ZNC installed from binary package on FreeBSD you need to: Fetch the module fetch –no-verify-peer https://raw.githubusercontent.com/jpnurmi/znc-clientbuffer/master/clientbuffer.cpp Build module znc-buildmod clientbuffer....

August 13, 2017 · 1 min · Ivan Tomica

Ezjail not creating snapshots

July 18, 2017 · 0 min · Ivan Tomica

Setting up timezone in FreeBSD

This one is fairly simple. All of thee zone info files are located in /usr/share/zoneinfo/, divided by region. I’m in Croatia so setting up time to be the same as in Zagreb is done by sym-linking appropriate zone file to /etc/localtime: ln -sf /usr/share/zoneinfo/Europe/Zagreb /etc/localtime As I use jails on FreeBSD, to avoid setting this up on every single jail, I have flavor within ezjail defined which has default settings that I usually have on all jails....

June 25, 2017 · 1 min · Ivan Tomica

Using Ansible with FreeBSD

Using Ansible with FreeBSD as a managed node might not be straight forward as using some Linux distribution as, by default, FreeBSD doesn’t have Python interpreter installed which is needed for remote command execution in Ansible. To bootstrap the FreeBSD host you first need to install python and needed dependencies with raw module: ansible YOURHOST -m raw -a "pkg install -y python py27-simplejson" This will provide you with Python interpreter, but since it is installed from package/ports it will be installed in /usr/local/bin/python while Ansible expects it to be in /usr/bin/python....

June 20, 2017 · 1 min · Ivan Tomica

GNU Screen tips – Managing regions

Although I use tmux primarily for my “multiplexing needs” I hop into screen from time to time as well. Below are few tips for managing regions inside of GNU screen. Your basic screen window probably looks somewhat like: Ignoring hardstatus settings you basically have one session and one window inside of that session. To split that window in half by vertical axis you can use following combination: Ctrl+a | You should now get something like:...

June 15, 2017 · 2 min · Ivan Tomica

Enable GeoIP on PHP 7.0 on FreeBSD

Since pecl extension is compiled against PHP 5.6 in official FreeBSD repositories you’ll need to manually compile this PECL extension to have it included in PHP 7.0. Luckily for you process is really simple. Install autoconf so PHP can detect variables: pkg install autoconf Download latest PECL extension version from PHP’s website: fetch https://pecl.php.net/get/geoip-1.1.1.tgz Extract and configure it: tar -xzvf geoip-1.1.1.tgz cd geoip-1.1.1/ ./configure Finally, compile and install:...

April 5, 2017 · 1 min · Ivan Tomica