Some Recent Events

It has been a long time since my last post, so I would like to make some conclusion for the past month.

1. Position transfer, again

Actually, the development group does not fit me. I do not know any programming after all. To be honest, it is boring to work as demand analysis and technical support. There was a change for me to move to other department, so I made my decision with no hesitation.

However, we are still in the same office room. Now I am still in the transitional period, and sometimes I will catch one and lose the other.

2. The new laptop

My previous laptop has served me four years, and it is time to retire. I think this new laptop will serve me another four years.

However, I am not interested in Windows, so it is still running Gentoo only. It is a pity that it has only two SATA interfaces. Otherwise I can take the HDDs from my previous laptop, without reinstalling Gentoo.

The previous laptop is running FreeBSD only, and I will maintain it periodically.

Bulk Rename Multiple Files

I wrote this post as a memo, in case I cannot remember those commands... In Linux/Unix, depending on the situation, we can rename a massive of files in bulk through the rename command. There are two versions of rename. The C version is shipped with util-linux package. It has only limited features, and it doe不支持正则表达式,功能比较简单。除此之外,还有一个 perl 版本的 rename,功能更强大一点。 以下示例不区分 C 版本和 perl 版本的 rename 命令,自己尝试吧。

Bulk Rename Multiple Files

I wrote this post as a memo, in case I cannot remember those commands…

In Linux/Unix, depending on the situation, we can rename a massive of files in bulk.

There are two versions of rename. The C version is shipped with util-linux package. It has only limited features, and it does not support regular expressions. However, there is also a Perl version with more power.

In following examples, I will not distinguish C and Perl version rename. Just try it.

Run Steam Games with Optirun

I like to set primusrun %command% as launch option for steam games. However, starting from last month, primus did not work any more. Luckily, optirun still works fine. So, I will have to play steam games with optirun.

It is easy to get optirun work. Right click any game in your steam library, and choose “Properties”. Then select “Set Launch Options…” in pop-up dialog box, and specify below command line (here I take my Gentoo as an example, you need to modify the path according to your actual needs):

LD_PRELOAD=/usr/lib64/opengl/nvidia/lib/libGL.so optirun %command%

Please note, the environment variable LD_PRELOAD depends on the ELF attribute of the game. If it is a 32-bit game, then you need to specify 32-bit library path.

OK, now I can play the games with my discrete card again.

A Stupid Zsh Config Mistake

Today, I tried to login my Gentoo box through tty, to make a test. Unfortunately, I always failed to login. Getty immediately restarts, as soon as my system finished authentication. Of course, I did not see any error message. The only information I found in journal is:

getty@tty1.service has no holdoff time, scheduling restart.

This really makes non-sense, and also, I cannot find any solution on Google. After that, I tried to downgrade systemd from 219 to 218, not work.