Thursday, January 1, 2015

Raspberry Pi and HP LaserJet 1020 Printer

I would like to create google cloud printer using my HP LJ 1020 Printer and Raspberry Pi. But I struggle to get the CUPS working with this printer. Finally I got it working with following instruction.

Setup Local Printer

  1. Install CUPS (refer to this: http://www.howtogeek.com/169679/how-to-add-a-printer-to-your-raspberry-pi-or-other-linux-computer/)
  2. Add printer, select "HP LaserJet 1020 Foomatic/foo2zjs-z1 (recommended)"
  3. Although printer is added but is not working. Need to install reinstall foo2zjs from official site (http://foo2zjs.rkkda.com/). Following the instruction there.
  4. Reboot Raspberry Pi
  5. Try print test page from the web interface to make sure you are able to print without issue.

Setup google cloud print

  1. install cloudprint service (run with sudo): http://davesteele.github.io/cloudprint-service/ppa.html

Saturday, November 30, 2013

Windows 8.1: View Chinese character in non-Unicode program

  1. Go to Control Panel -> Region
  2. then Administrative tab
  3. select change system locale
  4. select Current system locale to Chinese




Friday, July 20, 2012

Network Configuration in minimal CENTOS 6



install system-config-network-tui and configure using it.

Option #1:

  1. edit /etc/sysconfig/network-scripts/ifcfg-eth0 file manually.
  2. reboot
  3. yum install system-config-network-tui

Option #2:

  1. dhclient eth0 (or whatever the alias of your connected adapter is)
  2. yum install system-config-network-tui


Wednesday, May 30, 2012

Enable sshd on fedora



Enable sshd service.
$ systemctl enable sshd.service
start sshd service
$ systemctl start sshd.service
check sshd status if needed.
$ systemctl status sshd.service
restart sshd service, when needed.
$ systemctl restart sshd.service
stop sshd service and duck down :P
$ systemctl stop sshd.service
well, make sure you have port 22 open.
$ system-config-firewall

Replace Gnome with LXDE in fedora 17





yum groupremove 'GNOME Desktop Environment'

yum groupinstall XFCE

yum groupinstall LXDE


create the file with a editor

/etc/sysconfig/desktop


DISPLAYMANAGER=/usr/sbin/lxdm

PREFERRED=/usr/bin/startlxde


and reboot



to enable vnc session for remote users

/bin/su username -c "/usr/bin/vncserver :1 -geometry 1440x900"




also it can be added in the rc.local so they will be enabled at server startup


/bin/su username2 -c "/usr/bin/vncserver :2 -geometry 1440x900"

/bin/su username3 -c "/usr/bin/vncserver :3 -geometry 1440x900"






How do I change the default runlevel?



systemd uses symlinks to point to the default runlevel. You have to delete the existing symlink first before creating a new one rm /etc/systemd/system/default.target



Switch to runlevel 3 by default ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target



Switch to runlevel 5 by default ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target


Saturday, March 20, 2010

How to Prevent Ubuntu Linux from Resetting or Changing Computer’s BIOS Clock

1. Open the terminal and enter the following command:

sudo gedit /etc/default/rcS

2. In the gedit window that opens ups find the the line UTC=yes and change it to UTC=no

Monday, August 17, 2009

CentOS 5.3 minimal installation with X as VMware guest

  1. get ISO of the latest version of CentOS 5 from the CentOS website, centos.org. You will only need the first disc or the net install disc. (eg. CentOS-5.3-x86_64-bin-1of7.iso)
  2. following normal installation but deselect all pkg (refer to screenshot)
  3. after reboot. add EPEL repo (EPEL - FedoraProject), such that iceWM is available.
    # rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

  4. install additional pkg (yum install):
    • xorg-x11-twm
    • xorg-x11-xfs
    • xorg-x11-xinit
    • xorg-x11-server-Xorg
    • xorg-x11-drv-vmware
    • urw-fonts (needed by icewm)
    • icewm
    • vnc-server
    • vnc