Category: Work related


How to use WD RE4 Serial ATA600 hard drives on controller that supports only SATA300?

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

When Serial ATA600 hard drives are plugged in a RAID controller that supports only SATA150 and SATA300, since the controller cannot understand what SATA600 is, to be defensive, it automatically default the communication ratio down to its low margin, SATA150. However, given the performance drop, now-a-day SATA600 drives are no longer backward compatible with SATA150. […]

Virtualbox “failed to create XIM input context”

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

When using Fedora installed in a virtualbox VM to remote connect to a linux host, some applications may crush when opening a menu with the error “failed to create XIM input context”. This is because VirtualBox does not handle scim well. A simple workaround is to put in a line export QT_IM_MODULE=gcin in the .bashrc […]

Solution for “_X11TransSocketINETConnect: Can’t get address for localhost”

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

To the public knowledge, this is caused by missing 127.0.0.1 localhost line in your /etc/hosts file. However, for some applications, even if you have that line, you will still get this error. Or what if you do not have access/privilege to modify the /etc/hosts file? There is still a work around: Suppose the affected program […]

DHCP get back your old IP when you switch computer or network card

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

Modern DHCP server will identify clients using its MAC address, such that if you are offline (shutdown the client computer) for a short period, like a few hours, up to a few days, depends on the load of the dhcp server and the pool size, when you are back online again, you will get the […]

In chroot environment, screen works only for root

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

First the system has the following system mounting points /proc, /sys, /dev, /dev/shm, /dev/pts, mounted properly. However, in some OS, the file /usr/libexec/pt_chown has the permission -rws–x–x This seems not working in the chroot subsystem. By changing the permission of the file /$chroot_root/usr/libexec/pt_chown to -rwsr-xr-x screen works in chroot system.

run a list of files

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

command $(cat filelist)

sed replace return

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

sed ‘:a;N;$!ba;s/\n/ /g’ infile > outfile

When ssh: Warning: No xauth data; using fake authentication data for X11 forwarding.

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

The fix for this is pretty easy and clear – just do #unset DISPLAY before ssh-ing.

tar and rsync: Archive and Preserve SELinux Contexts, Extended Attributes, And ACLs

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

tar –selinux –acls –xattrs -cvfz file.tgz yourfiles Where, –selinux – Save the SELinux context to the archive called file.tgz. –acls – Save the ACLs to the archive called file.tgz. –xattrs – Save the user/root xattrs to the archive called file.tgz Please that it archive all extended attributes, including SELinux and ACLs. -c – Create a […]

Add a static route

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

route add -net x.x.x.0/24 gw y.y.y.y