tag:blogger.com,1999:blog-27540320792960436992024-02-19T20:44:04.586+05:30Linux TipsI have been using Linux for quite some time now. Thought, I would share some of the neat tricks I learnt over the years.आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.comBlogger28125tag:blogger.com,1999:blog-2754032079296043699.post-49643341186400817962018-03-30T14:01:00.001+05:302018-03-30T14:05:25.274+05:30Converting .odt documents to .pdf without opening libreoffice<div style="text-align: justify;">
If you have created a lot of text documents using libreoffice and want to convert them to .pdf format without having to open libreoffice, here is how to do it -
</div>
<blockquote>
<div style="text-align: justify;">
$ for i in *.odt; do /path/to/soffice --headless --convert-to pdf $i; done</div>
</blockquote>
<div style="text-align: justify;">
Just be sure that there are no spaces in the filenames.</div>
आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-7496111971054516512013-08-04T11:27:00.000+05:302018-03-30T14:01:59.006+05:30Fasten up Firefox and Chrome loading The latest iteration of Google Chrome and Firefox were taking a pretty long time to load after clicking on their respective icons. They were replete with frequent crashes. Then I found this solution -<br />
<br />
In Firefox, uncheck "Use hardware acceleration when available" in Edit -> Preferences -> Advanced -> General<br />
<br />
In Google Chrome, enable "Override software rendering list" by entering "about:flags" in the omnibox<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZubKwXxu6lhronfA1GHOMxd4IykD2rIT3XrJc1P5lWxN1Cb3FgAUAqstTom1EGdFJIyksgO7Z1iKXIpkfMLmZ3CekN3RBx99r0bdsAMeaH0JjXC_Qs4D6e8aUCodiZz81chxCdqPJDWc/s1600/Screenshot+from+2013-08-04+11:24:32.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZubKwXxu6lhronfA1GHOMxd4IykD2rIT3XrJc1P5lWxN1Cb3FgAUAqstTom1EGdFJIyksgO7Z1iKXIpkfMLmZ3CekN3RBx99r0bdsAMeaH0JjXC_Qs4D6e8aUCodiZz81chxCdqPJDWc/s320/Screenshot+from+2013-08-04+11:24:32.png" width="320"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">about:flags in Google Chrome</td></tr>
</tbody></table>
<br />आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-58085364698863033692012-02-19T20:49:00.000+05:302012-02-19T20:49:50.378+05:30Adding TTS functionality to Kindle Fire<blockquote>
Kindle Fire's native book reader app doesn't read the text aloud. However AReader supports TTS. I had to convert my pdfs to epub format using Calibre. AReader performs read aloud function extremely well using tts backends like eSpeak or Pico.
</blockquote>आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-32392084496362069602011-10-27T20:58:00.002+05:302011-10-29T18:24:13.030+05:30OpenSuSe 11.4<div style="text-align: justify;">
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEittVEXBKS72A0-5MrKGXTLOFp7AYw5z5kMa-aY5j4UqJifghbAQNU6-lLsxJ_Mna3wyIy0CRK6GQZ3kKcOK76qp-BuqYNN9Uxm0Xj-aYD4liKL_2gzXGEnnQc_7hV2PgH1LKYqILtJKzg/s1600/Screenshot.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEittVEXBKS72A0-5MrKGXTLOFp7AYw5z5kMa-aY5j4UqJifghbAQNU6-lLsxJ_Mna3wyIy0CRK6GQZ3kKcOK76qp-BuqYNN9Uxm0Xj-aYD4liKL_2gzXGEnnQc_7hV2PgH1LKYqILtJKzg/s320/Screenshot.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Gnome Shell 3 on OpenSuSE with Nord Shell theme and Sonar GTK theme</td></tr>
</tbody></table>
After having installed Xubuntu 11.10 over my install of Ubuntu 11.04, and even though it was working perfectly, I committed the mistake of installing Unity Desktop. I further aggravated the scene by installing Gnome Shell as well. I liked neither the Unity Desktop nor the Gnome Shell basically as I found it difficult to customize it as much as I would have liked to, even using Gnome-Tweak-Tool. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Then I downloaded OpenSuSE 11.4 (KDE) and installed it. Though it was very polished, I found that some times the user interface lagged. Having been used to the smoothly functioning interface of Ubuntu, I started hating it eventually. Then I tried installing Gnome 3 and liked it instantly. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Then yesterday, I felt like upgrading to Gnome 3.2 and downloaded the live iso from the www.gnome.org. After installing it, I found that there were some rough edges to Gnome 3.2. So, I downloaded OpenSuSE 11.4 Gnome version and installed it and found it perfect for my requirements. Now I am off Ubuntu for sometime atleast. </div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br /></div>आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-87262245970981274012010-12-18T21:39:00.004+05:302010-12-19T07:15:02.187+05:30Ubuntu 10.10 Maverick Meerkat - A Pleasant Experience<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeoiE3RPckjGgSgiObF1xBeDMayVe5Oq8st_fzGtrDGiZZS5Je3DmmvIraGY-CNN3Jx0Bs7leGVR_kP_OUcqLRjXVvLbUd7G5z6CGHTycEdtHffzyXwiryGkErA1X5ld2TLFKj29Tmx1s/s1600/Screenshot.png"><img style="float:center; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeoiE3RPckjGgSgiObF1xBeDMayVe5Oq8st_fzGtrDGiZZS5Je3DmmvIraGY-CNN3Jx0Bs7leGVR_kP_OUcqLRjXVvLbUd7G5z6CGHTycEdtHffzyXwiryGkErA1X5ld2TLFKj29Tmx1s/s320/Screenshot.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5552064086513874082" /></a><div><blockquote></blockquote></div><div style="text-align: justify;">Finally, 2 months after the release of Maverick Meerkat, I ventured to install it on my laptop. After using it for the past two days, I found it to be extremely user friendly. The User Interface is very elegant. Hardware detection is</div><div style="text-align: justify;">excellent. All the much-hyped features are no exaggeration. They make the user experience a very pleasant one. However, there still are certain rough edges that mar the overall effect. Nothing serious though!</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">My first gripe is that I am unable to add Facebook to gwibber, the new social networking app. It seems to be a well-documented and hitherto unresolved bug. It doesn't matter much really, but I wish this bug would disappear so that the experience would become more pleasant.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">The next irritant is a more serious one. The synaptics bug relating to two-touch gesture issue still persists and calls for an ugly work around! It still requires a script involving xinput to be executed each time I log in to make multi-touch work with synaptics. Ok, but the greater problem is, that I have to execute the script each time I log in, resume from suspend or resume from hibernation, which I often do. I wish something is done in this regards as well.</div><div style="text-align: justify;"><br /></div><div><div style="text-align: justify;">Besides these two irritants the others are minor and can be easily ignored. Overall I am having a nice time using Ubuntu 10.10. </div><div><br /><div><br /></div><div><br /></div></div></div>आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-153388469320419902010-11-12T18:23:00.002+05:302010-11-12T18:28:04.524+05:30To Make A Self-Reading Text File!<span style="font-size:100%;"><blockquote><br /><br />To make a text file self-read, add the following line at the beginning of the file -<br /><blockquote>#!/bin/more</blockquote>then make the file executable -<br /><blockquote>$ chmod +x <filename.txt></blockquote>The file can be executed as<br /><blockquote>$ ./filename.txt</blockquote><br /></blockquote><br /><br /></span>आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-9218178408791526382010-07-07T18:53:00.003+05:302010-07-07T18:57:04.357+05:30Finding the type of a file!<blockquote><br /><div style="text-align: justify;">Sometimes it so happens that you want to determine the type of a particular file. I found the following command useful when I was converting the format of certain audio files.<br /><br /><span style="font-style: italic;">$ file somefile.xyz</span><br /><span style="font-style: italic;"><span style="font-style: italic;"><span style="font-style: italic;"></span></span></span><br /><span style="font-style: italic;"><span style="font-style: italic;"><span style="font-style: italic;"></span></span></span>This outputs the type of the file somefile.xyz<span style="font-style: italic;"><span style="font-style: italic;"><span style="font-style: italic;"></span></span></span><br /><br /></blockquote><br /><span style="font-style: italic;"><span style="font-style: italic;"><span style="font-style: italic;"></span></span></span></div><span style="font-style: italic;"><span style="font-style: italic;"></span></span>आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-47065684049691316542010-06-20T17:17:00.002+05:302010-06-20T17:24:53.225+05:30Unmount a busy external drive!It so happens that sometimes when you try to umount your pendrive, the system reports -<br /><br /><span style="font-style: italic;">umount: /media/xyz : device is busy</span><br /><br />It is clear that some process is using the drive. It would be nice to quickly find out the errant process so that necessary action can be taken.<br /><br />We can find out which process is using the drive by fuser command -<br /><br /><span style="font-style: italic;">#fuser -m /dev/sdx</span><br /><br />where /dev/sdx is mounted on /media/xyz<br /><br />Let us say that the output of the above command is<br /><br /><span style="font-style: italic;">/dev/sdx: 538</span><br /><br />Then<br /><br /><span style="font-style: italic;">#ps -aux|grep 538</span><br /><br />reveals the name of the errant programme, in my case rhythmbox :-)आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-91261227580793848942010-05-11T19:23:00.003+05:302010-05-28T18:58:24.007+05:30To change the GDM login background in Ubuntu Karmic Koala<blockquote><br />I found to my utter consternation that one cannot change the login background in Ubuntu Karmic Koala (or Linux Mint 8, for that matter) from gdmsetup.<br /><br />I found this solution after a bit of googling -<br /><ol><li>Firstly, we log out of the current session and return to the GDM login screen.</li><li>At this point, pressing Ctrl-Alt-F1 throws up the terminal.</li><li>Login to this terminal with your username and password.</li><li>Then issue the following command -<br />$export DISPLAY=:0.0</li><li>followed by -<br />$sudo -u gdm gnome-control-center.</li><li>At this point, pressing Alt-F7 brings us back to the GDM login screen with gnome-control-center<br /></li><li>Selecting Appearance from gnome-control-center and making the appropriate changes to the background, font.</li><li>Closing the gnome-control-center window reveals the login screen with the new background.<br /></li></ol><br /></blockquote>आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-29825601034053904852009-08-14T12:07:00.001+05:302009-08-14T12:09:18.399+05:30Changing the default display manager (GDM / KDM / XDM etc.) in Slackware<blockquote><br />To change the Display Manager in Slackware, we have to edit the /etc/rc.d/rc.4 file as root user.<br /></blockquote>आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-60720082264421270622009-08-10T14:22:00.004+05:302009-08-10T14:36:52.517+05:30extracting audio from video (.flv) files downloaded from Youtube - the Linux way!<blockquote><br />I had downloaded some videos from Youtube and wanted to extract the soundtrack as an .mp3 file or .ogg file.<br />At first I tried the following command -<br /><span style="font-style: italic;">$ mplayer -dumpaudio my_file.flv -dumpfile my_file.mp3</span><br />Most of the times the audio was extracted perfectly. But some .flv files proved stubborn, and I was left with non-playable mp3s.<br />I found a solution at LinuxQuestions.org, where a knowledgeable member Ilgar provided the following solution<br /><span style="font-style: italic;">$ mplayer -quiet my_file.flv -ao pcm:fast:file=my_file.mp3 -vc dummy -vo null -channels 2</span><br />after which I was left with my_file.mp3 .<br /><span style="font-style: italic;">$ file my_file.mp3</span><br />revealed that it was a WAV file and not an mp3. It was still playable with mplayer. However when I downloaded it on my Samsung UltraTouch S8300 mobile, I was not able to play it.<br />I then converted it to .mp3 format using the app - SoundConverter.<br />Thanks Ilgar<br /><br /></blockquote>आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-69507911640758720912009-07-28T17:13:00.003+05:302009-07-28T19:15:07.688+05:30Scim error with OpenOffice 3.1<blockquote><blockquote><br />I was getting the following error when I pressed Ctrl + Space in OpenOffice window to initiate scim -<br /><br /><span style="font-style: italic;">Gtk-WARNING **: /opt/openoffice.org3/program/../basis-link/ure-link/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/lib/gtk-2.0/immodules/im-scim.so)</span><br /><br />After a bit of googling I found a solution -<br /><br /><br /><span style="font-style: italic;">cd /opt/openoffice.org3/basis-link/ure-link/lib</span><br /><br /><span style="font-style: italic;">sudo mv libstdc++.so.6 libstdc++.so.6.orig</span><br /><span style="font-style: italic;">sudo ln -s /usr/lib/libstdc++.so.6.0.9 libstdc++.so.6</span><br /><br /><span style="font-style: italic;">sudo mv libgcc_s.so.1 libgcc_s.so.1.orig</span><br /><span style="font-style: italic;">sudo ln -s /usr/lib/libgcc_s.so.1 libgcc_s.so.1</span><br /><br /><br /><br /></blockquote><br /></blockquote>आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-57862006991238481092009-06-14T09:44:00.003+05:302009-06-14T09:50:51.787+05:30Got touchpad to scrollAfter upgrading to Slackware 12.2, the touchpad on my laptop was not scrolling. After a bit of googling, I found this thread -<br /><a href="http://www.linuxquestions.org/questions/slackware-14/synaptics-touchpad-in-slackware-12.2-on-hp-g60-702809/#post3573157">http://www.linuxquestions.org/questions/slackware-14/synaptics-touchpad-in-slackware-12.2-on-hp-g60-702809/#post3573157</a><br /><br />as suggested in the above link, I changed the line<br /><pre class="bbcodeblock" dir="ltr" style="border: 1px inset ; margin: 0px -99999px 0px 0px; padding: 3px; overflow: auto; width: 98%; height: 34px; text-align: left;">options psmouse proto=imps</pre><br />to<br /><pre class="bbcodeblock" dir="ltr" style="border: 1px inset ; margin: 0px -99999px 0px 0px; padding: 3px; overflow: auto; width: 98%; height: 34px; text-align: left;">options psmouse proto=auto</pre><br />in /etc/modprobe.d/psmouse<br /><br />then after reloading the psmouse module, and restarting X, my touchpad was scrolling.<br /><br /><script src="http://shots.snap.com//client/inject.js?site_name=0" type="text/javascript"></script><script src="http://shots.snap.com//client/inject.js?site_name=0" type="text/javascript"></script>आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-45473799608478180062009-04-09T10:16:00.003+05:302009-04-09T12:13:12.472+05:30Getting Right Alt key to workThe right alt key press was eliciting no response on my Ubuntu 8.10 laptop in Gnome. After a bit of Googling, I found the following solution -<br />System -> Preferences -> Keyboard<br />Here choose Layouts tab. Then choose Other Options button. Keyboard Layout Options widow pops up. In this click on Alt/Win key behaviour and select -<br />Alt and Meta are on Alt keys.<br />This should solve the problem.आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-56374144037906700482008-12-12T17:52:00.004+05:302008-12-12T18:09:07.125+05:30How I set right non-functional spell-checker in OpenOffice.org3<blockquote><br />Spell Checker was not working in my install of OpenOffice.org3 on Slackware 12.1. Wrongly spelt words were not being highlighted. Pressing F7 after selecting text containing spelling-errors was not detecting any errors. After a lot of skulduggery and quite a bit of googling, I realized that the problem was some how related to locales, hence I added the following line to /opt/openoffice.org3/program/soffice -<br /><br /><span style="font-style: italic;">export LANG=en_US</span><br /><br />Now spell checker works!<br /></blockquote><br /><script src="http://shots.snap.com//client/inject.js?site_name=0" type="text/javascript"></script><script src="http://shots.snap.com//client/inject.js?site_name=0" type="text/javascript"></script><script src="http://shots.snap.com//client/inject.js?site_name=0" type="text/javascript"></script>आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-47187335028571454082008-08-31T08:44:00.002+05:302008-08-31T08:54:04.390+05:30Empty Applications Menu? Repopulate it.<blockquote><br />All of a sudden, one fine morning I found that the Applications Menu in GNOME on my Ubuntu 8.04 laptop was empty. When I clicked on the Applications Menu, all I got was a small rectangular box, about a few pixels in dimensions. I found a solution to this, (the solution was the first result that Google threw at me). This problem seems to occur when there is not much hard disk space left. When this occurs, you are unable to run alacarte even from command prompt.<br />The solution is to delete the applications.menu file from ~/.config/menus/ directory.<br /><blockquote>$rm ~/.config/menus/applications.menu<br /></blockquote>After this the Applications Menu is restored.<br /></blockquote>आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-66314795414165135462008-08-23T09:52:00.002+05:302008-08-23T10:00:53.656+05:30ls tips - 1Sometimes it becomes necessary to search for all files that end in a particular character, like, for example a digit. The following command will list out all files that have filenames ending in a digit -<br /><blockquote>$ ls | grep '[0-9]$'</blockquote><br />It is essential that the $ symbol is placed after the paranthesis. This $ symbol will cause grep to look for the digits from 0 to 9 at the end of the filename.<br />A better way would be -<br /><blockquote>$ ls | grep '[[:digit:]]$'</blockquote><br />Similarly, if you want to search for filenames that begin with a digit, here is the command -<br /><blockquote>$ ls | grep '^[0-9]' </blockquote><br />or<br /><blockquote>$ ls | grep '^[[:digit:]]'</blockquote><br />This will list all filenames that begin with a character.आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-19860972151945391692008-08-22T17:49:00.003+05:302008-08-22T17:58:24.230+05:30Giving Maximum processing time to any processTo give maximum processing time to any process, first the PID of the process has to be determined using the command ps. Say you have firefox running and you want to determine its PID.<br /><blockquote>$ ps -A | grep firefox</blockquote><br />on my system gives the following output<br /><blockquote>12845 pts/0 00:04:00 firefox</blockquote><br />so 12845 is the required PID.<br />By issuing the following command we can give maximum priority (-20) to the particular process -<br /><blockquote>$ sudo renice -20 12845</blockquote>This can be ascertained using the 'top' command.आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-79914801299593148812008-08-22T17:32:00.002+05:302008-08-22T17:43:08.064+05:30Re-installing GRUB in Ubuntu<blockquote><br />Imagine a scenario, wherein you have installed a brand new distro on a system that already has some other distro installed. You have properly configured the GRUB to enable you to multi-boot. Now for some reason, you do not like the GRUB of the distro that was last to be installed, you want to revert back to the previous one. So what do we do now?<br />The solution is to boot into the required distro from the GRUB menu and then follow these steps -<br />1. Login as root from the command prompt and enter the following command<br /><blockquote># sudo grub<br />grub > find /boot/grub/stage1</blockquote><br /><br />Let us say, the command returns (hdx,y).<br />2. Then enter the following commands -<br /><blockquote>grub > root(hdx,y)<br />grub > setup (hdx)<br />grub > quit</blockquote><br /><br />That's it! When you reboot, you'll be presented with the previous GRUB screen.<br /></blockquote>आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-49175852606097824662008-07-31T12:10:00.002+05:302008-07-31T12:34:00.183+05:30Getting the Touchpad to work in Slackware!<blockquote><br />This is how I got the touchpad on my laptop to work using synaptics.<br /><br />After installing synaptics, the following lines have to be added to /etc/X11/xorg.conf. Before fiddling with xorg.conf, it is always suggested that you take a backup of the file -<br /><br /># cp /etc/X11/xorg.conf /etc/X11/xorg.conf.old<br /><br />The lines to be added to xorg.conf are as follows -<br /><blockquote><br />Section "Module"<br /> Load "synaptics<br />EndSection<br /></blockquote><br />Then in the "InputDevice" Section -<br /><blockquote><br />Section "InputDevice"<br /><blockquote><br />Identifier "Synaptics Mouse"<br />Driver "synaptics"<br />Option "Device" "/dev/psaux"<br />Option "Protocol" "auto-dev"<br />Option "HorizEdgeScroll" "0"<br />Option "LeftEdge" "1700"<br />Option "RightEdge" "5300"<br />Option "TopEdge" "1700"<br />Option "BottomEdge" "4200"<br />Option "FingerLow" "25"<br />Option "FingerHigh" "30"<br />Option "MaxTapTime" "180"<br />Option "MaxTapMove" "220"<br />Option "VertScrollDelta" "100"<br />Option "HorizScrollDelta" "100"<br />Option "MinSpeed" "0.09"<br />Option "MaxSpeed" "0.18"<br />Option "AccelFactor" "0.0015"<br />Option "SHMConfig" "on"<br />Option "TapButton1" "1"<br />Option "TapButton2" "2"<br />Option "TapButton3" "3"<br /></blockquote><br />EndSection<br /></blockquote><br />Then in the "ServerLayout" Section<br /><blockquote><br />Section "ServerLayout"<br /><blockquote><br />Input Device "Synaptics Mouse" "CorePointer"<br /></blockquote><br />EndSection<br /></blockquote><br /></blockquote><br />After this reload the "psmouse" module as follows -<br /><blockquote><br />$ sudo modprobe -r psmouse<br />$ sudo modprobe psmouse<br /></blockquote><br />This should be added to your startup scripts.<br />The touchpad should be working after you reboot.आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-4258677316643028582008-07-20T22:19:00.002+05:302008-07-20T22:23:05.694+05:30Command Line Music Player!mpg321 can be used to play mp3 files from command line. We can even create a playlist of all the songs stored in various directories and play the list via mpg321. If your songs are stored in various folders, the folder names can be appended to the file-names using the following script. First of all the spaces have to be removed from the file names (as described in a previous post). Then we can create the following script -<br /><br /><blockquote><br />#!/bin/bash<br />for i in *;<br />do<br /> a=$i;<br /> b=`echo $PWD\`$i;<br /> echo $b >> playlist; # the file names are stored in "playlist"<br />done<br /></blockquote><br /><br />this way the names of all the files in all the subdirectories will be stored in "playlist" along with the appropriate path. Then we can play the list<br />as follows -<br /><blockquote><br />$ mpg321 --list playlist -z # -z for shuffle mode<br /></blockquote><br /><br />That is it! Enjoy your music! Here we are assuming that all files are stored in various subdirectories of one parent directory, say 'music'. The script has to executed from the directory 'music'.आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-68913265101638469392008-07-20T11:15:00.003+05:302008-07-20T11:44:02.237+05:30Samsung ML 2010 on Slackware 12.1The Samsung ML 2010 is automatically configured on Ubuntu, however on Slackware 12.1, the Samsung Unified Driver fails to install with the following error -<br /><br />Unable to restart cups, script not found.<br /><br />After going through the install script install.sh in the cdroot/Linux directory created by untarring the driver, if found that the para - restart-cups() in the install.sh script reads as follows -<br /><br />.....<br />elif test -e /etc/init.d/cupsys; then<br />CUPS_SCRIPT=/etc/init.d/cupsys<br />.....<br /><br />it is obvious that the installer wouldn't work. So I changed it to<br /><br />.....<br />elif test -e /etc/rc.d/rc.cups; then<br />CUPS_SCRIPT=/etc/rc.d/rc.cups<br />.....<br /><br /><br />Moreover, the driver to be used for this printer is the one for 2150 and not 2010, that is the right driver is ML-2150 SPL II instead of ML-2010.आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-78680071968505970702008-07-19T23:27:00.003+05:302008-07-19T23:39:25.587+05:30Removing spaces from file names!The following script, which I found <a href="http://linux.blowshard.net/2007/03/10/bash-script-batch-convert-mp3/">here</a> after an hour of googling, can be used to remove spaces and replacing them with any character (like '_') from file names<br /><br />$ for f in *; do<br />> file=$(echo $f | tr ' ' _)<br />> [ ! -f $file ] && mv "$f" $file<br />> done<br />$आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-61858546595376170052008-07-19T20:58:00.002+05:302008-07-19T21:06:34.613+05:30Command line utility to print a Calendar$ cal<br /><br />will print out a calendar for the current month on the screen.<br /><br />$ cal 2008<br /><br />will do the same for the year 2008.<br /><br />$ cal 03 2008<br /><br />will do the same for the month of March, 2008. If, however, we want to print the calendar as a .ps file, we can use the pcal utility.<br /><br />$ pcal -w 2008 -s 0:0:0 -P a4 > 2008.ps<br /><br />We can convert this .ps file to .pdf using<br /><br />$ ps2pdf 2008.ps 2008.pdfआदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0tag:blogger.com,1999:blog-2754032079296043699.post-14458976516294456602008-07-19T19:48:00.002+05:302008-07-19T19:59:44.920+05:30Command Line Calculator!To do small calculations without starting your calculator utility here is a small trick. Suppose you want to multiply 2 and 3, do this -<br /><br />$ echo $[2*3]<br /><br />However if you wanted to divide 2 by 3<br /><br />$ echo $[2/3]<br /><br />would give a '0'.<br /><br />We can still make use of the command line to get the correct answer. We have to use 'bc'. Like this -<br /><br />$ echo '2 / 3' | bc -l<br /><br />Here is the output -<br /><br />.66666666666666666666आदित्य प्रताप वन्देमातरमhttp://www.blogger.com/profile/11899477609008379796noreply@blogger.com0