Sunday, December 30, 2012

Create a Shortcut to Terminal on Kubuntu

Go to Applications/Settings/Xfce4 Settings Manager > Keyboard, under Shortcuts to Applications tab, Add a new entry: put the following command
xfce4-terminal
I used
Ctrl+Alt+T
as the shortcut.

Remove Keyring Dialogue on Ubuntu/Kubuntu

One needs to use Passwords and Encryption Keys menu, if it is not found under Applications/Accesories, then install it from terminal

sudo apt-get install seahorse

After the installation, open the menu, remove Default line under Password tab. At next poping-up dialogue, put empty password.

Sunday, December 23, 2012

Fan Cleaning: SONY VAIO PCG-GRV550


  • PREPARE THE TOOLS:
  • KEY POINT: OPEN FROM FRONT, REMOVE THE HIDDEN SCREW
  • SLIDE THE SOUND PANEL TO RIGHT, DETACH THE SIGNAL STRIP UNDERNEATH.
  • TAKE AWAY THE KEYBOARD, TAKE OFF THE SIGNAL STRIPS
  • DRAW A MAP OF SCREWS
  • MANY TEDIOUS STEPS OMITTED, E.G., REMOVE FROM BACK SIDE, BATTERY, HARD-DISK, CD DRIVER, AND REMOVE THE SCREWS AT THE EDGE WHICH CONNECT THE TOUCHPAD SHELL, REMOVE THE LAYER UNDER THE KEYBOARD, WHICH COVERS THE FAN AND MAINBOARD.
  • REACH THE LAYER OF FANS
  • TAKE OFF THE BIG FAN AND REMOVE THE DUST LAYER
  • CLEAN INSIDE OF THE FAN
  • THE MAP OF SCREWS FROM BACK SIDE
  • REASSEMBLE ALL PARTS ACCORDING TO YOUR MEMORY AND SCREW MAP.

Sunday, December 16, 2012

Apache2: Set up Multiple Sites

An example. Modify /etc/apache2/httpd.conf file:
<virtualhost 127.0.0.1>
DocumentRoot /var/www/foo
ServerName www.foo.com
</VirtualHost>

<virtualhost 127.0.0.2>
DocumentRoot /var/www/bar
ServerName www.bar.com
</VirtualHost>
Restart Apache2 with updated configuration file.
sudo /etc/init.d/apache2 restart

Saturday, December 15, 2012

graphicsmagick: *.jpg to .pdf in one line

To convert multiple .jpg files into one single pdf file

sudo apt-get install graphicsmagick
gm convert *.jpg foo.pdf

To reduce rise in cost of quality:

gm convert -quality 60 *.jpg foo.pdf

Thursday, December 13, 2012

Fix wine for Ubuntu 11.04

NOTICE, wine runs WinDLX without problem on Ubuntu 11.10 and above, one can choose upgrading to 11.10 or higher (I did so). The following may disturb your default fontconfigure setting.

When running WinDLX via wine, winevdm.exe says encountering problem and needs to close. Backtraces lead to libfontconfig.so

The Fix

Download the following package

http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.8.0.tar.gz

Install the needed packages

libfreetype6-dev 
libfreetype6 
libxml2 
libxml2-dev

Unzip the download package, compile the package

  ./configure 
make 

Back up the original copies

cd /usr/lib32/ 
sudo cp libfontconfig.so libfontconfig.so.back
... 

Copy these files into /usr/lib32

fontconfig-2.8.0/src/.libs/libfontconfig.so 
fontconfig-2.8.0/src/.libs/libfontconfig.so.1 
fontconfig-2.8.0/src/.libs/libfontconfig.so.1.4.4

Remind the above fix affects the system font configuration. TO recover the old settings, please restore the backup files.

Wednesday, December 12, 2012

Get iSpin Full Featured

One needs to install some other software to use iSpin. Under Ubuntu, this can be easily done by Synaptics, but the package names are not so intuitive.
  • Spin (follow this link), the main background program
  • iSpin (interface), run iSpin/install.sh found in the Spin package
  • Tcl/Tk (Synaptics > tcl), iSpin interface
  • Dot (Synaptics > graphviz), for generating automata view
  • Yacc (Synaptic > bison), for compilation
To generate the channel messages flowchart from .trail file (shown as msc.ps), one can use command
spin -M -t foo.pml
It is saved into foo.pml.ps.
For the flowchart directly built from model, it may be wise to specify it's depth when the model has an infinite behavior.
spin -u100 foo.pml
To generate the automata view in ps file:
./pan -D | dot > foo.dot
dot -Tps foo.dot -o foo.ps
See more here: The Dot Guide.




Monday, December 10, 2012

Ubuntu: Installing EPSON Inkjet Drivers

I was enabling EPSON inkjet Stylus SX218 printer/scanner on Ubuntu 11.04. It requires two specific drivers (for printer and scanner respectively) which can be downloaded from EPSON website.

For the printer, one can use ubuntu recommended driver. It will pop up Update Manager once connected to the printer with USB.

For the scanner, one need to go the EPSON website, search for the right product, and install iscan-data (to which iscan depends on) first, then install iscan.

For me, I chose (visit link and search SX218)

  • iscan-data_1.20.0-1_all.deb
  • iscan_2.29.1-5~usb0.1.ltdl3_amd64.deb (for 64bits < 12.04)
  • iscan_2.29.1-5~usb0.1.ltdl7_amd64.deb (for 64bits >= 12.04)
one can double-click to open the file in Software Center.

Tuesday, December 4, 2012

Ubuntu: Run Compiled Package From Command

To do this, create a symbolic link to /usr/bin/
sudo ln -s exec-complete-path /usr/bin/command-name
Remind that one has to give the complete path, not the relative path.

Saturday, December 1, 2012

Kubuntu: Restoring Missing Panel

Kubuntu serves well on old-fashioned notebooks, as it is a light-weight version of Ubuntu.

To restore the missed top bar and bottom bar, press Alt+F2 (Run program) to open a dialogue, type:

xfce4-panel

It shall come back.