Monday, May 19, 2014

Typing Chinese in English Ubuntu 14.04


  1. Open Terminal

  2. aptitude install scim scim-tables-zh  (and dependencies)
  3. Logout or restart
  4. right-click input area and select "Input Methods", change from "X input Method" to "SCIM Input Method".

  5. Ctrl-spacebar should give you a scim toolbar

**

Update:

scim seems to be a soon obsoleted input method and it crashed on Chrome while I was running in 14.04.  Now I tried ibus and it seems to work pretty well (yet).  

  • In "Language Support", select "IBus" in Keyboard input methold system.
  • Install / Remove Languages... select traditional Chinese
  • In "Text Entry", click "+" to add Input sources (Chinese (cangjie3)
  • In "Input Method", choose IBus
  • change the keyboard shortcut, my own preference is Ctrl+Space
  • make sure to check the box "Show current input source in the menu bar"
You probably need to logout/login to take IBus in effect

Saturday, March 01, 2014

screen and nohup

Not long ago, I introduced nohup to let a program continue executing after you exit or logout from your ssh session..

then not long after that, I introduced screen for UART/COM/serial communication

then I found out, using "screen" is a much wiser choice.
Simply flow are as follow:

  1. create a screen
  2. execute whatever you want to run, probably something like a server
  3. detect a screen (ctrl-a, d)
There you go. Server will continue to listen after you log off your ssh session.

In case you want to go back to that screen, just re-attach it
  1. list screen (screen -ls)
  2. re-attached the screen (screen -r [screen name])
  3. there, ctrl -c to quite your program or server or whatever, then type exit to exit the screen

Monday, February 10, 2014

Displaying remote X clients

This will allow you to ssh to a server and prompt x windows:
$ export DISPLAY=:0.0

and

$ ssh -Y username@remove_server_ip

Remember the -Y option, it enables trusted X11 forwarding.



Wednesday, January 29, 2014

OSX UART serial terminal




In OSX, turn on the terminal, plug in your FTDI USB-serial dongle, you should see a new usbserial device created under /dev.  Use "screen" to start the session, remember to state the baudrate at the end of the command:
$ screen /dev/cu.usbserial-FTVLVQ6M 115200
To detach:
Ctrl-a d
To re-attach:
$ screen -r
To kill the screen:
Ctrl-a k