Archive for the ‘linux’ Category

typing tutor for linux

Saturday, May 20th, 2006

Features -
1. A split interface with text paragraph shown in upper view, and a typing interface in lower view.
2. The current line the user is typing is highlighted with different color.
3. Any error made in typing is highlighted with another color.
4. Can save the current typing session and load it again.
5. Can specify the source text as a file.
6. And all of this in real editor like environment.

If these features are good enough to call something a typing tutor.. then i am talking about something that was there all along and we didnt realize. The vimdiff ( aka vim -d ).

vimdiff.typingtutor

Steps :
- get a input/source text. say its in file input.txt
- start vimdiff with following command
vimdiff -o input.txt /tmp/temp.txt \
“+exe 2 \”wincmd w\”" “+normal 1000i ” \
“+diffupdate” “+go 1″ “+startinsert”

( Don’t worry about the long argument list. They are used to customize the starting point. Otherwise just the command vimdiff input.txt /tmp/temp.txt is enough.)

A few other setting might make it a better experiance -
- :set wrap
- :set diffopt=filler,iwhite,icase
— iwhite for ignoring amount of white spaces
— icase for ignoring case senstivity
- :set scrollbind
- omit the -o option for vertical split
- :diffupdate to sync the two windows forcefully

enjoy vimtt !!

Related : Advanced Vim Tutorial

graps : capture OpenGL Frames

Tuesday, May 2nd, 2006

graps is a tool for grabing frames from openGL application, without editing the application. graps can be used for making video from an opengl application. graps can also be useful for monitoring fps of opengl application.

graps writes the glReadPixel data to file on each glXSwapBuffers call. graps uses the power of LD_PRELOAD to run without modifying the application.

graps is dirty fraps alternative for screen and realtime video capturing and fps monitoring ( hence benchmarking ).

graps can be downloaded from here. See readme.txt for help.

Update1 [08.09.2007] :
- recording to video [ using mencoder ]. Thanks to Mineral for hints (see comments).
- grapsctl, separated frame capturing and writing to image/video.
- bug fixes : ppm header (thanks matt) and width*width (thanks Mineral).
- graps v0.2 release.

mplayer/mencoder tips

Tuesday, April 18th, 2006

A few mplayer tips i have found useful

* amplify volume in low volume media
mplayer video-name -softvol -softvol-max 500
- this will start with a low volume, u need to increase to volume using the volume keys
- instead of 10000 use the minimum value(10-10000) that works for you

* save a stream (eg rtsp://) to a file
mencoder stream-url -o output.avi -oac copy -ovc copy
- the stream url is written inside the file provided, eg inside .ram

* clip a video
mencoder input-video -o output-video -ss start-time -endpos end-time
- start-time/end-time can be seconds or hr:min:sec

* merge videos
cat videos list seperated by spaces | mencoder -oac copy -ovc copy -o output.avi -

* use 2 subtitle files with single movie file or 1 subtitle file with 2 movie files
bind a key for sifting the subtitles by cd1 duration ( in seconds ), and use this key once

links
* Encoding with MEncoder
* Video Playback and Encoding with MPlayer and MEncoder
* MPlayer docs

Thin Client Setup

Sunday, April 9th, 2006

Yes! I did it.
Full FC4 (without kde and gnome) on diskless thin client.
Using PXE, NFS and this help.

Rough Procedure -
- set the thin client to use pxe bootup.
- configure dhcp server to give ip and tftp server link
- configure tftp server to serve kernel and initrd image
- configure the initrd image to start network and mount root filesystem over nfs. optionally set home on nfs.
- install a filesystem you want to provide to the thinclient and publish it over nfs.

The available ram in the thin clients is just 90Mb (128 actually, but shared with onboard graphics). This is less and cause logs ot pagein/out. Upgrading the thinclients to 256Mb ram will make them just perfect. I will try to push it.

PS : Earlier they use to run using PXES. Its good but root over nfs using current method provides full OS thus works out better.

PS2: The image above is shown during the bootup. If you can send me another cartoon i can put it up. if i like it. anythign creative and original. shiben u there ?