Wednesday, August 22, 2007

The 10 most useful applications in Ubuntu

Many of these applications are the reason I switched to Ubuntu at home, and I have made them a staple of my technology lifestyle. If you're someone who has just gotten started tinkering with Ubuntu (or GNU/Linux in general), you should give these a shot.

10. vim / gvim
Vim is the editor of choice for everything I do (well, except excessive copying and pasting from Firefox.) The capabilities of vim will far exceed anything I'll ever do with it. Periodically, though, I have to do something ridiculous to a file, and vim saves the day. Want to run a macro that will trim the first three characters off of every line in a file, add a semicolon at the end of every line, and replace every instance of FOO with BAR? Vim can do it. To install, simply the following a command prompt:

sudo apt-get install vim

Now you can execute vi (or vim) from the command prompt and get to editing away. Here's a cheatsheet for how to get around. There are hundreds of pages about the vim editor, search the net to find more!
Even if you run Windows, you can still enjoy some of the vim goodness. Just to go www.vim.org and grab the Win32 Installer. You won't get the command-line vim, but you will get the always-handy gVim.

9. The GNU find command
The GNU find program is part of the Ubuntu default installation, so there is no need to install it.
A lot of people rely on the locate command to find files, and that does serve its purpose very well. Where the GNU find command is useful is finding files of a specific nature, or acting upon those files in particular. For instance, if you want to get the MD5 checksum of every file in a directory, just CD to that directory and execute the following at the command prompt:

find ./ -type f -exec md5sum {} \;

You can even use the GNU find command to delete files that haven't been updated in a given timeframe (for instance, log files older than 90 days.) First, you should open a terminal and cd to the directory with the log files, usually /var/log. Then, running the following will print those files to the command line:

find ./ -type f -mtime +90

Adding -delete to the end of that line, and executing it again, will delete all files older than 90 days in that folder and every folder underneath it, as long as your user account has file permissions to do so!

8. Midnight Commander
If you remember Doubletree from the DOS days, then Midnight Commander will probably be your new best friend. If you haven't enabled the additional apt-get repositories yet, please visit the Ubuntu Guide and complete that before taking the next step.
To install Midnight Commander, type the following at a terminal prompt:

sudo apt-get install mc

Midnight Commander is great for traversing the filesystem quickly, and even moreso when you're doing the same remotely via SSH. You can edit files from within MC, and even browse a remote filesystem via an SSH connection with it (and without installing SSHFS.)
To run, simply open a terminal window and execute 'mc'

7. Mplayer
I know you can get mplayer for Windows, but it's just not the same. Again, you'll want to visit the Ubuntu Guide to enable the additional apt-get repositories if you haven't already. To install mplayer, open a terminal window and execute the following:

sudo apt-get install mplayer

Mplayer has a special place in my heart as the media player that would play just about everything, even in the days when other players wouldn't. Other media players have made some headway, but mplayer still has tricks up its sleeves. It will even play VCDs directly from a .bin file!

6. Rsync
Looking back, this was probably one of the main reasons I went to Ubuntu at home. There is just not a suitable Rsync application for Windows. Period. I have a directory that follows me around wherever I go, it resides in my home directory as 'sync'. When I log in at work or on my laptop, it is copied down from my main desktop at home. When I log out, the directory is synchronized back with my main desktop at home. Here is a great article from Linux.com detailing how to use rsync in some practical ways. To install rsync, pull up that terminal prompt and type:

sudo apt-get install rsync

5. Alltray
Alltray allows you to take any window and minimize it to an icon. If you like the way that GAIM/Pidgin stashes away, and want other windows to do the same, try out Alltray!

sudo apt-get install alltray

After you're done installing, go to Applications->Accessories->Alltray, then just click on the window you want to turn into an icon. To bring the window back, just click on the icon.

4. TightVNC Server
Oh, I know what you're thinking: "TightVNC is available for Windows, LC! Why is this worthy of mention?!" The Windows TightVNC implementation allows you to remote in to your existing desktop. The Linux implementation, however, allows you to remote in to a discrete desktop environment. You can even run multiple discrete VNC servers on the same Ubuntu box. I use this to give an Xorg environment to items I want to leave running all the time. Azureus, among other applications, stays running in the VNC session and I can check up on my seeding efforts from afar. To install, simply open a terminal window and execute the following:

sudo apt-get install tightvncserver

To run a VNC server, simply execute 'vncserver' from any terminal. You can set a password for the VNC server by executing 'vncpasswd' from a terminal. You can automate the startup of vncserver, but I usually just launch it when I need it and then tromp around from there.

3. Fuse SSHFS
Got SSH access to another computer, but want to view the files on that computer as if they were on your own filesystem? SSHFS has you covered. The Ubuntu Blog has a better HOWTO on this than I could ever write, so go pay them a visit. I find SSHFS very handy when I want to listen to my home music collection from another computer on another network, but don't want to carry multiple copies of everything around with me. Editing PHP files on my remote webserver got a lot easier, too.

2. SABnzbd
If you download anything at all from Newsgroups, you'll appreciate some of the things that SABnzbd offers. SABnzbd will download, PAR check, unRAR and clean up any NZB that you throw at it. It offers a web interface and will monitor a directory for automatic pickup. I installed SABnzbd manually, but you can always check out this thread on the Ubuntu Forums to pick up a script that will install everything for you. There are no packages in apt-get repositories to install SABnzbd, so everything must be done the less convenient way. The results are well worth the effort, though.

1. Yakuake
If you've ever played any of the Quake series games (or games derived from iD software game engines,) you probably remember hitting the tilde (~) key to bring down a console where you could mess with game settings. Yakuake stashes a terminal window in the same manner, tied to the F12 key. You can reassign the key to any keystroke or combination that you like. I have mine set to CTRL + * at work (since they're right next to each other on a Northgate keyboard), and Windows Key + Open Dialog Menu Key on my personal machines.
To install, execute the following at a terminal prompt:

sudo apt-get install yakuake

To run, type 'yakuake &' at a terminal, and you should see a message that Yakuake started! Now you have a stowable terminal at your fingertips. Just press F12 to make it drop down.

4 comments:

lefty crupps said...

>The Windows TightVNC implementation
>allows you to remote in to your existing
>desktop. The Linux implementation,
>however, allows you to remote in to a
>discrete desktop environment.

'Allows'? Thats funny. One thing that I have been begging for is a way to remote-desktop into another Linux computer and see what the local person sees; all the better if it could be integrated with a chat client like Kopete, and work with NAT traversal so we wouldn't have to deal with firewalls, etc. But regardless, remote-viewing another Linux computer has caused me more headaches in the last few years then wifi ever has. Your example of viewing a separate xsession rather than the one I want to see is the first time i've seen this touted as a feature. But in a way I suppose it could be.

Kubuntu has it all over these apps, with not only the sweet SSHFS but also the amazing Fish protocol implemented in Konqueror. In the Konqueror file browser, enter the address:
fish:/user@server.com
and (with the correct passwords etc) you get graphical access to the remote file system, just as if you were SSH'ed in on a cli. Pretty sweet. Works with smb:/ as well for Windows machines.

Yakuake does indeed rock.

ok thanks then :)

LC said...

@lefty crupps:
x11vnc will allow you to control an existing X session.

I prefer the separate X session as my better half regularly uses my computer while I'm at work (and having been switched since Feisty's release, I can say that Feisty does pass the wife test!), and I'd prefer to not interrupt what she's doing, or have her unintentionally interrupt what I'm doing.

I haven't tinkered with KDE since the RH9 days, but I'll be sure to check that out. I've got a spare box I could load up Kubuntu on to play around with.

I appreciate the input!

lefty crupps said...

wow. i have a new use for vnc! thanks!

hurst1109 said...

Have you guys ever used the NXClient by NoMachine? It is the best "remote desktop" client I've seen.

I've been a windows users my entire life, but have been playing around with Ubuntu since Breezy. I finally made the switch to Feisty because I feel that this is the first really stable usable system. Having said that I think that the free NXClient is right up there with RDC for Windows. I believe that you can do both (share desktops or create a new one). I will admit that I have only created a new session though.

Check it out here... http://nomachine.com/ (it's free btw).