Monday, January 28, 2013

Arch Linux: systemctl dhcpcd netcfg problem

I think the Arch Linux dhcpd / dhcpcd thing is kinda broke...
I read many installation guide which says to start dhcp use the following command but it NEVER works for me:
# systemctl enable dhcpcd@.service 
eth0 or enp2s1 whatever won't work.  I don't know what the heck is enp2s1 in my system...

Anyway, this is what I do to fix it(mine is just VMware NAT network):


  1. cp /etc/network.d/examples/ethernet-dhcp /etc/network.d/mynetwork
  2. vi /etc/network.d/mynetwork  , modified line INTERFACE='enp2s1'
  3. try in root, netcfg mymetwork, see if it can fetch IP properly
  4. if everything looks good, # systemctl enable netcfg@mynetwork
It should create the symbolic link.  Then reboot to see if it works properly...

Friday, January 18, 2013

VirtualBox UUID already registered

Stupid VirtualBox after you copied it and use it again it will complain the UUID already registered. Use the below Linux command to assign it a new random UUID:
$ vboxmanage internalcommands sethduuid arch.vdi

Wednesday, January 16, 2013

BloggerPaste: convert your code to HTML

For many times the blogger editor messed up my code when I paste it here.  Obviously blogger is not intended for programmer.

I found an excellent tool to convert my code into HTML so that I can put it correctly here.

http://francois.schnell.free.fr/tools/BloggerPaste/BloggerPaste.html

Linux Mint 14 and Ubuntu 12.10 Chinese fonts Blur problem

Wenq.org offered an excellent tool to generate the .fonts.conf

http://wenq.org/cloud/fcdesigner_local.html

And also for the Chinese fonts packages


# aptitude install ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy



e.g. I used the tool to generate the below config file, save to ~/.fonts.conf and now the Chinese fonts looks much clear to me.

To download my file https://docs.google.com/file/d/0B7j0X0cOW5wTWnV2N3Y3NS1FeVE/edit

Or copy and paste here (Hope blogger won't do weird thing to mess up my code):

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- created by WenQuanYi FcDesigner v0.5 -->
<match>
 <test name="family"><string>sans-serif</string></test>
 <edit name="family" mode="prepend" binding="strong">
  <string>DejaVu Sans</string>
  <string>WenQuanYi Bitmap Song</string>
  <string>WenQuanYi Micro Hei</string>
  <string>WenQuanYi Zen Hei</string>
  <string>Liberation Sans</string>
  <string>Droid Sans</string>
   <!-- Please install WenQuanYi Bitmap Song first -->
 </edit>
</match>
<match>
 <test name="family"><string>serif</string></test>
 <edit name="family" mode="prepend" binding="strong">
  <string>DejaVu Serif</string>
  <string>WenQuanYi Bitmap Song</string>
   <!-- Please install WenQuanYi Bitmap Song first -->
  <string>AR PL UMing CN</string>
  <string>AR PL SungtiL GB</string>
  <string>WenQuanYi Zen Hei Sharp</string>
  <string>AR PL UMing TW</string>
  <string>Liberation Serif</string>
  <string>Bitstream Charter</string>
  <string>Droid Serif</string>
 </edit>
</match>
<match>
 <test name="family"><string>monospace</string></test>
 <edit name="family" mode="prepend" binding="strong">
  <string>WenQuanYi Zen Hei Sharp</string>
  <string>WenQuanYi Zen Hei Mono</string>
  <string>WenQuanYi Micro Hei Mono</string>
  <string>DejaVu Sans Mono</string>
  <string>Droid Sans Mono</string>
  <string>Liberation Sans Mono</string>
   <!-- Please install Liberation Sans Mono first -->
  <string>AR PL UMing TW</string>
 </edit>
</match>
</fontconfig>

Thursday, January 03, 2013

Viewnior fast image viewer

Just found Viewnior a pretty good image viewer, much faster image loading than the Ubuntu default image viewer. It doesn't need to import images like shotwell, and it allows left and right button to scroll to the next image.

so much to ask for a simple image viewer huh?

http://xsisqox.github.com/Viewnior/index.html