L3ftm1n0r

Anything

Archive for the ‘Linux’ Category

PySDM for automounting partitions

Posted by spewit on 05/08/2009

PySDM ( Python Storage Device Manager ) can be used to customize your hard disk partitions without fiddling with the fstab file.
It’s as simple as:

sudo apt-get install pysdm
$gksudo pysdm

PySDM needs python and almost every linux distribution is bundled with python out of the box. So you would not need to install python.
One major use of pysdm is to enable auto-mounting ntfs ( your windows partitions ) in linux. To do that simply:

1. Select the partition from the left side-pane. Your hard disks and partitions may be named as sda* or hda*. To know which ones you want to auto-mount ( your ntfs ones ) simple select each and look for the ones with “ntfs” in their “type”.
2. Select the desired partition
3. Click on the assistant button
4. Check the option “The file system is mounted at boot time”
5. Uncheck “Mount file system in read only mode”
6. If you want everyone to mount/unmount the partition you can check the options:
“Allow any user to mount the file system”
“Allow a user to mount/unmount the file system”
7. Once you’re done click on Apply

Reboot and your ntfs partitions would be mounted automatically.

PySDM sourceforge page: http://pysdm.sourceforge.net/

Posted in Linux | Tagged: , | Leave a Comment »

Figlet Art

Posted by spewit on 02/08/2009

Figlet for your old-school text banners is a cute little app. I was actually pleasantly surprised with it’s simplicity and excellent font rendering.
Here’s the blog’s name made by figlet:


By plic at 2009-08-02

The cli interface has quite a lot of options but to make a simple banner like this takes very little:

$figlet “leftminor”

Nice little app to have fun and to give your forum signature a retro newsroom look!

Posted in Linux | Tagged: | Leave a Comment »

Desktop Blogging Client For Linux

Posted by spewit on 29/07/2009

I have been searching for a good blogging client for my wordpress blog for quite some time. I found the best thing available right now for Windows in Live Writer but had nothing comparable in my linux system.
So I tried out almost every application out there to finally feeling satisfied with QTM.
Before it some of the clients that i tested for my convenience were:

  1. BloGTK – Didn’t run on my crunchbang system. Works well in Ubuntu though.
  2. Drivel – Best for LiveJournal users. Somewhat bland in functionality for wordpress blogs.
  3. Thingamablog – Couldn’t even configure this thing
  4. JBlogEditor – Eclipse based. Never worked properly.
  5. Bleezer – The text editor was buggy
  6. Flock – I downloaded the browser for it’s editor. I wasn’t too happy.
  7. ScribeFire – My earlier blog editor. I somehow don’t feel comfortable in browser plugin editors.

So I finally got hold of QTM. It has a very good interface and is very easy to setup. It contains the ability to select categories, add both wordpress and technorati tags and a preview and a simple publishing button. All in all for any of your wordpress blogging needs it does the job well. Although it does show html tags within the text editor and gets confusing when there are links in the text or images. And the lack of a spell-checker does has it’s drawbacks.

Nonetheless to get started simply add an account, select the type, modify the server address to point to your blog and then start typing. Once you’re done you can select categories, add tags and then under the basics view select “Publish” status and press the “Blog This!” button. You’re done.

For ubuntu or crunchbang you can download the latest deb package from https://launchpad.net/~indigojo/+archive/ppa

Another amazing blogging utility i found is the CLI tool called Charm. It’s fast and you can attach any text editor of your choice to write your blog entry and then simply by using the keyboard select numerous character based choices be able to add/modify/delete your blog posts. A very comprehensive tutorial can be found here: Charm Tutorial

The above two blogging applications simply meet any of my desktop blogging needs and are perfect for making quick posts.

Technorati Tags: ,

Posted in Linux | Tagged: , , , , | Leave a Comment »

Working with .deb packages in Ubuntu

Posted by spewit on 14/03/2009

(.deb)Debian packages are a great way to install applications in Debian based Linux Os’s including Ubuntu. They provide dependency support so all you have to do is click on install and there you have it working.

Mostly you would need to use .deb packages when a particular application isn’t available in the repository. Then you need to download the package and simply double-click to run it.

For command line interface the following commands will do the same task:

[1] To install

sudo dpkg -i packagename.deb ( run this in the directory where the package is saved )

[2] To uninstall : Now i havent found a graphical way to do this in cases where synaptic package manager does not show externally installed .deb packages, so the command is the best way.

sudo dpkg -r packagename ( can be run anywhere )

One good website where you can get some decent .deb application packages is : http://www.getdeb.net/

Posted in Linux | Tagged: , , , , , , | Leave a Comment »

Installing .bin files in Ubuntu

Posted by spewit on 13/03/2009

Suppose the setup file of an application is in the .bin format and is on your Desktop.

1. Open your command prompt ( terminal )
2. cd to Desktop ( eg. cd Desktop )
3. Type:

chmod +x filename.bin ( simply press tab after typing in some characters of the name. it should autocomplete. )
./filename.bin

4. Your installer should start like usual.

This method was found working in Ubuntu 8.10 for installing Adobe AIR whose setup is available in .bin format for the linux platform.

Posted in Linux | Tagged: , , , , | 2 Comments »

Compiz, OpenGL programs and Compiz-Switch under Ubuntu

Posted by spewit on 13/03/2009

I found out that when running Compiz under Ubuntu, i wasn’t able to run openGL based applications like games or my own code. Searching on the net i found out that there seems to be some direct/indirect rendering problems due to which this happens. Check this topic for some details : http://www.phoronix.com/forums/showthread.php?t=7889

But anyways the quick-fix to this problem is to turn off your compiz while you’re running your program. The obvious way to do is to goto System->Preferences->Appearance-> Visual Effects Tab and select the None option. This will turn off the Compiz engine to make way for your program to run good.

I tried to find a shortcut to this and found compiz-switch; a small program that does the same thing only you can now have a icon in your main panel to simply click and turn it off. And when you’re done you can click on it again and get your compiz working again. To install download the Ubuntu version from the site: http://forlong.blogage.de/entries/pages/Compiz-Switch

To get it on the panel goto Main(Applications) menu->Accessories and right-click on the compiz-switch option and select “Add this launcher to panel”. There you have it.

Another good thing about compiz-switch was that it consisted of an option by which when you switch off compiz, your screenlets are turned off too. This can be implemented by right clicking on the compiz-switch icon in your panel, selecting properties and in the command textbox writing : compiz-switch -s

Compiz-switch has some more features that can be seen on the original website.

Posted in Linux | Tagged: , , , , | Leave a Comment »

Mounting NTFS partitions in Ubuntu

Posted by spewit on 10/03/2009

Although Ubuntu 8.10 does a mount of the NTFS partition once you click on of it, it will always change the mountpoint once you reboot. To make sure the NTFS drives have the same mount-point and are auto mounted on startup, i suggest you use the disk-manager utility easily available from Synaptic package manager.

You can easily download and install it by the following code:

sudo apt-get install disk-manager

It needs ntfs-3g driver for NTFS based operations which are included in it’s dependency.

You will be able to access the program under System->Administration.
It has the option to detect new devices on startup and automount them as the user sees fit. You can even select a device and edit it’s mountpoint which will be saved everytime you boot. This way all your links to files will be consistent each time you run Ubuntu. To do this simply run the program:

1. Click on Advanced Configuration Tab

2. Select the partition/drive.

3. Click on edit.

4. Edit the mountpoint option. Make sure that it is defined as follows /media/<your preferred mountpoint name>

Posted in Linux | Tagged: , , , , , | Leave a Comment »

Getting RAR archiver in Ubuntu

Posted by spewit on 05/03/2009

Ubuntu has a pre-installed archive manager with the ability to archive/extract the following formats:

*Tar, Zip, Jar, ISO, etc.

But it has no support for RAR. Here’s an easy way to get RAR working in it.

1. Open your terminal
2. Use the following command to install RAR package:

sudo apt-get install rar

3. Voila!

You can now check whether it’s working or not by simply right-clicking on any .rar archive that you have and selecting the “Extract Here” command. It should make a new folder with the same name as that of the archive with the extracted files.

Another way to install is to simply use the synaptic package manager and searching rar in the Quick Search textbox. You will find the same package there and you can easily mark it for installation and you will get the same results.
This was tested in Ubuntu 8.10 and was found to be working.

Posted in Linux | Tagged: , | 1 Comment »

Getting Java in Ubuntu

Posted by spewit on 03/03/2009

There are two ways you can have java up and running in your Ubuntu distribution; either using the Sun Java6 Runtime or using the IcedTea OpenJDK Java6 Runtime. The difference is that the former one is not canonical supported and is the official Java JRE whereas the latter uses the OpenJDK under the IcedTea project.

It’s better to go with the latter OpenJDK and both can be found in the add/remove applications program. Simple search for Java and you will get OpenJDK Java6 WebStart and OpenJDK Java6 Runtime. Mark them to install.

Also to run Java inside your web browser you need to install the IcedTea Java Plugin.
Once you have done downloading and installing the above three packages your Ubuntu is ready to utilise Java wherever necessary.

In case you want to install Sun Java6 Runtime then you should also install Sun Java 6.0 plugin for web browsers.

Although once i had installed OpenJDK i went to the java verification website:

http://www.java.com/en/download/installed.jsp

There it shows my version to be 1.6.0_0 which is version 6 but i think its not the latest build which is Java 6 Update 12 at the time of writing. Also in the case of Sun Java6 Runtime i was getting a Update 10 build.

It shouldn’t matter a lot except for when developing. So to develop i installed Eclipse from the application manager. It downloads and installs it’s own JDK which was a really old version 1.5. But you can point it to your latest version:

Goto Windows>Preferences>Java>Installed JRE’s

In it search for new JRE’s by clicking on the button and navigating to the following folder:

/usr/lib/jvm/

It will contain both your Java-1.5 (GCJ) and Java-6-OpenJDK. So on searching it will give you the option to select. In mine there were four options:

1. The java-1.5 gcj
2. Default-java
3. Java-6-OpenJDK
4. Java-gcj

For now i am sticking with OpenJDK.

Posted in Linux | Tagged: , , , , , | Leave a Comment »

Wifi on Atheros AR5BXB63 (and similar) wireless network cards

Posted by spewit on 21/02/2009

How to get your wifi working on an atheros card:

I have an acer aspire 4720z laptop with an Atheros AR5BXB63 wireless network card. Although Ubuntu 8.10 shows this hardware driver for Atheros based 802.11 wireless LAN cards it wasn’t able to help me get it working.
So i tried Madwifi as an option. Here although it got my card detecting and connecting to networks it used to give awfully slow speeds almost to the point of disconnection.
Then i finally tried to install ndiswrapper which wasn’t as difficult as i had thought.
I followed the following tutorial from ubuntuforums:

http://ubuntuforums.org/showthread.php?t=512828

I will be recapping the whole tutorial in respect of the steps i took which were essentially the same:
First of all make sure you have another alternative to get your Internet working as in an Ethernet cable. Only then can this tutorial prove helpful.
Once that’s done you would need two packages:

1. ndiswrapper package
2. atheros package

First get onto the desktop with the following command:

cd Desktop
(Easier to keep track of where all the files are)

The following two commands will get you the tarballs of the two packages:

Ndiswrapper(1.51):
wget http://wifix.sourceforge.net/software.php?title=ndiswrapper

AR5007EG windows drivers:
wget http://blakecmartin.googlepages.com/ar5007eg-32-0.2.tar.gz

Extract both the archives onto the desktop with the following:

tar xvf ndiswrapper-1.51.tar.gz

(the actual name of the file will depend on the version you have downloaded)

tar xvf ar5007eg-32-0.2.tar.gz

After this is done you will get two folders with the same names as the archives. Now you need to see if your system’s up-to-date with its kernel headers and packages for compiling:

First get your kernel version by :

uname -r

Whatever you get you need to fill that in the subsequent [INSERT] field.

sudo aptitude update

sudo aptitude install linux-headers-[INSERT] build-essential

or
sudo aptitude install linux-headers-$(uname -r) build-essential

The above two commands will download and install headers and it won’t be a very small download for the linux headers.
After this we need to blacklist the ath_pci kernel module in the blacklist file present in /etc/modprobe.d folder under the filesystem:

echo “blacklist ath_pci” | sudo tee -a /etc/modprobe.d/blacklist

To see the appended line just open the file in any of the text editors like gedit:

gedit /etc/modprobe.d/blacklist

Now cd into the ndiswrapper folder that was created after extracting:

cd ndiswrapper-1.51

Now compile:

sudo make uninstall
make
sudo make install

cd.. (Back to Desktop)

cd ar5007eg-32-0.2

sudo ndiswrapper -i net5211.inf

The net5211.inf can also be used by an application called Windows wireless Drivers to make it installed.

Once this is done, we need to make sure that ndiswrapper is loaded in the startup of ubuntu:

sudo modprobe ndiswrapper

Now open the modules file:

sudo gedit /etc/modules

And append ndiswrapper at the end of the file. My file now look like this:

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with “#” are ignored.

fuse
lp
sbp2
ndiswrapper


It’s all done!
Now simple restart your system and hopefully it will work. The LED wasn’t working for me so remember whether your wifi is on or not.

Posted in Linux | Tagged: , , , , , , | 1 Comment »