Linux replacements for iTunes
#1: Amarok
This is probably the most popular of all the music library tools on Linux. There’s a good reason for that. Amarok, well, rocks. Amarok plays well with iPods and most other devices (the Zune is getting close to being compatible), sports the standard features of today’s multimedia players (including cover art and lyrics support), and is simple to use. Amarok also adds Wikipedia support (so you can find information about that obscure band you’re all about), contextual information (similar to iTunes’ Genius), last.fm integration, and a script manager so you can create custom Amarok scripts and download other customized scripts. Amarok is probably the most consistent with iPod integration. And like any good Linux application, Amarok is themeable.
#2: Banshee
Banshee is another Linux favorite and is to GNOME what Amarok is to KDE. Banshee offers a number of outstanding features, such as video, device, podcast, and last.fm support; play queue; cover art; an artist/album browser; and search and smart playlist support. The Banshee interface is closer to the iTunes interface than Amarok, which will be a welcome surprise to those users migrating from iTunes. Banshee can be a bit trickier than Amarok with certain players. For instance, with some Sansa models you have to create an empty file in the devices root directory called .is_audio_player. With this file in place, Banshee will recognize the media player. Of course, when you use this method, Banshee will set the main directory as the root directory. You can change this by adding contents, such as:
audio_folders=MUSIC/,RECORDINGS/
folder_depth=2
output_formats=application/ogg,audio/x-ms-wma,audio/mpeg
Within the contents of .is_audio_player.
#3: Rhythmbox
Rhythmbox is another music management application for the GNOME desktop. Rhythmbox is based on the Gstreamer plugin and offers a music browser, searching and sorting, large audio format support, Internet radio and playlist support, audio visualizations, device support (including MTP and USB mass storage), play/rip/burn audio CDs, podcast support, browse/preview/purchase songs/albums from sources such as Magnatude, and Jamendo. Rhythmbox suffers from the same issue as Banshee. If you are having trouble with your media device being detected by Rhythmbox, try the .is_audio_player shown in Banshee’s listing.
#4: Gtkpod
Gtkpod is a platform-independent interface strictly for iPods. Using the GTK interface, Gtkpod can sync with iPods from first to fifth generation. Gtkpod has yet to reach a stable 1.x release (currently enjoying .99.12) but has come a long way from its beginnings. Gtkpod requires libgpod to connect to the iPod device. One of the nicest features of Gtkpod is that it will copy to and from an iPod with ease. Within the Gtkpod interface, you will find a menu entry for exporting songs from the iPod to the PC. This is a simple means of backing up an iPod. Gtkpod does smart playlists, cover art, playcounts, photos, podcasts, and syncing.
#5: Songbird
Songbird is a cross-platform music management tool, based on Mozilla, that is still very much in beta. Songbird offers a lot of unique features, including built in Web browser, concert tickets, shoutcast radio, and customizable plugins. Along with the special features, Songbird has all the usual features of an iTunes replacement but offers an amazingly friendly interface. The Songbird interface is probably one of the most user-friendly simply because it is so much like a Web browser (the interface the majority of computer users are MOST familiar with).
#6: Listen
The Listen-Project was created in Python and offers the standard features for a music management application. The feature list looks something like this:
- Partial DAAP support (browse and listen only)
- Last.fm support
- Stream record
- 10-band equalizer
- Icecast Agent
- Gstreamer visualizer support
- Jamendo Music Store browser
- Crossfade playback engine
- Plugin system for creating new feature
- Lyrics support
- Wikipedia support
Listen is very much in beta, and at this time it does not have device support built in. So Listen is more of a local music management tool for your PC.
#7: Exaile
Exaile was written in Python for GTK+. Exaile offers:
- Cover art
- Large libraries
- Lyrics
- Artist/album information via Wikipedia
- Last.fm support
- iPod and device support (via plug-in)
- DAAP support
- Shoutcast directory support
Exaile has a clean interface, it’s incredibly easy to use, and it’s much more stable at beta than many others that are enjoying official releases. Exaile has a good repository of available plug-in that range from an alarm clock to Windows Multimedia Keys. Device support is there but not nearly as ready for prime time as, say, Amarok. Two features set Exaile apart: track Blacklisting and tabbed playlists. Track blacklisting allows you to configure tracks so they are never scanned into your music library. Tabbed playlists allow you to have more than one playlist open at once, and you can jump between then by clicking on their respective tabs.
#8: Audacious
The Audacious media player has one of the best playlist features available. Audacious is based on XMMS and has a similar default interface. Audacious is not nearly as feature-rich as Amarok or Banshee, but it does support a number of audio file types. Audacious suffers from one big problem — it does not have device support. If you’re looking for an outstanding, stable music manager for your PC, this might be the one. But if you’re looking for a complete solution for both machine and device, look away now. One area where Audacious does excel is with plug-ins. There are four categories of plug-ins: Decoders, General, Visualization, and Effects. Each category has a number of available plug-ns (the Decoder category having the most.) Plug-ins range from Voice Removal (in effects) to Scrobbler. The one issue that will most likely turn the average user off of Audacious is its minimalist user interface, which is way too ’90s.
#9: Quod Libet
Not only does Quod Libet have the strangest name in the bunch, it is also a unique player. Quod Libet’s mantra is that users know how to organize their music better than the developers do. To that end, you can organize your music based on regular expressions or regular searches. Quod Libet supports all popular, non-drm’d formats (Ogg Vorbis, FLAC, MP3, Musepack, and MOD). Quod Libet also features tag editing, Internet radio, podcasts, and a flexible interface (can be as minimum or maximum as you want), and the command line is available.
#10: iTunes with Wine or CrossOver Office
It’s probably not fair to mention this, but I figured there would be those reading this who either can’t let go of iTunes or want to try iTunes side by side with another application for comparison. With iTunes in Wine you can get basic functionality to work, but getting this system to synch with an iPod is a task that is best left to magicians and deities. Crossover Office is a different story altogether. The latest Crossover Office does have full iTunes support built in. However, various versions of iTunes break this compatibility. The most compatible is iTunes 4. iTunes 7.6 has all functionality minus synching with an iPod. So for those of you who simply want to manage a local or networked music library without synching to a portable device, this is a possible solution. If you want a more complete solution, stick with one of the other applications listed.
Pick of the bunch?
So we made it: There are indeed 10 possible replacements for iTunes. None of them is perfect, but neither is iTunes. If you had to ask me which of the listed players was my favorite I would have to go with Amarok. Amarok has the largest feature list and has the best device support available. But I would recommend any of the above solutions.
Ways to reduce removable media headaches in Linux
For many new Linux users, removable media can be a deal-breaker. Anyone coming over from Windows knows you simply insert the CD, use it, and eject it. With Linux, it isn’t always that simple. In fact, with Linux, removable media has always held a completely different philosophy.
In the old days of UNIX, removable media was seen in the same light as the PC itself — multi-user. So when you inserted some form of media (usually a floppy disk, back then), it had to be mounted to a mount point (such as /mnt/floppy) and was then made available to all users on the system. Because of this, the removable media synchronization wasn’t “on demand.” It typically worked by caching the data until the media was unmounted. Upon unmounting the media, the data was written and the media could be removed.
Linux has caught up to the needs of today’s user and, in many cases, the media mounting/unmounting is automatic. But not every situation is the same. Here are some tips that should make your Linux life with removable media better.
#1: Use the right desktop
The right desktop can make your job so much easier. The newest releases of both KDE and GNOME offer systems that check for the insertion of removable media. When a CD is inserted, you will be greeted with a window asking what you would like to do with the media. You can even set that action you choose as the default action to take upon insertion of that type of media. Those desktops also have applets that reside in the panel (or desktop icons) that allow you to easily mount and unmount the media with a click of the mouse. No more entering commands like mount /dev/cdrom /media/cdrom.
#2: Get to know /etc/fstab
Because I generally stick with more old-school desktops (such as Enlightenment DR16), I often still have to mount my removable media. So instead of having to issue the full command mount /dev/sda1 /media/mp3 to mount my MP3 player, I will add a line to my /etc/fstab file that will do two things: Point the device to the correct mount point and make sure the mount point is both readable and writable by the user. The fstab entry will look something like this:
/dev/sda1 /media/ipod vfat users,exec,noauto,managed 0 0
Now when you need to mount the device, enter mount /media/ipod. Just remember to unmount the device before you remove it.
#3: Use udev to make your life easier
Let’s build upon using fstab to simplify mount of removable media. Let’s say you have an entry in your /etc/fstab file for your iPod pointing it from /dev/sda1 to /media/ipod. Now let’s say you plug in another USB device or reboot. The problem is that entry in your fstab file may or may not be valid now because /dev/sda1 might be used by something else. To avoid this, make use of the udev system. You’re going to tell udev to always make sure that device shows up with the same filename. Enter a line in the /etc/udev/rules.d/00.rules file that looks like:
## iPod
BUS=”scsi”, SYSFS{model}=”iPod*”, NAME=”ipod”
Of course, your entry in /etc/fstab will have to change to reflect the above. So now /etc/fstab will look like:
/dev/ipod /media/ipod vfat users,exec,noauto,managed 0 0
#4: Use menu entries for mount/umount
Back in the day, when I used AfterStep, I always had a submenu that included an entry for mounting and unmounting both the floppy and the CD-ROM. This made life much easier because I no longer had to open up a command line and enter the mount and umount commands to use the device. Granted, the window manager you use will determine how this is employed. For example, in Enlightenment, I can create two entries in the user_apps.menu file that look like:
“mount iPod” NULL exec “mount /media/ipod”
“umount iPod” NULL exec “umount /media/ipod”
Now on the Enlightenment menu, I will see two entries: mount iPod and umount iPod. With the device connected all I have to do is click the mount entry. To remove the device I only need to click the umount entry.
#5: Be safe with your removable hard drives
One time, I left a USB drive plugged into a machine I was re-installing the operating system on. I wasn’t paying enough attention and wound up with an operating system spanning both my internal drive and my removable drive. Yes, this was a big mistake and no, it has never happened since. Why? Because anytime I install an OS on a machine with a removable drive, that removable drive is removed during installation. It’s not a problem, because upon first boot, I plug the drive back in and it is always automatically recognized and mounted. Of course, I will make an entry in /etc/fstab that will automatically mount the drive on boot.
#6: Never forget to use the dmesg command
When you plug in a device or insert removable media, the dmesg command will give you the status of the system. For example, when I insert an iPod into a Mandriva 2008 machine I run the dmesg command and see:
usb 1-4: new high speed USB device using ehci_hcd and address 2
usb 1-4: configuration #1 chosen from 3 choices
usb 1-4: USB disconnect, address 2
usb 1-4: new high speed USB device using ehci_hcd and address 3
usb 1-4: configuration #1 chosen from 2 choices
Initializing USB Mass Storage driver…
scsi2 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
scsi 2:0:0:0: Direct-Access Apple iPod 1.62 PQ: 0 ANSI: 0
sd 2:0:0:0: [sdb] 58605120 512-byte hardware sectors (30006 MB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 68 00 00 08
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:0:0: [sdb] 58605120 512-byte hardware sectors (30006 MB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 68 00 00 08
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sdb: sdb1 sdb2
sd 2:0:0:0: [sdb] Attached SCSI removable disk
sd 2:0:0:0: Attached scsi generic sg1 type 0
usb-storage: device scan complete
From this, I know the device is being seen at /dev/sdb. Without knowing this, I would have a hard time guessing where the device has been mapped to.
#7: Don’t forget the eject command
Most people don’t know that there’s a command to eject CDs from the CD drive. Naturally, this isn’t an issue for those who have tray CD drives. But for those with slot-loading CD drives, eject will save you from pulling your hair out. After you have used and unmounted your CD drive, open up a terminal and enter the eject command, and your CD will pop out. To simplify the process, make a menu entry for the command.
#8: Remember that the mount command tells all
If you’re unsure what devices are mounted on your system, issue the mount command to see a listing of everything currently mounted on your machine. The output looks like:
/dev/sda1 on / type ext3 (rw)
none on /proc type proc (rw)
/dev/sda6 on /home type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
From this output, I can see that I have no removable media mounted on the machine. So I know it’s safe to unplug anything removable. Had there been an entry for, say, my iPod, I would know not to remove the device without unmounting it. Of course, on modern systems (using one of the major desktops), this will be made clear with the icon or the removable device applet on the panel. But this command will be helpful (along with dmesg) in debugging removable media issues.
#9: Reformat your iPod to a Windows format
If you’ve tried to add songs on a Mac-formatted iPod on Linux, you’ve probably discovered that it’s not possible without jumping through hoops even programmers don’t want to jump through. Format your iPod in Windows format, and you won’t have any problems using your iPod with Amarok, Banshee, or gtkpod.
#10: Allow others to connect to your removable media
In my office, I have a removable drive mounted to /media/music that contains my entire music collection. I allow others to listen to that music via samba by including it as a share. I like doing this far better than allowing users to have access to my internal drive because 1) it keeps anyone from trashing the drive containing my OS and 2) it allows me to keep sensitive data physically separated from shared data. This approach doesn’t have to be used for music, either. It’s a great way to share interoffice files or have a single repository for backups. Once the drive is full, remove it and store it. Just add a new removable drive for the new backup.
Simpler, easier
Not only is today’s Linux not nearly as challenged with removable media as it once was, it’s really quite flexible and user friendly. With the help of these tips, you should now see how you can expand your Linux experience to include various ways to employ removable media.
Most useful Linux commands
#1: top
I figured it was fitting to put the top command at the top. Although top is actually responsible for listing currently running tasks, it is also the first command Linux users turn to when they need to know what is using their memory (or even how much memory a system has). I often leave the top tool running on my desktop so I can keep track of what is going on at all times. Sometimes, I will even open up a terminal (usually aterm), place the window where I want it, and then hide the border of the window. Without a border, the terminal can’t be moved, so I always have quick access to the information I need.
Top is a real-time reporting system, so as a process changes, it will immediately be reflected in the terminal window. Top does have some helpful arguments (such as the -p argument, which will have top monitor only user-specified PIDs), but running default, top will give you all the information you need on running tasks.
#2: ln
To many administrators, links are an invaluable tool that not only make users lives simpler but also drastically reduce disk space usage. If you are unaware of how links can help you, let me pose this simple scenario: You have a number of users who have to access a large directory (filled with large files) on a drive throughout the day. The users are all on the same system, and you don’t want to have to copy the entire directory to each user’s ~/ directory. Instead, just create a link in each user’s ~/ directory to the target. You won’t consume space, and the users will have quick access. Of course when spanning drives, you will have to use symlinks. Another outstanding use for links is linking various directories to the Apache doc root directory. Not only can this save space, it’s often advantageous from a security standpoint.
#3: tar/zip/gzip
Tar, zip, and gzip are archival/compression tools that make your administrator life far easier. I bundle these together because the tools can handle similar tasks yet do so with distinct differences (just not different enough to warrant their own entry in this article). Without these tools, installing from source would be less than easy. Without tar/zip/gzip, creating backups would require more space than you might often have.
One of the least used (but often most handy) features of these tools is the ability to extract single files from an archive. Now zip and gzip handle this more easily than tar. With tar, to extract a single file, you have to know the exact size of the file to be extracted. One area where tar/zip/gzip make administration simple is in creating shells scripts that automate a backup process. All three tools can be used with shell scripts and are, hands down, the best, most reliable backup tools you will find.
#4: nano, vi, emacs
I wasn’t about to place just one text editor here, for fear of stoking the fires of the “vi vs. emacs” war. To top that off, I figured it was best to throw my favorite editor — nano — into the mix. Many people would argue that these aren’t so much commands as they are full-blown applications. But all these tools are used within the command line, so I call them “commands.” Without a good text editor, administering a Linux machine can become problematic.
Imagine having to attempt to edit /etc/fstab or /etc/samba/smb.conf with OpenOffice. Some might say this shouldn’t be a problem, but OpenOffice tends to add hidden end-of-line characters to text files, which can really fubar a configuration file. For the editing of configuration or bash files, the only way to go is with an editor such as nano, vi, or emacs.
#5: grep
Many people overlook this amazingly useful tool. Grep prints lines that match a user-specified pattern. Say, for instance, that you are looking at an httpd.conf file that’s more than 1,000 lines long, and you are searching for the “AccessFileName .htaccess” entry. You could comb through that file only to come across the entry at line 429, or you can issue the command grep -n “AccessFileName .htaccess” /etc/httpd/conf/http.conf. Upon issuing this command you will be returned “439:AccessFileName .htaccess” which tells you the entry you are looking for is on, surprise of all surprises, line 439.
The grep command is also useful for piping other commands to. An example of this is using grep with the ps command (which takes a snapshot of current running processes.) Suppose you want to know the PID of the currently crashed Firefox browser. You could issue ps aux and search through the entire output for the Firefox entry. Or you could issue the command ps aux|grep firefox, at which point you might see something like this:
jlwallen 17475 0.0 0.1 3604 1180 ? Ss 10:54 0:00 /bin/sh /home/jwallen/firefox/firefoxjlwallen 17478 0.0 0.1 3660 1276 ? S 10:54 0:00 /bin/sh /home/jlwallen/firefox/run-mozilla.sh /home/jlwallen/firefox/firefox-bin
jlwallen 17484 11.0 10.7 227504 97104 ? Sl 10:54 11:50 /home/jlwallenfirefox/firefox-bin
jlwallen 17987 0.0 0.0 3112 736 pts/0 R+ 12:42 0:00 grep --color firefox
Now you know the PIDs of every Firefox command running.
#6: chmod
Permissions anyone? Linux administration and security would be a tough job without the help of chmod. Imagine not being able to make a shell script executable with chmod u+x filename. Of course it’s not just about making a file executable. Many Web tools require certain permissions before they will even install. To this end, the command chmod -R 666 DIRECTORY/ is one very misused command. Many new users, when faced with permissions issues trying to install an application, will jump immediately to 666 instead of figuring out exactly what permissions a directory or folder should have.
Even though this tool is critical for administration, it should be studied before jumping in blindly. Make sure you understand the ins and outs of chmod before using it at will. Remember w=write, r=read, and x=execute. Also remember UGO or User, Group, and Other. UGO is a simple way to remember which permissions belong to whom. So permission rw- rw- rw- means User, Group, and Other all have read and write permissions. It is always best to keep Other highly restricted in their permissions.
#7: dmesg
Call me old-school if you want, but any time I plug a device into a Linux machine, the first thing I do is run the dmesg command. This command displays the messages from the kernel buffer. So, yeah, this is an important one. There is a lot of information to be garnered from the dmesg command. You can find out system architecture, gpu, network device, kernel boot options used, RAM totals, etc.
A nice trick is to pipe dmesg to tail to watch any message that comes to dmesg. To do this, issue the command dmesg | tail -f and the last few lines of dmesg will remain in your terminal. Every time a new entry arrives it will be at the bottom of the “tail.” Keep this window open when doing heavy duty system administration or debugging a system.
#8: kill/killall
One of the greatest benefits of Linux is its stability. But that stability doesn’t always apply to applications outside the kernel. Some applications can actually lock up. And when they do, you want to be able to get rid of them. The quickest way to get rid of locked up applications is with the kill/killall command. The difference between the two commands is that kill requires the PID (process ID number) and killall requires only the executable name.
Let’s say Firefox has locked up. To kill it with the kill command you would first need to locate the PID using the command ps aux|grep firefox command. Once you got the PID, you would issue kill PID (Where PID is the actual PID number). If you didn’t want to go through finding out the PID, you could issue the command killall firefox (although in some instances it will require killall firefox-bin). Of course, kill/killall do not apply (nor should apply) to daemons like Apache, Samba, etc.
#9: man
How many times have you seen “RTFM”? Many would say that acronym stands for “Read the Fine* Manual” (*This word is open for variation not suitable for publication.) In my opinion, it stands for “Read the Fine Manpage.” Manpages are there for a reason — to help you understand how to use a command. Manpages are generally written with the same format, so once you gain an understanding of the format, you will be able to read (and understand) them all. And don’t underestimate the value of the manpage. Even if you can’t completely grasp the information given, you can always scroll down to find out what each command argument does. And the best part of using manpages is that when someone says “RTFM” you can say I have “RTFMd.”
#10: mount/umount
Without these two commands, using removable media or adding external drives wouldn’t happen. The mount/umount command is used to mount a drive (often labeled like /dev/sda) to a directory in the Linux file structure. Both mount and umount take advantage of the /etc/fstab file, which makes using mount/umount much easier. For instance, if there is an entry in the /etc/fstab file for /dev/sda1 that maps it to /data, that drive can be mounted with the command mount /data. Typically mount/umount must have root privileges (unless fstab has an entry allowing standard users to mount and unmount the device). You can also issue the mount command without arguments and you will see all drives that are currently mounted and where they’re mapped to (as well as the type of file system and the permissions).
Can’t live without ‘em
These 10 Linux commands make Linux administration possible. There are other helpful commands, as well as commands that are used a lot more often than these. But the commands outlined here fall into the necessity category. I don’t know about you, but I don’t go a day without using at least half of them. Do you have a Linux command or two that you can’t live without? If so, let us know.
Ten Linux desktops you shouldn’t overlook
If you know Linux, you know there are tons of options on every level. To some, this might seem overwhelming at first. To others, it’s all about possibility. The desktop is certainly not without options. In fact, the Linux desktop might very well be the area where there are the most options. But for a lot of users, desktop selection doesn’t usually go beyond KDE or GNOME. With this article, I hope to help the average Linux user get beyond the standard fare.
#1: Enlightenment
I have to confess I put this at the top of the list because it is my favorite Linux desktop. This desktop is all about being full of eye candy, while at the same time being lightweight and fast. Enlightenment was created by Carston Haitzler (Raster) in 1996. He created Enlightenment to be a lightweight window manager that didn’t lack style. He succeeded (and then some).
Currently, Enlightenment is enjoying two releases: E16 and DR17. E16 is the current stable release and DR17 is the development release. The two releases are very different from one another. DR16 takes a far more minimalist approach to the desktop than DR17 does. Without Panels and Icons, the DR16 desktop is made up of three mouse menus (one for each button), an Iconbox (where windows are Iconified — or minimized), a Pager (to switch between desktops), and the Dragbar (which allows you to have desktops layered on top of one another.)
The DR17 release removes the Iconbox and the Pager and adds Shelves, which are Panels that house application launchers, pagers, clocks, etc. Even with the creation of a more standard desktop, DR17 retains its uniqueness as well as its speed. If you’re looking to give DR16 a try, you can install it via the standard Linux installation methods. Your best bet for DR17 is to give the gOS Rocket or the EliveCD distributions a try. And you should… it’s that cool.
#2: AfterStep
This is another of my favorite Linux desktops. Or at least it was back in early days of Linux. This desktop attracted me because it was one of the first (back around 1998) to use transparency. AfterStep was actually a fork of FVWM rebuilt to resemble the NeXTSTEP desktop. Like FVWM, AfterStep is light, quick, and can be as minimalist (or not) as you like. The main features of AfterStep are a mouse menu, Pager, Wharf (a dock-like applet), and the Winlist (a panel showing active applications). AfterStep is highly configurable via flat text files (so configuration requires getting to know the layout of configuration files.)
Currently AfterStep is enjoying the 2.2.8 release and is headed up by Sasha Vasko. One of the best aspects of AfterStep is the ability to granularly configure the look and feel. From timing of auto-raising windows to placement of titlebars (titlebars can be placed along a horizontal or vertical plane), AfterStep can be configured to a much higher level than most other window managers. You can install AfterStep your usual way. For example, in Mandriva, run the command urpmi AfterStep to install.
#3: Fluxbox
Fluxbox is probably one of the lightest of the lightweight window managers for Linux. It’s lightening fast and incredibly stable. Fluxbox shines in bringing new life to old hardware. And Fluxbox is a gift for those who prefer a minimalist approach to the desktop. Fluxbox is a fork of the Blackbox window manager and was created out of a need to add more features to Blackbox.
The Fluxbox desktop contains a mouse menu, a toolbar, and the Slit. The Slit is a small dock where self-contained applets reside. All basic configurations are handled via flat text configuration files. This manual configuration includes everything from the theme to the menu. To give you an idea of the size of the Fluxbox window manager, the rpm installation file is 1,196 KB. To put this into perspective, the KDE 4 install base is 644.2 MB.
Installing Fluxbox is simple. You can either search for Fluxbox in your graphical installation application (such as Synaptic or Yumex) or you can install via command line (for example: urpmi fluxbox in Mandriva.) If you’re not into installing on your own, you can try the Ubuntu-based distribution, dedicated to Fluxbox, aptly named Fluxbuntu.
#4: XFCE
XFCE is quietly gaining ground on the Linux desktop with help from Zonbu, Mythbuntu, Slackware, and Gentoo. It’s another lightweight desktop that has a more traditional desktop approach, with icons, panels, start menus, and system trays. The XFCE desktop is far less configurable than many of its peers. XFCE was created to be very modular so you can install as much or as little as you want. XFCE is also separated into applications: XFWM (the XFCE window manager), Xfmedia (the XFCE media player), Orage (the XFCE calendaring application), and Thunar (the file management tool). It is interesting to note that Thunar is also now the file manager for Enlightenment DR17.
Installing XFCE is as simple as running urpmi xfce (in Mandriva) or opening up your graphical installation tool and searching for XFCE. If installing isn’t for you, you can download a number of distributions (Gentoo and Slackware for example.) The Mythbuntu Media Center distribution also relies on XFCE for a desktop.
#5: Compiz/Compiz Fusion
When you talk Compiz, you’re talking full-blown, eye-popping 3D desktop goodness. Compiz/Compiz Fusion (they are actually two different projects) is the one desktop to install when 1) you have the hardware for it and 2) you REALLY want to impress your friends and family. Compiz is the original 3D Linux desktop. Compiz Fusion is a merging of Compiz and the now-defunct Beryl Project. Both of these projects mimic some of the features of Apple’s OS X but take them to new places.
One of the most amazing features of Compiz and Compiz Fusion is the Cube. The Cube takes the flat Linux pager metaphor (the ability to have multiple desktops) and folds the desktops into a three dimensional cube. With a click of the middle mouse button the desktop cube zooms out and you can rotate the cube to the cube face you want to work on. Add to this the ability to make the cube (and everything on the desktop) translucent and you have a very impressive desktop.
Installing Compiz isn’t for the faint of heart. It requires a number of pieces to be put together, a video card that supports AIGLX, and some patience. But the time and effort are very much rewarded with one of the coolest desktops to date. If you don’t want to take the time to install, you can give the latest Mandriva or the latest OpenSuSE a go. With the right hardware, you should have a working 3D desktop upon installation.
#6: IceWM
The developers of IceWM are proud of the fact that this lightweight window manager shares absolutely no code with any other window manager (written completely in C++). IceWM can be made compliant with GNOME and can use Imlib for graphics support. IceWM is a fairly straightforward window manager with few frills. The desktop is a panel, a start menu, a system tray, and a pager, and that’s it. IceWM is as configurable as any standard window manager but doesn’t boast the eye candy that Enlightenment or AfterStep does. But unlike Enlightenment DR16, IceWM does have a graphical control center for configurations. IceWM is easily installed via the command like (for example yum install icewm in Fedora).
#7: Windowmaker
Another NeXT-based window manager, Windowmaker took what NeXT did right and did not add FVWM on top. Windowmaker is yet another lightweight, super-fast, highly stable Linux window manager. It takes a minimalist approach but does support most image formats, and it has sliding application menus that can be torn off and pinned. (You can break off a submenu and anchor it to the desktop, leaving it open until you manually close it.) All configuration changes happen in real time. Windowmaker does have a dock where applications can be launched, but it’s not the shadowed, animated dock found in OS X. Windowmaker can be installed via command line, as in urpmi windowmaker in Mandriva, or it can be found in the package administration tools, such as Synaptic.
#8: Metacity
For one brief period, Metacity was the window manager used in the GNOME desktop. Eventually, Metacity broke out on its own. Created by Havoc Pennington (of Red Hat), Metacity uses the GTK+2 toolkit. Pennington has described Metacity as “intentionally boring” even without a logo. Metacity does not include numerous features. Instead, it glaringly boasts “good defaults.” One would describe Metacity as a typical old school UNIX-like window manager. In fact, it’s clean to the point of being almost sterile. But that doesn’t mean it is without merit.
Metacity is lightweight and fast. It is also very much a *NIX window manager, in that it can be installed in nearly all *NIX operating systems. Many distributions (such as Mandriva) install Metacity by default. If Metacity is not installed by default, it can be installed by command (such as yum install metacity) or it can be found in the package administration tool.
#9: FVWM
FVWM was, at one time, the dominant window manager for the Linux operating system. In fact, my first exposure to Linux was the FVWM window manager, and I distinctly remember how like Windows 98 it was — though not as “clean.” FVWM has an interesting history. Robert Nation was the creator back in 1993. He was tired of the limitations of one of the only UNIX window managers, TWM, during his work with the DoD. Nation had already created the rxvt terminal emulator and decided to bundle FVWM with a release of rxvt. He handed FVWM over to another developer a year after its release.
The current version of FVWM is 2.4.20, but interestingly enough, Nation’s last release, 1.24r, will still compile and run on modern Linux distributions. FVWM has a number of derivatives, including AfterStep, Enlightenment, and Windowmaker. To install FVWM, just run apt-get install fvwm and accept the dependencies.
#10: CDE
CDE isn’t really a Linux desktop, but it deserves mention because it heavily influenced so many Linux desktops. CDE (Common Desktop Environment) was created by a collaboration between Sunsoft, HP, IBM, and USL (a collaboration called The Open Group) in 1993. This new desktop was based on HP Visual User Environment and was derived from the Motif Window Manager. For a long period, CDE was the standard UNIX desktop environment. But in 2001, it was briefly phased out in favor of GNOME (until GNOME’s instability caused the return of CDE).
CDE is a fairly standard desktop consisting of a panel and start menu. Its biggest downfall is its antiquated UNIX-like look, lack of anti-alias font support, and confusing configuration. CDE is primarily a Solaris desktop but will install on AIX and HP-UX.
A world of options
And there you have it: 10 Linux desktops (well, nine, really, plus one UNIX) that are all very different, very usable, and very available. You may be happy with your current desktop, but if you really are a fan of Linux, you owe it to yourself to try out one or more of the ones described here. There are plenty more Linux desktops; but these are the best alternatives. Give them a try and report back here to let us know your favoriteMistakes new Linux administrators make
For many, migrating to Linux is a rite of passage that equates to a thing of joy. For others, it’s a nightmare waiting to happen. It’s wonderful when it’s the former; it’s a real show stopper when it’s the latter. But that nightmare doesn’t have to happen, especially when you know, first hand, the most common mistakes new Linux administrators make. This article will help you avoid those mistakes by laying out the most typical Linux missteps.
#1: Installing applications from various types
This might not seem like such a bad idea at first. You are running Ubuntu so you know the package management system uses .deb packages. But there are a number of applications that you find only in source form. No big deal right? They install, they work. Why shouldn’t you? Simple, your package management system can’t keep track of what you have installed if it’s installed from source. So what happens when package A (that you installed from source) depends upon package B (that was installed from a .deb binary) and package B is upgraded from the update manager? Package A might still work or it might not. But if both package A and B are installed from .debs, the chances of them both working are far higher. Also, updating packages is much easier when all packages are from the same binary type.
#2: Neglecting updates
Okay, this one doesn’t point out Linux as much as it does poor administration skills. But many admins get Linux up and running and think they have to do nothing more. It’s solid, it’s secure, it works. Well, new updates can patch new exploits. Keeping up with your updates can make the difference between a compromised system and a secure one. And just because you can rest on the security of Linux doesn’t mean you should. For security, for new features, for stability — the same reasons we have all grown accustomed to updating with Windows — you should always keep up with your Linux updates.
#3: Poor root password choice
Okay, repeat after me: “The root password is the key to the kingdom.” So why would you make the key to the kingdom simple to crack? Sure, make your standard user password something you can easily remember and/or type. But that root password — you know, the one that’s protecting your enterprise database server — give that a much higher difficulty level. Make that password one you might have to store, encrypted, on a USB key, requiring you to slide that USB key into the machine, mount it, decrypt the password, and use it.
#4: Avoiding the command line
No one wants to have to memorize a bunch of commands. And for the most part, the GUI takes care of a vast majority of them. But there are times when the command line is easier, faster, more secure, and more reliable. Avoiding the command line should be considered a cardinal sin of Linux administration. You should at least have a solid understanding of how the command line works and a small arsenal of commands you can use without having to RTFM. With a small selection of command-line tools on top of the GUI tools, you should be ready for just about anything.
#5: Not keeping a working kernel installed
Let’s face it, you don’t need 12 kernels installed on one machine. But you do need to update your kernel, and the update process doesn’t delete previous kernels. What do you do? You keep at least the most recently working kernel at all times. Let’s say you have 2.6.22 as your current working kernel and 2.6.20 as your backup. If you update to 2.6.26 and all is working well, you can remove 2.6.20. If you use an rpm-based system, you can use this method to remove the old kernels: rpm -qa | grep -i kernel followed by rpm-e kernel-{VERSION}.
#6: Not backing up critical configuration files
How many times have you upgraded X11 only to find the new version fubar’d your xorg.conf file to the point where you can no longer use X? It used to happen to me a lot when I was new to Linux. But now, anytime X is going to be updated I always back up /etc/X11/xorg.conf in case the upgrade goes bad. Sure, an X update tries to back up xorg.conf, but it does so within the /etc/X11 directory. And even though this often works seamlessly, you are better off keeping that backup under your own control. I always back up xorg.conf to the /root directory so I know only the root user can even access it. Better safe than sorry. This applies to other critical backups, such as Samba, Apache, and MySQL, too.
#7: Booting a server to X
When a machine is a dedicated server, you might want to have X installed so some administration tasks are easier. But this doesn’t mean you should have that server boot to X. This will waste precious memory and CPU cycles. Instead, stop the boot process at runlevel 3 so you are left at the command line. Not only will this leave all of your resources to the servers, it will also keep prying eyes out of your machine (unless they know the command line and passwords to log in). To log into X, you will simply have to log in and run the command startx to bring up your desktop.
#8: Not understanding permissions
Permissions can make your life really easy, but if done poorly, can make life really easy for hackers. The simplest way to handle permissions is using the rwx method. Here’s what they mean: r=read, w=write, x=execute. Say you want a user to be able to read a file but not write to a file. To do this, you would issue chmod u+r,u-wx filename. What often happens is that a new user sees an error saying they do not have permission to use a file, so they hit the file with something akin to chmod 777 filename to avoid the problem. But this can actually cause more problems because it gives the file executable privileges. Remember this: 777 gives a file rwx permissions to all users (root, group, and other), 666 gives the file rw privileges to all users, 555 gives the file rx permissions to all users, 444 gives r privileges to all users, 333 gives wx privileges to all users, 222 gives w privileges to all users, 111 gives x privileges to all users, and 000 gives no privileges to all users.
#9: Logging in as root user
I can’t stress this enough. Do NOT log in as root. If you need root privileges to execute or configure an application, su to root in a standard user account. Why is logging in as root bad? Well, when you log on as a standard user, all running X applications still have access only to the system limited to that user. If you log in as root, X has all root permissions. This can cause two problems: 1) if you make a big mistake via a GUI, that mistake can be catastrophic to the system and 2) with X running as root that makes your system more vulnerable.
#10: Ignoring log files
There is a reason /var/log exists. It is a single location for all log files. This makes it simple to remember where you first need to look when there is a problem. Possible security issue? Check /var/log/secure. One of the very first places I look is /var/log/messages. This log file is the common log file where all generic errors and such are logged to. In this file you will get messages about networking, media changes, etc. When administering a machine you can always use a third-party application such as logwatch that can create various reports for you based on your /var/log files.
Sidestep the problems
These 10 mistakes are pretty common among new Linux administrators. Avoiding the pitfalls will take you through the Linux migration rite of passage faster, and you will come out on the other side a much better administrator.
Things Linux does better than OS X
#1: Flexibility
If you’ve used OS X, you know it’s user-friendly but not very flexible. In that regard, OS X is very much like Windows: You get what you have and there’s not much you can do with it. If you don’t like the layout of the desktop, you can move the Dock to either side, you can shrink it, or you can make it auto-hide. You can also add third-party applications and themes the desktop. Outside of that, you’re out of luck. Say, for example, you would like to have only the Dock on your desktop (with the taskbar features integrated). You can’t do it. That taskbar is as much a part of OS X as the Blue Screen of Death was in Windows 95. Linux is a different story. You don’t want the taskbar but you like its features? No problem. Add whatever features to whatever taskbar or panel you want. Linux can pretty much take any configuration you throw at it. And if you still don’t like what you have, install a different desktop or window manager and you’re good to go.
#2: Open source
One of the biggest issues that Linux users have with OS X is the license. Apple took a BSD kernel to create its own Darwin kernel, released it under the Apple Public Source License (which was accepted by the Free Software Foundation), and then layered on top of that proprietary software to create OS X. At one point, Apple created OpenDarwin, which was a collaborative effort between Apple and the open source community. That project lasted four years before Apple took it down because it felt the effort to create an open source Darwin operating system had failed. In 2007, PureDarwin was created to continue the work that was developed with OpenDarwin. The PureDarwin project has come a long way and can even run Linux-based window managers (such as Enlightenment) on top of it. OS X, however, is still locked tightly together and can’t compete with the openness of Linux.
#3: Command line
Although most OS X users would balk at this (saying they have no use for the command line), most power users know the command line is crucial to serious administrative tasks. In this department, OS X falls way short of Linux. With Linux, you can do pretty much everything you need from the command line. With OS X? Good luck. Sure, OS X does have a fairly good set of command-line tools, but for the power admin, it’s just not enough. This is one area of OS X that I simply can’t figure out. Why didn’t Apple just migrate the Linux coreutils over to OS X? There are projects aimed at getting coreutils to compile on OS X, but it would have made more sense to have this by default. The coreutils package is a huge toolkit that contains nearly every basic command you need. OS X had to reinvent that wheel. But this goes beyond the coreutils package. What about installing via command line? What about command-line security? What about starting/stopping services from the command line?
#4: Hardware requirements
I have two Macs in my household. One Mac is an old iBook running at 800 Mhz with a 512 MB of RAM. That machine is slow with OS X running on it. But with Yellow Dog Linux, that little laptop runs much snappier. Same hardware, different OS. The other Mac is a G4 1.2 processor with 1 GB of RAM. I have an equivalent Intel machine running Ubuntu 8.10. The machines do not even compare in performance. The Ubuntu machine is faster on all levels (from boot to application launch). Taking a look at the minimum system requirements for OS X and Ubuntu, you see:
OS X: 876 MHz or faster CPU, 512 MB of RAM, 9 GB of disk space
Ubuntu: 700 MHz x86 processor , 384 MB ofRAM, and 8 GB of disk space
So obviously Linux can run on lesser powered machines by default. And Ubuntu 8.10 is not the most optimized of the Linux distributions. Mandriva Spring 2008 has even fewer requirements (claiming to run on ANY CPU and only 256 MB of RAM).
I have read of benchmarking tests claiming that OS X outperforms Ubuntu 8.10 soundly. But real world results would seem to contradict those claims. I ran a less-than-scientific test with the Mac iBook G4 1.2 and the Ubuntu 8.10 on a 1.2 processor. Both machines had 512 MB of RAM. On the Ubuntu machine (running the Enlightenment window manager), I was able to open up the following applications before the machine began to bog down: Firefox, OpenOffice Writer, OpenOffice Calc, OpenOffice Impress, Scribus, The Gimp, Amarok, GnuCash, Thunderbird, Basket, Audacity, Gqview, and aterm. The OS X machine was a different story. With OpenOffice, Firefox, Thunderbird, and iTunes open, the machine started to crawl. There was a noticeable degradation in performance. That’s an OS running 14 applications vs an OS running four applications before the OS comes to a crawl. I don’t know about you, but I would prefer the ability to run 14 apps.
#5: Security
In the most recent “Pwn 2 Own” competition, both the OS X and the Windows Vista machines were hacked, whereas the Linux machine was not. Of course there are pundits across the globe who will argue this one from all three sides, and finding unbiased results is akin to finding a definitive answer to the age-old TCO argument. But I can say, unequivocally, after 10-plus years of experience with Linux, that I have never had a machine or server compromised in any way. This, of course, is not to say that OS X is unsecure. But Linux simply is better equipped in the area of security. How? Tools. With tools like iptables, fwbuilder, and SELinux, Linux can lock down in many ways, on many levels. So you take a similar kernel but you add to that kernel-level tools to heighten security, and you can quickly see how Linux overpowers OS X in the area of security.
6. Portability
Another area where Linux shines over all other operating systems is in its ability to migrate an installation from hardware to hardware. Linux has an uncanny ability to be able to relocate. I have taken complete hard drives and moved them from one machine to another. So long as the architecture was the same (in other words, not moving from a x86 to an x86_64 machine), the migration always seemed to work with little to no adjusting. OS X, on the other hand, is landlocked to the machine it was installed in. Also, with Linux, you can take certain directories and move them from machine to machine. This works well with the /home directory. Having the ability to migrate your /home directory from one machine to another can make building machines a snap. With OS X, you’ll always be reinstalling from scratch.
#7: Cost
This is a big one for many people. First, you have the cost of the operating system alone. Linux is free. Period. OS X is currently selling for $129.00. Next is hardware cost. The cheapest Macbook you can purchase is $999.00. You can purchase a $399.00 laptop that will run Linux like a champ from any given dealer. Add on top of that the cost of the software you will need, and you can run up a fairly large tab. Linux? Nada. You can have an office-ready Linux machine that will tackle most every task you put to it for the cost of the hardware alone. Mac? Not so much. So if you’re looking to cut costs (and who isn’t, in this economy?), Linux is the way to go.
#8: More available software
This may come as a surprise to you, but Linux has far more software available than OS X. In a completely unscientific test, I did a search for both Linux and OS X on freshmeat.net (an index of UNIX and cross-platform software). Here are the numbers: Linux 11,781 results. OS X 1,477 results. Of course, many would say that it’s not a fair search because freshmeat.net is decidedly an open source leaning repository. With that in mind, lets turn to Google and search for OS X Software and Linux Software. The results: OS X 19,100,000 hits. Linux 45,700,000 hits.
One of the things that separates Linux from all other operating systems is that for every task in Linux, there are numerous tools available to undertake it. Let’s look at the task of word processing. For Mac, you have Microsoft Office and OpenOffice as the major players, and then you have minor players, like Bean, Nisus, Mellel, and NeoOffice. With Linux, you have the major player OpenOffice, and then you have the minor players Textmaker, Abiword, Hangul, EZ, Kwrite, gedit, nano, vi, emacs, Flwriter, Ted, Siag Office, LaTeX, EditPad Pro, etc. You get the picture. And yes, you can install Linux apps on OS X with Fink. I’ve done this. It’s not a good solution because the software often is prone to crashing or not running at all.
#9: Not so dumbed-down
I have tried to come up with the phrase that is the opposite of “dumbed down,” but I’ve had no luck. So work with me on this one. One thing that Apple did very well with OS X is dumb down the operating system interface to the point where most all tasks are easy for anyone to do. But there are those who do not want that dumbed-down experience. With Linux, you can have a desktop experience on every level. You can have the full-on, dumbed-down experience akin to OS X with either GNOME or KDE. Or you can go to the complete opposite and use the console as your desktop. Or you can experience anything and everything in between the two. With OS X, many power users feel like someone is holding their hand throughout the experience. With Linux, you can let go of that hand from time to time or even chop the hand off and replace it with a hook. When you’re using the Apple desktop, OS X is in control. When you use the Linux desktop, you are in control.
#10: Keyboard efficiency
One of my biggest pet peeves with OS X is the fact that there is no normally functioning Delete key. Instead you have to hit fn + Delete to get the delete key to work as it should. This is pretty common practice with the OS X keyboard, which is about as efficient to a hard-core programmer as a salad is tasty. And it’s not just the Delete key. The End key doesn’t do what you would expect, either. To get to the end of the line, you have to add the fn key to the End key (so fn + End will get you to the end of the line.) Another issue — mouse buttons. I know this is a fundamental design that makes sense to Apple. But the majority of people like two mouse buttons. And with Linux, you actually get THREE mouse buttons. With those three mouse buttons, you can even do a simple copy and paste function (highlight text with a left mouse button and then click the middle mouse button to paste). The Linux keyboard is just far more efficient than the OS X keyboard.
Other issues?
Those are 10 simple things Linux does better than OS X. Are any of the above deal-breakers? Quite possibly. Do you have an issue with OS X that Linux handles better? If so let us know.
Installing Linux apps: A few good tips
Option 1: Use the built-in package manager
The easiest way to get new software onto a Linux system is to use the integrated package management system that is included with your distribution. You can use the package manager to download thousands of software packages that have been pre-built and tested for your specific version of Linux.
In Linux, software packages are usually equivalent to applications, although an application may in fact consist of several packages. For example, a graphics editor app may be made up of a package with the main program, a package with the documentation, and a package with the system libraries that the application needs to run.
One advantage of using an integrated package manager is that it will usually download and install all the related packages that your chosen package depends on. With a live Internet connection, you can download everything you need in one operation.
Another advantage to using the built-in package manager is that the system will periodically check for upgrades to your newly installed package(s), which means that they will stay up to date -- although as mentioned below, "up to date" is a relative concept with packages.
The package management system used in Debian-based distributions (including Ubuntu) is called the Synaptic Package Manager and is found under the System menu. If you know the name of the package you want to install, you can also install it from the command line by typing
sudo apt-get install packagename
where packagename is the name of your chosen software package. Be aware that the names can be a little quirky.
Red Hat-based distributions (including Fedora) use a system called PackageKit under the covers. You can get to the graphical front end by going to the System menu, clicking on Administration, and then Add/Remove Program. From the command line, you use:
sudo yum install packagename
Some commercial Linux distributions, such as Xandros, have created integrated package managers that double as storefronts to sell you commercial software. You may need to scroll down a bit to see the free software available for the distribution, but you should be able to find it in short order.
The biggest disadvantage of using a built-in package manager is that the software you want may not be there. For an application to appear in the list of available options, some benevolent party involved in the distribution you're running has to build and package the software you want in the form you need and for the version of Linux you're using. If you're using an obscure distribution, or unpopular software, the software may be just unavailable altogether.
The second problem is that the packaged versions of software found in distribution repositories tend to lag a bit from the latest versions. This is mainly because packages have to be built and tested by the distribution maintainers before they're allowed into the official software repositories for the distributions. So you might be installing a two-month-old version of the GIMP rather than the current one. Some distributions allow new versions of packages to be added only when there's a new version of the distribution itself, which can mean that the packages available could be very out of date indeed.
Option 2: Use a third-party package
Some application maintainers offer prepackaged files containing the latest versions of their software on their own sites. Typically, you'll find packages for RPM-based distributions (such as Fedora and Red Hat) as well as Debian-based packages, which will usually work on any Debian-based distribution. So, for example, most ".deb" files will work under Ubuntu.
Installing these packages is a matter of downloading them and double-clicking them from a file browser. This should bring up the built-in package installer, which will offer to install the new package for you.
Packages built by third parties offer some, but not all, of the benefits of distribution-hosted packages. They can automatically download other packages from the distribution repository that are required, but unlike distribution-hosted packages, there is no "contract" implied that all the required packages will be available in the distribution repository. You need to read the installation instructions very carefully to see what other third-party packages may need to be installed, and in what order.
Click to view larger image
Third-party packaged software won't be automatically updated by the distribution's update mechanism. However, it will be part of the database of locally installed packages, which means you can use the integrated package manager to remove it if you need to.
These third-party packages also tend to place files in directories according to the distribution conventions, which makes it easier to find configuration files, libraries, administrative tools, user programs and so on.
Option 3: Use the application's own installer
A third possibility is that the software won't be available in a pre-packaged version but will instead come with its own installation program. In other words, instead of using the system-provided tools meant to install applications, the application does everything itself, which usually includes asking you where you want the software installed, making you agree to licensing terms, and so on. Commercial software packages such as the Fortran compiler shown in the screenshot below are fairly notorious for this.
The software usually is available as one big file, which you download somewhere on your desktop. As a deterrent against malware automatically running on your system, many files that you download via a browser make you explicitly say "it's OK to run this" before they will run. You do this by setting the "execute" bit on the file.
Let's say you downloaded an installer called InstallCoolSoftware.bin to your home directory. From a terminal window, you'd type:
% chmod a+x InstallCoolSoftware.bin
% sudo ./InstallCoolSoftware.bin
The first command sets the execute bit on the file. The second command uses the sudo program (which tells Linux to run a program as the "root" superuser), and instructs it to run the InstallCoolSoftware.bin program. You need to put the ./ in front of the file name because, as a security feature, Linux normally doesn't look in the current directory for program files.
What happens after this really depends on the software being installed. It might think a bit and then exit, having installed itself without any user interaction. It might ask you some questions at the terminal, and then perform the installation. Some installers even launch graphical user interfaces to lead you through the process.
The Linux OS is usually oblivious to software installed in this manner. Because it totally circumvents the package management system, you're completely on your own as far as updating or removing it at a later date. Updating may involve downloading and running a new version of the installer, and you may even have to uninstall the old version before you can install an update. Again, the release notes or installation instructions are going to be your best guide to what you need to do.
Option 2: Use a third-party package
Some application maintainers offer prepackaged files containing the latest versions of their software on their own sites. Typically, you'll find packages for RPM-based distributions (such as Fedora and Red Hat) as well as Debian-based packages, which will usually work on any Debian-based distribution. So, for example, most ".deb" files will work under Ubuntu.
Installing these packages is a matter of downloading them and double-clicking them from a file browser. This should bring up the built-in package installer, which will offer to install the new package for you.
Packages built by third parties offer some, but not all, of the benefits of distribution-hosted packages. They can automatically download other packages from the distribution repository that are required, but unlike distribution-hosted packages, there is no "contract" implied that all the required packages will be available in the distribution repository. You need to read the installation instructions very carefully to see what other third-party packages may need to be installed, and in what order.
Click to view larger image
Third-party packaged software won't be automatically updated by the distribution's update mechanism. However, it will be part of the database of locally installed packages, which means you can use the integrated package manager to remove it if you need to.
These third-party packages also tend to place files in directories according to the distribution conventions, which makes it easier to find configuration files, libraries, administrative tools, user programs and so on.
Option 3: Use the application's own installer
A third possibility is that the software won't be available in a pre-packaged version but will instead come with its own installation program. In other words, instead of using the system-provided tools meant to install applications, the application does everything itself, which usually includes asking you where you want the software installed, making you agree to licensing terms, and so on. Commercial software packages such as the Fortran compiler shown in the screenshot below are fairly notorious for this.
The software usually is available as one big file, which you download somewhere on your desktop. As a deterrent against malware automatically running on your system, many files that you download via a browser make you explicitly say "it's OK to run this" before they will run. You do this by setting the "execute" bit on the file.
Let's say you downloaded an installer called InstallCoolSoftware.bin to your home directory. From a terminal window, you'd type:
% chmod a+x InstallCoolSoftware.bin
% sudo ./InstallCoolSoftware.bin
The first command sets the execute bit on the file. The second command uses the sudo program (which tells Linux to run a program as the "root" superuser), and instructs it to run the InstallCoolSoftware.bin program. You need to put the ./ in front of the file name because, as a security feature, Linux normally doesn't look in the current directory for program files.
What happens after this really depends on the software being installed. It might think a bit and then exit, having installed itself without any user interaction. It might ask you some questions at the terminal, and then perform the installation. Some installers even launch graphical user interfaces to lead you through the process.
The Linux OS is usually oblivious to software installed in this manner. Because it totally circumvents the package management system, you're completely on your own as far as updating or removing it at a later date. Updating may involve downloading and running a new version of the installer, and you may even have to uninstall the old version before you can install an update. Again, the release notes or installation instructions are going to be your best guide to what you need to do.
Option 4: Compile it yourself
There is one final way to install software under Linux, but it's definitely not for the faint of heart. For some software, the only choice is to download the source code and compile it yourself. At a minimum, you're going to need to have already installed tools like GNU Make and GCC, the GNU C compiler.
Most sources are packaged in a "tarball" -- a tar archive that's been gzip'ed to reduce its size. For example, if you download a file called "cool-software.tgz," you unpack it by typing
tar xzf cool-software.tgz
at the command line. You can also usually unpack a tarball by double-clicking on the file in the file browser.
If you're lucky, the software will come with detailed installation notes, but it usually comes down to running a file called "configure," which figures out which type of system the software is being compiled for, followed by typing
sudo make install
to compile and install the package.
This approach shares all the problems of third-party installers. The distro's built-in package manager will know nothing of the new software you're installing.
In addition, doing builds yourself can be fraught with peril. Unless you're comfortable compiling files and running down the errors that result, you may want to enlist some help from a Linux guru if you need to do an install from scratch.
You may also end up with software installed in unusual locations. For example, a lot of source builds put the programs into /usr/local/bin. In some cases, if you're installing a newer version of a program from source, but have already installed a pre-built version that came with the distribution, you could end up with two copies of the program, one in /usr/bin and one in /usr/local/bin. You can change where the software is installed by tweaking the configuration files, but again, it's not a trivial process and easy to mess up.
In short, building from source should be your last resort, used only when you can't find a version of your desired software that's been packaged for your distribution or that comes with its own installer.
Bottom line
As a general rule of thumb, the farther you get from using the system-provided package management system, the more responsibility you have to take for the correct installation of your software.
For popular and stable apps, it's almost always a smart move to use the built-in package manager, which will ensure your packages stay relatively up to date and live happily with the other software on your system. It is only when you move into the obscure or frequently updated categories of software that you should need to stray off the well-trodden
search
Categories
- 20 Linux apps you can't live without (1)
- 25 killer Linux apps (1)
- LInux Applications (1)
- Linux replacements for iTunes (1)
- Mistakes new Linux administrators make (1)
- Most useful Linux commands (1)
- Seven Most (1)
- t Linux distros (1)
- Ten Linux desktops you shouldn’t overlook (1)
- Things Linux does better than OS X (1)
- Ubuntu (1)
- Ways to reduce removable media headaches in Linux (1)







