Posts

Play octoshape stream on windows with VLC player

Install windows octoshape plugin at http://www.octoshape.com/files/octosetup.exe Install VLC player at http://www.videolan.org/vlc/download-windows.html . Use the installer so later octoshape can pick it as the preferred player. (Updated 12/26/2010: A dirty way to make sure windows associate all media files to vlc player is to explicitly set in vlc's Tool -> Preferences -> Interface -> Set up associations, select all file types. Then in Octoshape Settings (right click on the Octoshape system tray icon and select Settings), select use "System player") Create a bat file named stream.bat. In Windows XP, type in the bat file. "C:\Documents and Settings\ [user]\Application Data\Octoshape\Octoshape Streaming Services\OctoshapeClient.exe" -url:[octostream] In Windows Vista/7 "C:\Users\[user] \AppData\Roaming\Octoshape\Octoshape Streaming Services\OctoshapeClient.exe" -url:[octostream] Replace [user] with your current user name, [octostream] w...

Ubuntu 10.04 VNC Keymapping problem

You may find that if you connect to your Ubuntu 10.04 machine with VNC, the 's' key is incorrectly mapped to initiating the logout menu on the Desktop. The current best solution I can find so far is as follows, adopted from jarondl here . Rewrite ~/.vnc/xstartup as follows: ##!/bin/sh xrdb $HOME/.Xresources xsetroot -solid navy # Choose your color x-window-manager & { (gnome-panel 2> /dev/null &) } xterm &

Persona and Silvermel/Charamel living together in Firefox 3.6

Starting from Firefox 3.6, the Persona addon is installed by default. However, instead of an extension, it is now a theme, sitting in parallel to Silvermel/Charamel. This means you can either use the Silvermel/Charamel theme, or the Persona theme. You can't use both together as when you use Firefox 3.5 or before. To fix the problem, you can first uninstall the Persona extension, and then reinstall it from Mozilla addon site (The most recent 1.5.2 version doesn't work, install some older version instead). Finishing these two simple steps, you can enjoy the benefit of both Silvermel/Charamel and Persona at the same time once again.

CImg with Linux

Image
To build applications using CImg library in Linux, you need to link the pthread and X11 library. Otherwise you'll get a bunch of link errors as follows: ./main.o: In function `cimg_library::CImgDisplay::screen_width()': /usr/include/CImg.h:6659: undefined reference to `XOpenDisplay' /usr/include/CImg.h:6663: undefined reference to `XCloseDisplay' ./main.o: In function `cimg_library::CImgDisplay::screen_height()': /usr/include/CImg.h:6678: undefined reference to `XOpenDisplay' /usr/include/CImg.h:6682: undefined reference to `XCloseDisplay' ./main.o: In function `cimg_library::CImgDisplay::_handle_events(_XEvent const*)': /usr/include/CImg.h:6717: undefined reference to `XUnmapWindow' ... To do this in Eclipse IDE (which automatically generates the makefile for your programming project), from the main menu, go to Project -> Properties . Then follow the screenshot below for the setting.

RTHK Octoshape Streams

NOTE: As at Aug 2015, the octoshape streams of RTHK have been shut down. Please visit  here for the replacement m3u8 streams instead. You need to specify the stream locators if you run the octoshape client separately. (For example, if you run Linux, you can't invoking the program from the RTHK live broadcast pop-up window in the corporate's web main page. You can only type in command line > ./OctoshapeClient - url: [stream_locators] Replace [stream_locators] with the media you want: RTHK Radio 1: rthk.ch1 RTHK Radio 2: rthk.ch2 RTHK Radio 3: rthk.ch3 RTHK Radio 4: rthk.ch4 RTHK Radio 5: rthk.ch5 RTHK PTH: rthk.ch6 RTHK Live TV: rthk.livetv RTHK DAB31: rthk.ch31 RTHK DAB33: rthk.ch33 RTHK DAB35: rthk.ch35 Remark on Mar 25, 2010: In Linux, if you start the octoshape client by the command line > ./OctoshapeClient Then webpages which has octoshape stream available in Flash (e.g. The RTHK Radio Live Player ) will be played properly. P.S. RTHK TV str...

Can't switch input method of gcin in Ubuntu 9.10

If you would like to use cangjie (倉頡) input method but often don't know the full input codes for words, probably you will find gcin the best Chinese input method for Linux Desktop. First it supports * wildcards as in the counterpart in Microsoft Windows. Second it allows words so typed to turn to simplified Chinese automatically. However, in Ubuntu 9.10, the installed gcin may not allow you to switch between input methods. The solution that works with me is as follows: Remember to type sudo im-switch -s gcin so gcin starts when boot. Open the corresponding config file. One can do it in command prompt, by typing in sudo pico /usr/lib/gtk-2.0/2.10.0/immodule-files.d/gcin.immodules Change the line "gcin" "gcin Input Method" "gcin" "/usr/share/locale" "*" to "gcin" "gcin Input Method" "gcin" "/usr/share/locale" "" Reboot the machine More information about the problem and the solution c...

Even better gnome customization for netbook

Image
Use Gnome Color Chooser . There you can Reduce the size of the icons in the application menu. So the menu space can fit in more applications. Change the font color of Desktop icon, so as to fit the color pattern of the background (for example, you may wish a black instead of the default white Desktop icon font to fit a white background).