Skip to main content

Posts

Showing posts from 2008

Amarok/firefox/flash sound problem

It is a nagging problem in Linux which plagued me for quite some time. For example, if the Firefox window went to any page that contains needed sound(read flash) output, then immediately all external sound applications including amarok used to hand and also caused severe GDM freezes. It is fixed by doing the following: I reinstalled pulseaudio and libflashplugin support (which wasn't even installed): sudo apt-get install --reinstall pulseaudio libflashsupport and then changed everything to pulseaudio in "system->preferences->audio settings". This advice was posted here. Now amarok and flash run at the same time and everything seems to be fine. source : http://ubuntuforums.org/showthread.php?t=715486 See also http://kheyali.blogspot.com/2009/09/audio-problem-in-dell-laptop.html

Change Emacs background and foreground colors

Sometimes Emacs starts with a bizzare black background. If you want the familiar black text on white background proceed as follows. While in Emacs Alt+x Type, set-background-color (like this : set(space)background(space)color(enter) ) Type, Cyan (This step is neccessary so that the text remains visible while swapping the background and foreground colors. IF you want you can skip this step.) Alt+x Type, set-foreground-color (like this : set(space)foreground(space)color(enter) ) Type, black Alt+x Type, set-background-color (like this : set(space)background(space)color(enter) ) Type, white Done. For a complete guide to Emacs see http://www.delorie.com/gnu/docs/emacs/emacs.html#SEC_Top But I still don't know how to make this effect permanent. Someone suggested to write to the .emacs file directly. I haven't tried it yet.

Multimedia softwares for Linux

For all Debian-Users go to debian multimedia repository(www.debian-multimedia.org) http://www.debian-multimedia.org/ Multimedia authoring tools : Cinnelera - best but too advance and technical. Avidemux - Virtualdub alternative for linux. KmPg2 - http://kmpg2.sourceforge.net/ - convert anything to MPEG-2 for DVD use. DVDAuthor Wizard - http://dvdauthorwizard.sourceforge.net/ - make DVD from MPEG-2 clips, with menus etc. Q-DVDAuthor Devede tovid transcode dvdrip (Perl frontend to transcode) mencoder (must have) subtitleripper xine (must have) ffmpeg (must have) Video players: mplayer - kmplayer, smplayer. (must have) vlc media player (must have) Kaffeine realplayer (must have) These four will mostly cover all of the video needs of an average Linux user. Music players: amarok (must have) audacious beep media player xmms2 - xmms is now only a backend. (must have) esperanza - frontend to xmms2.

Join avi files in linux

The easy way is to use avimerge. Still I include both methods. Method 1 : source : http://www.pembo13.com/linux/lcs/entries/12 Merge, join two or more avi files Prerequisites For all this to work you need the transcode package. So install (or make sure that it is there) yum install transcode Instructions 1. Open up a terminal 2. Go to the directory where the files are (this is just to make things simpler) 3. Assuming that the file you want the result to be is named foo.avi, and you have two smaller files you want to merge (in order) named foo1.avi and foo2.avi, enter the following command: avimerge -o foo.avi -i foo1.avi foo2.avi Method 2 : source : http://techtips.chanduonline.com/2006/08/15/how-to-join-multiple-avi-or-mpg-files/ How to join multiple .avi or .mpg files sudo apt-get install mencoder mplayer Now that the hard part is out of the way, we’re going to make use of the wonderful cat command. I’d renamed each Bloodspell video as b1.avi - b7.avi. Now to string the

Howto merge pdf files in Linux

Many times we download a number of pdf files which are supposed to be part of a single file. This is the case with the lecture notes that we download from some professors website. And it is desirable to have a single pdf file instead of bits and pieces of the chapters. The following procedure will explain howto acheive this.(Linux only) You need to have ghostscript installed in your linux box. First goto the folder and ls only the needed pdf files like - ls -x 0*.pdf This will create a list of files in sequential format, easy to select. All that is needed is to select each line and middle click paste after the command gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf example :- If gs is installed then type in command line the following command - $ gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf 00.pdf 01.pdf 02.pdf 03.pdf 04.pdf 05.pdf 06.pdf 07.pdf 08.pdf 09.pdf 10.pdf 11.pdf 12.pdf 13.pdf 14.pdf 15.pdf The bold ones the pdf file

Prevent Linux (/Unix) console from getting garbled

If you cat some binary files for instance, it corrupts the shell, the entire window gets garbled and you need to close it. Its a known issue and has been a known issue for ages.Sometimes people accidentally do it when coding for instance, you accidentally cat your binary instead of your output. Solution is to reset the terminal. $ reset source : http://brainstorm.ubuntu.com/idea/4972/

Mathematica problem in Linux (Hardy)

1. Backspace or delete working until i turn numlock off. This is an old mathematica bug fised in recent versions. The Mod2 key is probably mapped to your Num Lock key. If the Mod2 keysym is mapped to Num Lock, hit the Num Lock key to turn it off. Depressing Mod2 turns on an undocumented feature of the X front end - global selection. When global selection is activated, the mouse pointer will change from an I-beam to a hand. You cannot place a text edit cursor within a cell in this mode, but if you select a cell of a given style, then all cells of that style will be selected. To avoid this situation in the future, simply remap Mod2 to another key using xmodmap or some other keyboard configuration utility. Notes It appears that by default Mandrake Linux 8 sets the Num Lock key on and maps it to Mod2. Therefore, it is suggested that you remap Mod2 to another key as described above. source : http://support.wolfram.com/mathematica/systems/linux/general /configurenumlock.html If you want to

Rip DVDs in Linux

DVD burning Source : http://ubuntuforums.org/showthread.php?t=133642 Is there a command available to install something in ubuntu that decrypts dvd's so I can back-up my dvd movies? Install dvdbackup from the repository. Then insert your DVD movie in the drive and type this in the terminal: dvdbackup -i /dev/dvd -M -o dir/ This will backup the whole DVD movie with extras and menus, etc. You might want to have a Dual layer burner for this too. It will put the backup in the directory that you put in place of dir/. example: dvdbackup -i /dev/dvd -M -o backupmovie/ After it finishes this then insert your blank DVD disc into the drive and type from terminal: growisofs -speed 1 -dvd-compat -Z /dev/dvdrw -dvd-video dir/ example using the backupmovie/ directory that contained my backup would be: growisofs -speed 1 -dvd-compat -Z /dev/dvdrw -dvd-video backupmovie/ The dvdbackup command will put into the backupmovie/ subdirectory the disc title of the movie. So be sure to include that at the

Make your Firefox extensions work

Many times we run across Firefox extensions which are are not compatible with the version that we are using. But there's always a workaround. Two of them actually. The first one - Type about:config into Firefox 's address bar and click the "I'll be careful, I promise!" button. Right-click anywhere. Choose New>Boolean . Make the name of your new config value extensions.checkCompatibility and set it to false . Make another new boolean pair called extensions.checkUpdateSecurity and set the value to false . Restart Firefox . The second one - Download the *.jar , *.xpi file. Open the file with WinRAR . Look for the file install.rdf . It contains the information about which versions of Firefox it is compatible with. Edit the file in Notepad . For that you may have to copy the file to hard disk, edit it,save it, then copy it back to the file with WinRAR . Change the x.0.0.* in < em:maxVersion > x.0.0.* < /em:maxVersion > to 4.0.0.* or any high

Removing the Language Toolbar in Windows XP

Click the Start Button. Select Control Panel option. Double-Click the Regional and Language Options icon. Click on the Languages tab. Click the Details button. Click the Language Bar button. Remove the checkmark from the Show Language Bar option. Click OK. source : http://www.dtdn.com/blog/2004/12/removing-language-toolbar-in-windows.htm

xmms problem: xmms not playing songs

This is actually a SElinux issue. SElinux prevents laoding of xmms shared libraries *.so in memory. I found a fix in the site http://www.michaelminn.com/index.php?linux/notebooks/toshiba-m35x.html The fix is as follows. SELinux Issues : When I compiled and ran the open source media player at XMMS , I got the following error: are compilation issues with contemporary distributions /usr/local/lib/xmms/Input/libmpg123.so: cannot restore segment prot after reloc: Permission denied The problem is caused by SELinux restricting the loading of dynamic libraries by programs. (reference) (reference) It's easy to fix by changing the security context of the XMMS libraries: chcon -t texrel_shlib_t /usr/local/lib/xmms/*/*.so The problem will also occur with Mozilla plugins and can be fixed with the same command Alternatively, since this problem may appear for other packages, you can disable SELinux by changing a line in the /etc/sysconfig/selinux file to: SELINUX=disabled

Reverse alternate pages in prinouts

Most of the times while printing landscape in duplex mode all the alternate pages comes out to be flipped. I couldn't find a command in linux or ps-tools that takes care of this problem. Photoshop , however has an option to reverse alternate pages before sending it top the printer. In terminal, this can achieved by manually editing the .ps file. Just open the file in any text editor like vim and find Tumble(false) and change it to Tumble(true) . The .ps file when opened in vim would look something like the following. Just, change the one which is highlighted. %%BeginSetup %% Pagedevice definitions: countdictstack % Push our own mark, since there can be several PS marks pushed depending % where the failure really occured. /a2ps_mark { %%BeginFeature: * Tumble True (<<) cvx exec / Tumble (true) cvx exec (>>) cvx exec systemdict /setpagedevice get exec %%EndFeature %%BeginFeature: *Duplex True (<<) cvx exec /Duplex (true) cvx exec (>>) cvx exec systemd

Grep Tricks

====================================================== Grep Tricks #1 How to select multiple lines with grep before and after the matched pattern . grep -B1 -A2 "DMA" message.txt B[n]          n lines before matched pattern A[n]          n lines after matched pattern Grep Tricks #2 How to display(print) the line numbers of the matched pattern with grep. grep -n "DMA" message.txt n              prints line no ======================================================