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

Installing OTP for pass (password-store) on OpenSUSE

I’ve been using password-store utility for saving my passwords in GPG encrypted files. Since I’m also using 2 factor authentication I’ve opted in to use pass-otp as a convenience. As this extension is not in the official OpenSUSE repositories you will need to install it manually. If you’re reading this I guess you already have password-store program installed. If so, you can proceed installing pass-otp extension right away. To do that, use:...

June 7, 2017 · 1 min · Ivan Tomica

Using KDE Wallet Manager and kwallet-query

I’ve been using mutt for reading my emails for some time now. It is simple, fast, configurable, and yeah, did I mentioned it is a command line email client? Anyhow, only thing I have been fighting with was on how to securely store password without putting it to .muttrc file (which is plain text file). When I used to use GNOME I have used Seahorse while on the command line I’ve used secret-tool for fetching the password....

June 4, 2017 · 2 min · Ivan Tomica

Install SVN PHP module from PECL on EasyApache 4

Basically, something is broken while attempting to install SVN module for PHP via “Modules installer” option. To manually install extension follow these steps: Download the SVN PECL package: wget pecl.php.net/get/svn-1.0.3.tgz Extract the package: tar xzf svn-1.0.3.tgz Run phpize for appropriate PHP version: /opt/cpanel/ea-php56/root/usr/bin/phpize Configure with appropriate PHP configuration: ./configure –with-php-config=/opt/cpanel/ea-php56/root/usr/bin/php-config Edit the Makefile to add following CFLAGS: CFLAGS = -g -O2 -std=c99 Compile and install extension: make make install Create configuration for SVN extension: vi /opt/cpanel/ea-php56/root/etc/php....

May 23, 2017 · 1 min · Ivan Tomica

SSH configuration

This should be a short article mentioning few options I generally change in sshd_config and recommend that you change them too. Change port number I usually change port number to something random to avoid millions upon millions of failed SSH connection generated by various bots on the interwebz in my server logs: Port 10102 Turn off password authentication PermitRootLogin without-password PasswordAuthentication no What additional tweaks do you make to your sshd_config file in order to secure SSH?...

May 3, 2017 · 1 min · Ivan Tomica

How to enlarge (resize) partition and expand LVM pool on top of it

Day or two ago I encountered a customer that had their server partitioned in a way that there was around 250GB of non-allocated space on disk. There were two partitions (sda1 and sda2) that were set up as /boot and LVM pool containing / mount point respectively. Naturally I’ve replicated that setup locally and simulated how to expand partition and LVM pool on top of it. All without loosing and data OFC....

April 28, 2017 · 2 min · Ivan Tomica

Disable screen rotation button on Fedora Workstation

Annoyed by that auto-rotation icon on your Fedora desktop when using GNOME? See that area painted red? To disable that icon on your laptop you need to disable iio-sensor-proxy.service: sudo systemctl stop iio-sensor-proxy.service sudo systemctl mask iio-sensor-proxy.service

April 21, 2017 · 1 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: make make install To have it loaded by your PHP-FPM (assuming you’re using it) include it in your php....

April 5, 2017 · 1 min · Ivan Tomica

Disable “Recently bookmarked” section in Firefox bookmarks menu

So recently Firefox added section “Recently bookmarked” on top of the list of your bookmarks. It displays 5 most recent bookmarks you’ve added. I pretty much hate it and wanted to disable it. To disable it navigate to about:config and set: browser.bookmarks.showRecentlyBookmarked to false.

April 4, 2017 · 1 min · Ivan Tomica

Attach or create new Tmux session

I’ve been in a fight with tmux on how to create new session under certain name, but if it already exists to attach to that current one for a very long time. Reason for that was that when I’m connecting to the remote servers I usually have my own session under certain name there and I’d like to attach to that existing one if it already exists. Connecting to the server then issuing:...

April 4, 2017 · 1 min · Ivan Tomica