How to Install 32-bit Wine 1.8 on CentOS 7

Since version 7, RHEL has only x86-64 versions. The same thing happens to CentOS 7. In CentOS 7/EPEL, there is only package for Wine x86-64. However, many Windows .exe files are 32-bit. Even there are 64-bit versions for some software, their installation file is 32-bit. And for some certain software such as Office 2007, 32-bit wine is preferred. In this post, we will check how to install 32-bit Wine 1.8 on CentOS 7. » Read more

How to Change Systemd Boot Target on Linux

Many Linux distros, such as RHEL/CentOS 7, Fedora, Ubuntu 16, are now using systemd instead of init as the init system. It is common for Linux users to set Linux to boot to “GUI” or “Text” mode. The old way of changing ‘/etc/inittab’ for choosing Linux runlevels is not working for sytemd. This post will introduce the way for systemd systems to select the “runlevels”. » Read more

How to Set the Static IP Address Using CLI in Fedora/CentOS Linux

How to set the static IP address for CentOS 7/Fedora 22+ is introduced in this post. Here, we assume the Linux is using NetworkManager to manage the network. All steps are done as root. Find the interface you want to set the address ∞ Command ifconfig -a lists all interfaces. Find the interface name to set, such as enp2s0. datacenter-servers.jpg Edit the interface’s configuration file ∞ For interface NAME, the configuration file is stored in /etc/sysconfig/network-scripts/ifcfg-NAME. » Read more

Notes for Beginners of Software Development on Linux

Linux is a great platform for software development targeting servers or backends. In general, working on Linux is very productive. The problem that beginners on Linux face is the the learning curve is steep at the beginning. But believe me, after you get through the initial green steep learning step as in the figure below with some hard work, you will feel like working on a rocket in the yellow part. » Read more

How to Print PowerPoint Poster by HP Designjet 500 Plotter

First time getting my hand on a plotter (HP Designjet 500) directly to print a poster, I found it was an interesting experience. But configuring the printer settings was not that straightforward compared to using normal office A4 printers. I took photos of how it was configured for reference of my own and also those who may need it. First, here is a picture of the HP Designjet 500 plotter, a pretty big printer. » Read more

Making GPT Partition Table and Creating Partitions with parted on Linux

My best favorite disk partition table manipulation tools are cfdisk/fdisk on Linux. However, for large disks, cfdisk/fdisk will just give up with a message suggesting GPT partition table format and using GNU parted like WARNING: The size of this disk is 6.0 TB (6001042391040 bytes). DOS partition table format can not be used on drives for volumes larger than (2199023255040 bytes) for 512-byte sectors. » Read more

Rotating Videos from iPhone on Linux

iPhone is nice to take videos. However, one headache is the video may be rotated by 90 degree if you play it with non-Apple software such as MPlayer on Linux or Windows. This tutorial will introduce how to rotate the video taken from iPhone or other sources on Linux by 90 degree. The tool we choose to use is ffmpeg which can rotate video with video filters. » Read more

A posix_spawn Example in C to Create Child Process on Linux

The posix_spawn() and posix_spawnp() functions create a new child process from the specified process image constructed from a regular executable file. It can be used to replace the relative complex “fork-exec-wait” methods with fork() and exec(). However, compared to fork() and exec(), posix_spawn() is less introduced if you search on the Web. The posix_spawn() manual provides details. However, it is still not sufficient especially for beginners. » Read more

Extending a Mounted Ext4 File System on LVM in Linux

LVM is a great tool to manage hard disks on Linux—you can abstract the hard drives away and manage logical volumes from volume groups, you can dynamically add or remove hard drives while the file systems on the logical volumes need not to backed up and recovered, and you may create many snapshots of the logical volumes as you like. In this post, I will introduce how to extend a mounted ext4 file system on a LVM logical volume on Linux. » Read more

Keyboard Key Mapping for Emacs: Evil Mode and Rearranging Alt, Ctrl and Win Keys

Ctrl keys are important and possibly most frequently used in Emacs. However, it is painful on today’s common PC keyboards since Ctrl keys are usually in the corner of the keyboard main area. Why the key mappings in Emacs are designed like this? After it was designed, Emacs was commonly on the Lisp Machine keyboards with Ctrl keys closer to the space bar as show below (src. » Read more

Creating Fedora 20 Domain-U on Fedora 20 Domain-0

In this post, creating a file-backed virtual block device (VBD) and installing Fedora 20 in the Xen DomU via internet will be introduced. This domain is created on a Fedora 20 Dom0 as introduced in Installing Xen on Fedora 20 as Domain-0. For better performance, you may consider using LVM backed VM. Create file-backed VBD The actual space of VBD will be the amount of disk the virtual machine used. » Read more

Installing Xen on Fedora 20 as Domain-0

I ever introduced Installing Xen on Fedora as Domain-0 (Fedora 17) as the first try to use the xen package delivered from Fedora and get away from manually compiling Xen and patching the kernel. In this post, I introduce installing Xen Dom0 on Fedora 20. Installing Xen First, install the xen pacakges: # yum install xen The Linux kernel is already ready to run in Domain-0 with the pv_ops technology enabled. » Read more

Cheatsheet: Git Branching with a Git Server

It is common to set up git servers to host git repositories. Branching is lightweight in git and a very friendly mechanism to manage code. Here, I summarize a cheatsheet of common git branching commands for working on repositories from a git server. This post assumes that you have basic knowledge with git. If you are not familiar with git, you may want check Howto for New Git Users first. » Read more

Improving Fedora Font Rendering with Open Software and Fonts Only

It is continuously discussed that some Fedora users do not like the font rendering in Fedora Linux and there are solutions to improve the font rendering with potentially non-free or non-licensed software/fonts. However, with only the open source fonts and software and little tricks, the font rendering on Fedora can be quite good. In this post, I will introduce my method to improve Fedora’s font rendering with open software and fonts only. » Read more

Git Submodule Cheat Sheet

I summarize some commonly used commands that I find useful for working with git submodule. For the list of full commands, check the git submodule manual. Git.png In the following commands, I take scala-mode2 as an example as the submodule. Add a submodule ∞ git submodule init git submodule status git submodule add -f ./the-repo Get submodules ∞ During clone ∞ git clone --recursive In a cloned repository ∞ git submodule update --init --recursive Check out the master and update submodules ∞ git submodule foreach --recursive git checkout master git submodule foreach --recursive git pull Push the version changes to origin ∞ # cd the git repository first (not in submodule) git commit -am 'submodule updated' git pushDelete a submodule ∞ git submodule deinit ./the-repo git rm ./the-repo » Read more

Git through SSH Tunnel as Proxy

git is a great tool and it is common to have a git server over SSH possibly managed by gitolite. However, there are situations that we can not directly connect to the git server but be able to SSH to another node that can connect to the git server. The git server may allow only internal connections because of security. With the node that we can SSH to, we can still use the git server “directly” by setting up a SSH tunnel as a proxy for the git connection. » Read more

Improving ssh/scp Performance by Choosing Suitable Ciphers

Update on Oct. 9, 2014: You should be aware of the possible security problems of blowfish and it is suggested not to be used. Instead, you may consider ChaCha20 as suggested by Tony Arcieri. To use this with OpenSSH, you need to specify the Ciphers in your *.ssh/config* files as possibly with another default one since only newer vesion of OpenSSH supports it. » Read more