How to prevent accidental keyboard input in a Linux terminal

  In a multi-monitor setup, sometimes I type in the wrong window without knowing and end up spamming WeeChat IRC. To prevent that, I now use gnome-terminal and turn on “Read-Only” mode to disable typing. This useful feature is, however, not available in other terminals. Please share in the comments if you know of alternatives. […]

How to change sshd default port on firewalld

  Instead of messing around with the ports directly with RHEL7/CentOS7 firewall-cmd, I’ve decided to update the port number in the ssh.xml service file instead. Think it’s cleaner this way. For example, here are the steps to change sshd port from the default 22 to 9876: 1. Make a copy of the default ssh service […]

How to reset lost root password on Raspberry Pi running Arch Linux

#459312475 / gettyimages.com   Assumption: SD is not encrypted Plug SD onto another working computer, look for the “cmdline.txt” file and edit it by appending “init=/bin/sh” after “rootwait”. Save the file, remove the SD and plug it back to the RPi and boot. You’ll be dropped into a shell. Change your passwd, then hit CTRL-ALT-DEL […]

How to extend Windows 7 VM disk size on VirtualBox v4.2.16

Problem: The 30GB C: drive was running out of free space on my Windows 7 VM guest on VirtualBox v4.2.16. Solution: 1. Shutdown VM. 2. Extend it to 45GB: [text]$ cd /home/user/.VirtualBox/HardDisks $ VBoxManage modifyhd windows7.vdi –resize 46080 0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%[/text] 3. Extend partition size in Windows 7 a. Start the VM b. Run diskmgmt.msc > right-click […]

How to make dhclient send hostname to DHCP server

My Arch Linux recently switched from dhcpcd to dhclient as the DHCP client. The DHCP server isn’t assigning a FQDN to this client and it turns out that dhclient isn’t telling the server what’s the client’s hostname. Solution: Create config file /etc/dhclient.conf with content: send host-name = gethostname();

How to fix copy-paste clipboard issue on Windows 7 Synergy client

Embed from Getty Images Love the cross-platform and open source Synergy keyboard and mouse sharing application. With the newly added built-in encryption, it’s even more secure now. The only problem I had was the copy-paste clipboard issue. When I hit CTRL-C to copy any text from a Windows 7 Synergy cilent (v1.4.12) running in service […]