Convert Ubuntu proper to ElementaryOS

With the release of Juno I decided to give it a try and pretty much liked it on laptop. In fact I liked it so much that I decided to install it on desktop as well. On my main rig I run Ubuntu proper (18.04 + KDE installed manually). Since I have everything set up, and am lazy to reinstall machine unnecessarily, I’ve decided to just convert that install to ElementaryOS so here are the steps I did to achieve that:...

November 4, 2018 · 1 min · Ivan Tomica

Persist login screen keyboard layout on Mac OS X

When I was setting up Macbook I selected Croatian keyboard layout and for some reason it was defined as default from that moment for login screen. Although I primarily use US layout and have changed it for my account Croatian was still used for login screen once the computer powered on. No matter how I changed default layout and set up global one it would still default to Croatian after the reboot....

October 5, 2018 · 1 min · Ivan Tomica

Firefox’s address-bar shortcuts

Prefix thing you’re searching for with: ^ for matches in your browsing history. * for matches in your bookmarks. % for matches in your currently open tabs. # for matches in page titles. @ for matches in web addresses.

August 6, 2018 · 1 min · Ivan Tomica

Useful bash shortcuts

Moving around: CTRL + A # beginning of the current line CTRL + E # end of the current line Alt + F # one word forward Alt + B # one word back Text manipulation: CTRL + U # delete characters before cursor CTRL + K # delete characters after cursor CTRL + W # delete word before cursor Alt + D # delete word after cursor Alt + U # word after cursor to uppercase Alt + L # word after cursor to lowercase Alt + C # capitalize a word

May 20, 2018 · 1 min · Ivan Tomica

Hide other users processes on Linux

By default proc is mounted in a way that allows inspection of other users processes by any account on the system. This can be a security risk if attacker gets hold of one of the accounts on the machine as it can freely inspect processes and gather information that it perhaps shouldn’t have. In order to restrict access we can add hidepid mount option to /etc/fstab: proc /proc proc defaults,hidepid=2 0 0 To re-mount current /proc you can use:...

April 22, 2018 · 1 min · Ivan Tomica

Using File Descriptors to calculate progress in Linux

ProcFS in Linux has many useful information about process and its status. In this particular case I’ll show you how to determine progress while copying the file with cp. Same principle can be used for many other situations as well; like importing MySQL dump or whatever you comes up on your mind :-) So in this situation I am copying the ~98GB file to another directory: cp -a /input/archive.tar.gz /output/ First, let’s find PID of this process....

April 21, 2018 · 2 min · Ivan Tomica

Synergy 2 on Ubuntu Linux

Ever since Symless (company behind Synergy product) has published “cloud based Synergy 2 service” I had nothing but problems and headaches with it. The major issue that I have had was that it simply wouldn’t pass the mouse/keyboard control to other configured screen. THIS IS THE SOLE PURPOSE FOR THIS PIECE OF SOFTWARE BTW!. Anyhow, after I stopped whining and decided to look into issue I’ve found that bot laptop and desktop were “Unable to open display :0:0”....

February 10, 2018 · 1 min · Ivan Tomica

Vim Cheatsheet

Some of the shortcuts I find useful in Vim, but sometimes I fail to remember some of them :-) Navigation gj and gk - move down and up by virtual lines gg - beginning of the file G - end of file 25G - 25th line w - beginning of the next word W - beginning of the next word, delimited by space e - end of the word b - beginning of the word B - beginning of the word, delimited by space % - matching parentheses 0 - beginning of the line (^ also works) $ - end of line Insertion...

February 4, 2018 · 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

Moving /home to another ZFS dataset

When I set up ZFS on my main rig I was kind of doing it “fast as possible” and haven’t paid attention to much details. Recently, I wanted to customize my setup a bit so here’s how I migrated my /home to another ZFS dataset. Setup was as follows: There is ZFS pool called storage composed of two mirrored vdevs One vdev is 2x2TB drives while the other one is 2TB drive and 1,5TB drive....

November 20, 2017 · 2 min · Ivan Tomica