Posts

Showing posts from 2011

VNC viewer session with gnome session manager on Ubuntu 11.10

Image
The following happens to me since I upgrade my Ubuntu to version 11.10. Using the default config file .vnc/xstartup , I just get a terminal window in my VNC viewer session. To have the gnome desktop session manager back to the VNC viewer session, I have to modify the config file as follows. #!/bin/sh # Uncomment the following two lines for normal desktop: unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS #exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #x-window-manager & gnome-session --session=gnome-classic & In the following, the value after --session= is the session manager. You may change gnome-classic above to ubuntu-2d for an alternative session manager.

Useful Open Source/Ad free Android Apps

Open Manager (File management) OI File Manager (File management, allow file rename that changes extension) Open Explorer Beta (File management, with FTP/SFTP client) VLC nightly build (multimedia player) SwiFTP (FTP server) RemoteDroid (Use your android as a wireless mouse/keyboard) Ted (Text editor) Android Terminal Emulator osmand - map navigation (offers offline turn by turn navigation) sms backup + ( Google Play , Source code in github ) Not sure, but useful Google Play Newstand Google Cantonese Input SCUT gPen IME (繁體版手寫輸入法)

MATLAB Linux install error: /tmp/mathworks_15227/java/jre/glnxa64/jre/bin/java: Permission denied

When installing MATLAB on a Linux system, you may encounter the following error message. Preparing installation files ... Installing ... eval: 1: /tmp/mathworks_15227/java/jre/glnxa64/jre/bin/java: Permission denied My solution turns out to be the following: From the install package, cd to sys/java/jre/ xxx /jre/bin directory. ( xxx could be glnx86 or glnxa64 or something similar) chmod a+x * Execute the install command once again. You should be all set.

Online virtual tour project

Source code: http://charabanc.sourceforge.net/ Strength: just need client-side javascript, navigation experience close to google maps street view Generate stitches from photos: http://hugin.sourceforge.net/ Good simple tutorial to stitch 360-degree photos: http://www.lightspacewater.net/Tutorials/PhotoPano1/PhotoPano1/ A PhD thesis talking about automatic reconstruction of 3D scene and tour paths is here .

Useful Latex packages

Format program source code wrapfig

Dump a rtmp/mms stream in Linux

If you have rtmpdump in your computer, you may record a rtmp stream using the following command. rtmpdump -r [rtmp_stream] -o [output_file] Example rtmp streams: DBC (Hong Kong) rtmpdump -r rtmp://58.64.197.165/live/dbc2 -o dbc2recording.flv Another example rtmp streams: rthk tv stream rtmpdump -r rtmp://stmw.rthk.hk/livet/livetvma3.stream -o rthktvrecording.flv   Use mimms for mms stream.

DBC (Hong Kong) live streams

DBC1 (數碼大聲台) rtmp://58.64.197.165/live/dbc1 DBC2 (數碼大家台) rtmp://58.64.197.165/live/dbc2 DBC3 (數碼大錢台) rtmp://58.64.197.165/live/dbc3 DBC4 (數碼大晒台) rtmp://58.64.197.165/live/dbc4 DBC5 (Digital We) rtmp://58.64.197.165/live/dbc5 DBC6 (數碼大歌台) rtmp://58.64.197.165/live/dbc6 DBC7 (數碼大戲台) rtmp://58.64.197.165/live/dbc7 The location of these streams can be found by in the source code of the current DBC website .

Config octoshape to start up on boot

[Optional] Move the octoshape executable downloaded from the octoshape official site to some global location, like /opt/octoshape. Give good permission to typical users for the file there. Write a script named FOO, for example, in /etc/init.d/ directory. (/opt/octoshape/OctoshapeClient). And then run (chmod +x FOO) and then (update-rc.d FOO defaults)

Record octoshape stream with VLC Player

Image
To use VLC player to record an octoshape stream, first you need to figure out the HTTP location of the octoshape stream when it is played in your local computer. To find that out, play the octoshape stream with VLC player. You can check how to do that in Windows here . In Linux, one can do that according to the instruction here , with an additional simple config . For example, when I use the stream rthk.ch2 ., the corresponding HTTP location is shown as the window title. If you choose to record using VLC Player interface, then from the main menu, select "Media" -> "Convert/Save". Under the "Network" tab, enter the network URL in the only text field, and click on the "Convert/Save" button below. In the subsequent window, fill in the destination file name. Click "Start" to start recording. [Updated 2014/07/12] NOTE : The file has to be named with .mp4 as extenstion instead of .mp3 shown in the screenshot below. (i.e. /home/te

JMRI use note

Set up USB->Serial connection to the NCB signal central: * Decoder Pro, Edit->Preference, under Connection tab, select NCE/Serial/COM6 Load layout: * Decoder Pro, Panel->Load Panel, select one of the NEB&W layout. Load throttle: * Decoder Pro, Throttles->Throttle list windows, create your own throttle and run your train!

Speed up make

make -j x where x is the number of processors you can afford to use.

Recover your newly-installed harddrive in Windows XP

If you plug in a secondary hard drive into your Deskop but you can't find it out under your Windows XP, follow the steps below. 1) Open Computer Management -> Disk Management 2) If the offending disk doesn't show up in Disk Management, select "Actions", "Re-scan" and wait a minute or two or three 3) Note the disk number of the disk that won't mount, e.g., #5 4) Start a command line session 5) Type "diskpart" (Microsoft's disk partition program) 6) Type "select disk 5" (makes disk 5 the focus) 7) Type "clean" (removes existing disk partition) 8) Type "create partition PRIMARY" (creates a primary partition) 9) Type "assign letter=h" (assigns a drive letter to the "new" disk) Ref: here (It contains steps if you have a Windows 7 instead.)