Harsh J

Memoirs of a QWERTY Keyboard

Archive for the ‘Ubuntu’ tag

Tinge theme for gEdit

12 comments

Announcing a nice-looking dark theme, Tinge color scheme for gEdit (Text Editor for GNOME):

Tinge (v1.0)

Tinge Logo - Curvy ain't it?


Preview (In Python):

Tinge preview - In Python!

Download Instructions:


Installation Instructions:

  1. Its very simple! Simply run your gEdit and go to Edit – Preferences – Font and Colors tab.
  2. Under the Color Scheme list, click the Add… button and select this downloaded Tinge.xml file from wherever you saved/moved it to.
  3. You’re done! Enjoy the colors as you develop! ;)

Named it Tinge just for fun and cause it really just a tinge more than the Darkmate. Also inspired by Monokai’s theme here.

Written by Harsh

January 27th, 2008 at 2:25 am

Jumping onto the console bandwagon

6 comments

After I discovered the existence of this very wonderful screen program a few months ago, I’d always been trying to use more and more simple command-line / console based programs rather than those GUI heavyweights which both use up resources and clutter my desktop.

At first I learned vim basics via vimtutor, but I gave up using it as a default text editor and still preferred the gedit warmth. But vim was powerful, no doubt, and definitely more faster than moving your mouse around to activate events and work with dialog boxes. But it just didn’t fit well with me that I launch it each time I need to dump some text or write something up quickly. Only while programming something up did I summon its need. The jump to console applications here was not so good!

irssi - The IRC client of the future.

Next up, I tried the most popular thing screen is famous for, the IRC client called irssi. This one simply blew me away. After all, in an IRC you do nothing with a mouse, all you do is talk with the keyboard, and run commands too with it. So why the GUI, I wondered, and ditched the good old XChat and its various scripts for a much more simple console interface, the mighty irssi. Running it within a screen session gave me more comfort of not having an icon blinking or simply residing on my tray or various other bars and that I could connect to the session anytime I desired. Takes about ~1 MB for one server (irc.freenode.net) with 4 channels auto connected. Jump to console applications for IRC – Very good!

Next up was the media requirements. While video was out of the question, cause I can _never_ give up Mplayer+GUI whatever comes my way, I looked at Console based audio players to satisfy this urge. I did some research on popular and non popular ones and am currently using Plait, which I think is the perfect thing I’d need. Its revolutionary, and is based on a hinting system. It (plaiter) takes about 600~ KB of my RAM for a list of 10 songs. Directly streams them to the audio device or any even an online stream if desired, at no or very less resource costs! An example follows:

$ plait staind not outside
Now this command above will play all songs in my library which are by Staind but will not play those songs matching the name Outside.
Awesome isn't it?

The shift here, for music, is still quite a bumpy one so far since pausing / stopping is a bit tedious but I have made ways for it by mapping my keyboard’s (a Samsung SDM4500P) multimedia keys to its commands. More about this in some other post over time here.

The last thing I’ve shifted to a console application is the beautiful rTorrent client. This client is an amazing one. Its light as irssi, perhaps even lighter, cause its just taking ~1 MB of my RAM and its got all the features of a good client including PEX and DHT in it. Only issue with it is in its torrent list managemen. Its still under heavy and active development with very clean documentation so that shouldn’t be an issue for too long, and am happy with this anyway. Moreover, rTorrent uniquely is different cause it directly transfers from your file-system to the network stack, and vice versa, so very minimal amount of memory is used! Console based application for torrents – fairly good!

I’ll blog about each of these items and more as I encounter simpler alternatives to my major tasks soon here, detailing on how to install them, set them up and other usage details. Very soon. :)

A final list of software I’ve talked about in this post:

  • screen
  • vim
  • gedit
  • irssi
  • plait
  • rtorrent

More soon! I’m loving the consoles! :D

Written by Harsh

January 22nd, 2008 at 6:56 pm

Shorten the apt-get install!

one comment

sudo apt-get install [name]

Thats probably one of the most used commands on your Ubuntu box. Hate writing such long lines for while installing a package as quick as possible? This guide should help you reducing the length of that command to just, well, 1 character!

Like this example:

user@domain:~$ i john
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
john
(. . .)

Notice the one-letter i in the above? I created i to stand for apt-get install.

Unix/Linux have something fantastic in them called alias. The command alias is used to create shorter and quicker keywords to another command which could be very long with all its parameters. So lets move on to making a simple alias for apt-get.

Basically our command is:

alias i="sudo apt-get install"

But just giving that would not last anymore once your terminal is closed. To make it permanent we have to do the following in the Terminal:

echo alias i=\"sudo apt-get install\" > ~/.bash_aliases

Now give this command:

gedit ~/.bashrc

A text editor should open with some content in it. Now scroll a bit until you find the following lines: (Should be around 50~ lines from beginning)

#if [ -f ~/.bash_aliases ]; then
#. ~/.bash_aliases
#fi

Now remove those 3 #’s (hash comment symbols) from each of the lines so that they look like this:

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

Save and close the editor. Restart your Terminal and voila, you can now do the i method as shown earlier! :D

Example:

user@domain:~$ i gnome-bluetooth
[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
gnome-bluetooth is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Written by Harsh

December 16th, 2007 at 7:00 pm

Fixing the garbled video issue in Ubuntu for NVIDIA cards

7 comments

Some of you (actually a very few I guess), might be experiencing a weird and random issue of having all your videos play garbled or corrupted with lots of pink and green lines. The corruption / garbling also leads to a total freeze at times, for me at least. As an example this is how your video would look like when played in ANY player:

Garbled video in Ubuntu Gutsy Gibbon

Yeah any, VLC, MPlayer, you name it. Once it starts appearing it appears in everything you play!

I don’t know of a proper bug page for this at Launchpad but I do know the fix. Apparently its something bad in the nvidia-glx-new driver package that makes this happen. So the fix is to roll back to the normal nvidia-glx driver. You can either run the following or just click on the link to do so:

sudo apt-get install nvidia-glx

That should probably fix it (as it has for me). In case someone stumbles here with a better workaround than to lose performance with the removal of the nvidia-glx-new driver, do post it here.

P.s. This is exclusive only to Ubuntu Gutsy Gibbon 7.10 I think. Cause I haven’t seen any such issues on Feisty on either of the drivers.

P.s. again. I use a GeForce 7600GT by the way. And this thing was sure a pain in the ___.

Written by Harsh

December 14th, 2007 at 11:15 pm

Convert CHM files to PDF in Linux

31 comments

I’ve tried a lot of ways to do this thing in Linux (Ubuntu) and finally I found the easiest one to use.

Called simply as ‘chm2pdf‘, this is a small script written in Python and it uses a few dependencies you might have to install first.

Now to install it, simply follow this guide:

1. Install dependencies by running in the Terminal:

sudo apt-get install htmldoc libchm-bin python-chm

2. Download chm2pdf by clicking this.

3. Now extract the downloaded file.

4. Open your Terminal and browse to the folder you extracted and run:

sudo python setup.py install

5. You’re done!

Now to use it is very simple:

In Terminal, type:

chm2pdf --book filename.chm
# (Where filename is obviously your required file to be converted.)

And surprise surprise, a PDF copy will be waiting for you just next to your CHM file!

Written by Harsh

December 6th, 2007 at 12:08 pm

Posted in Linux,Software

Tagged with , , , , ,