Tagged: configuration

Kernel 4.4.172 on Slackware64 and VirtualBox

In my previous post, I mentioned that I had issues with NVIDIA after updating the kernel to 4.4.172 from Security Advisories. It appears that this kernel update is breaking some applications for many people. For me, it broke NVIDIA video driver and now I found that I can't run VirtualBox.

When I execute the virtualbox command, it complained about vboxdrv not running. Then, when I tried to start vboxdrv, it said vboxdrv not found! # /etc/rc.d/rc.vboxdrv start bash: /etc/rc.d/rc.vboxdrv: No such file or directory

After looking for a solution in linuxquestions.org and other sites, I ended up following the instruction from SlackBlogs.

The information in this site is the result of my researches in the Internet and of my experiences. This information below is solely used for my purpose and may not be suitable for others.

Download the virtualbox binary:

Download the source binary from VirtualBox site. Choose for All distributions, then execute it as root. The installation will fail but don't worry about it.# sh VirtualBox-6.0.4-128413-Linux_amd64.run ...

Update the source code:

Open the source code for /usr/src/vboxhost-6.0.4/vboxdrv/r0drv/linux/memobj-r0drv-linux.c with your favorite editor, look for below lines and update it with new KERNEL_VERSION(4, 4, 168). There are three locations you'd need to update.# nvim /usr/src/vboxhost-6.0.4/vboxdrv/r0drv/linux/memobj-r0drv-linux.c ... if GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0) <-- Change the kernel version to KERNEL_VERSION(4, 4, 168) fWrite ? FOLL_WRITE | /* Write to memory. */ FOLL_FORCE /* force write access. */ : 0, /* Write to memory. */

Restart the setup process:

Now, execute the /sbin/vboxconfig as root to re-start the setup process:# /sbin/vboxconfig vboxdrv.sh: Stopping VirtualBox services. vboxdrv.sh: Starting VirtualBox services. vboxdrv.sh: Building VirtualBox kernel modules. vboxdrv.sh: Starting VirtualBox services. ... #

Run vboxdrv:

So far so good. It's now the moment of the truth. If I can get vboxdrv running, it's all set:# /etc/rc.d/rc.vboxdrv start Starting VirtualBox kernel modules ...done. #

Hooray! it's working. In fact, I can bring up VirtualBox. All I need to do is to update their Guest Addition images to the latest.

That's all!

Kernel 4.4.172 on Slackware64 and NVIDIA

Today, I noticed the kernel update to 4.4.172 from Security Advisories and updated my system. After rebooting the system, it couldn't start my X-Window system! It just failed. From the log file, I was able to determine that there was some kind of incompatibility with current NVIDIA driver.

After much of trial-and-error, I was able to install the correct NVIDIA driver for my system and got X-Window system running again. This is just a note to myself and others who might face the same issues, and hopefully they don't need to go through all the troubles.

The information in this site is the result of my researches in the Internet and of my experiences. This information below is solely used for my purpose and may not be suitable for others.

First of all, I just go though the ways to install package updates from the slackware website, just for a formality. The procedure was pretty simple and I followed the instruction in that page (well, most of the part). $ cd /tmp/patches $ wget ftp://ftp.slackware.com/pub/slackware/slackware64-14.2/patches/packages/*.txz # upgradepkg *.txz ... #

Now, download the kernel packages:$ wget ftp://ftp.slackware.com/pub/slackware/slackware64-14.2/patches/packages/linux-4.4.172/*.txz # upgradepkg kernel-*.txz ... # /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.172 | bash ...

The instruction says to run the lilo command to reinstall lilo:# lilo Fatal: open /boot/vmlinuz-generic=4.4.xx: No such file or directory

Oops, it looks like I do need to update the lilo.conf file to reflect with new updated kernel image and version. To do this, open the /etc/lilo.conf file and point to the right image name and label:# nvim /etc/lilo.conf ... image = /boot/vmlinuz-generic-4.4.xx <-- Change this to /boot/vmlinuz-generic-4.4.172 initrd = /boot/initrd.gz root = /dev/sda2 label = 4.4.xx <-- Change this to 4.4.172 read-only ...

Then, re-run the lilo command:# lilo Added 4.4.172 + * # reboot

After rebooting and loging in, startx failed.

The log, /var/log/Xorg.0.log, indicates something about nvidia driver missing, so I figured there was an incompatibility with the updated kernel. Then, I google'ed for a solution and learned that SlackBuilds.org had NVIDIA driver packages (418.43).

I downloaded and installed. During the installation, it warned that this driver packages were not compatible with my NVIDIA card, GeForce GTS 450, and recommended to use 390.xx. Of course, installation of this packages didn't fix the problem.

Then, I searched the nvidia site for the correct driver for my card and found 390.87. But this driver always failed to build against the kernel 4.4.172. I desperately searched the Net for a solution but couldn't find any. So, I went back to the nvidia site for older drivers to try on. Under the Beta and older version link, I found the newer version 390.116, which was released a few weeks ago. This driver set does support my old card, GeForce GTS 450, so I gave it a shot.# sh NVIDIA-Linux-x86_64-390.116.run ...

The installation went successful without any issues. Moreover, startx was able to bring up the X-Window system!

That's all!

Building My Work Environment (Part 6)

Part 6 - Let's type in Japanese

Now, we can view Japanese in terminal, let's try installing some input method framework. The CHANGES_AND_HINTS.TXT for Slackware64 14.2 suggests to use SCIM, but according to Arch wiki, SCIM is a dead project now. So, we'll try installing IBus.

The information in this site is the result of my researches in the Internet and of my experiences. This information below is solely used for my purpose and may not be suitable for others.


Installation of ibus as well as its dependencies and Japanese engine, ibus-anthy, is no difficult tasks. If you are planning to input Japanese characters, you might consider installing ibus-qt as well. They are available from Slackbuilds.org as usual.


Once the installation is done, start the setup program to do some configurations.$ ibus-setup

All I changed was the keyboard shortcuts and input methods. For keyboard shortcuts, I was hoping Alt+Shift would just work but it didn't, so I changed it to Alt+Shift+space.

For input methods, I added Japanese - Anthy to enable Japanese input. You might have noticed that its icon is different from the default one. This is because I replaced its default icon with my own.

The configuration of ibus should be done now. You'll see a small EN icon in its systray. That confirms ibus is running now. Left click on the icon will show you the list available input methods, in this case, English and Japanese - Anthy.


We need to tell the system that we are using ibus for alternate language inputs after logging out or shutdown. To do this, we update .bashrc and add some environment variables.$ nvim ~/.bashrc ----------------------------------------- ... export GTK_IM_MODULE=ibus export XMODIFIERS=@im=ibus export QT_IM_MODULE=ibus ...


Now, we need to start ibus each time we log into i3 window manager. To do this, we add ibus-autostart to at the end of i3's config file.$ nvim ~/.config/i3/config ----------------------------------------- ... exec --no-startup-id ibus-autostart

Japanese input is enabled and available for terminal as well.

Changing Default Anthy Icon:

I thought the default Anthy icon was not pretty and didn't like it. So, I decided to change it to my own. After searching for the icon in the system, I found it in /usr/share/ibus-anthy/icons/. It's called ibus-anthy.png. I used GIMP to create another icon and replaced it.

That's all!

Building My Work Environment (Part 5)

Part 5 - Show Me Japanese in my Terminal

At this moment, any Japanese characters will show up as little rectangle shapes or some gibberish characters. This is, by default, because Slackware uses en_US as its locale. Locale is set using an environment variable, $LANG, and it is set in /etc/profile.d/lang.sh for system wide configuration.

I'd like to be able to read Japanese in terminals for myself, and don't need to apply this for the whole system. All I need to do is to export $LANG in .bashrc.

The information in this site is the result of my researches in the Internet and of my experiences. This information below is solely used for my purpose and may not be suitable for others.

The locale for Japanese can be found by running the following command:$ locale -a | grep -i jp ja_JP.eucjp ja_JP.utf8

The Japanese locale for my system is jp_JP.utf8 (or jp_JP.UTF-8). To apply this in my environment, update .bashrc:$ nvim ~/.bashrc ----------------------------------------- export LANG=ja_JP.UTF-8

After this, either logout and back-in or source .bashrc will display Japanese characters properly in terminal.

However, this brings a bit of problem in my status bar. Time/date is displaying in Japanese as well. This is not what I wanted.

To fix this, I forced i3pystatus to use the en_US locale in its configuration file.$ nvim ~/.config/i3/i3pystatusconfig.py ----------------------------------------- from i3pystatus import Status import os # Setting LANG to en_US to avoid # showing dates in Japanese os.environ['LANG'] = 'en_US' ...

After saving the file, $Mod+Shift+r will change date/time in English.

In next article, let's talk about enabling Japanese input.

That's all!

Building My Work Environment (Part 4)

Part 4 - De-Uglifying i3

There are many sites offer themes/themers for i3, like unix121's themer. But I like clean and simple, so I changed just a handful of components.

The information in this site is the result of my researches in the Internet and of my experiences. This information below is solely used for my purpose and may not be suitable for others.

gtk2 Theme

I imported my old gtk2 theme, Morning Glory from Openbox days. This theme can be applied using lxappearance.$ tar -xzvf MorningGlory.tar.gz -C ~/.themes/ ... $ lxappearance


I still use Faenza icon set. I recently found out that this icon set can be downloaded and installed from slackbuilds.org

Font Awesome Fonts/Icons

i3pystatus I installed in the Part 3 uses icons to display each component, like CPU and memory. For that, font awesome needs to be installed. The latest version at the time of this writing is 5.0.10. Download a zip file, unzip it, and copy otf files from the use-on-desktop folder to system appropriate directory.$ unzip fontawesome-free-5.0.10.zip ... $ cd fontawesome-free-5.0.10/use-on-desktop/ # cp *.otf /usr/share/fonts/OTF # mkfontdir /usr/share/fonts/{TTF,OTF} # mkfontscale /usr/share/fonts/{TTF,OTF} # fc-cache -fv Restart X

To check if the fonts were properly installed, run fc-list:$ fc-list | grep -i awesome ...

Ricty Font

Ricty is Japanese True Type font based on Inconsolata and Circle M+ 1m, optimized for the programming usage. Here is some benefits of using the font:

  • Use Inconsolata for the Latin character glyphs and "Circle M+ 1m" font for other glyphs.
  • Adjust the width of full-width and normal-width character glyphs to 2:1 ratio exactly full and half.
  • Design the comma, period, colon, semicolon and bracket character glyphs to differentiate each other clearly to prevent confusions.
  • Design the high visibility p-sound sign attached Kana character glyphs.
  • Design the En-dash and Em-dash glyphs show them as the broken line to prevent input failures for LaTeX.
  • It shows Em-size space as "box" character because Em-size space often prevents debugging since users usually miss it. With Ricty Diminished font, users can find and fix it easily.

The instruction on how to build Ricty is from this site.

Bash Environment

I changed the style and color of PS1 in .bashrc. PS1='\[\e[38;5;106m\]\A \[\e[38;5;210m\]\u\[\e[38;5;229m\]@\[\e[38;5;220m\]\h\[\e[38;5;252m\][\[\e[38;5;69m\]\w\[\e[38;5;252m\]]\n\[\e[47m\]\[\e[38;5;232m\]$\[\e[00m\] '


Color Scheme for ranger

ranger is a text-based file manager with vi/vim key-bindings. Since it's key stroke based, it's perfect for i3. I like my default color scheme. But you can change the color scheme by ~/.config/ranger/colorschemes/.
For syntax highlighting in ranger, I use highlight.


Color Scheme for urxvt

The color scheme for urxvt is controlled from .Xresources. I'm currently using gruvbox.



rofi is a window switcher, application launcher, and dmenu replacement, currently maintained by Dave Davenport. It's lightweight and highly customized. My rasi theme file, dark_elements.rasi, and rofi config file are availble.



I created a bash file to take a screenshot, blur that image, insert a lock icon, and apply it to i3lock.


In next article, let's talk about displaying Japanese characters in terminal.

That's all!