Tuesday, February 10, 2009

7 Cool Things to Do With Linux


So you’ve taken the plunge and installed Linux. You’ve followed all the HOWTOs all over the net. You’ve got your wireless card working flawlessly. You’ve got your video card working (and you’ve begun to loathe that spinning cube). You’ve installed all the “restricted” software like Adobe Flash, Sun Java and Google Earth. You’ve got all the patent restricted codecs and even DVD playback working just like you want. Now what? You want to know what you can do with Linux outside of the surfing, emailing, chatting and media consumption you normally do? Well, here are a few things to keep you busy.

  1. Use Your computer as a Home Theater PC. I personally use XBMC for this, but there are many other options including MythTV, Elisa, Entertainer, Freevo, GeeXboX and LinuxMCE.
  2. Set up a media server. There are many, many ways to go about doing this. There is the old tried and true file server approach, using either NFS or Samba.

    However, if it’s only music you’re sharing, you probably want something more like Firefly or Tangerine, which can share all of your music with the other computers and devices on your network with DAAP (this is the same music sharing technology iTunes uses). Most Linux music players provide this capability as well. If you want to access your music from anywhere in the world, you could set up Jinzora, which is a web based music server.

    If you have an Xbox 360 or PS3 that you’re using to consume music and videos, you’ll want to use a UPnP/DLNA server like uShare (which is based on GMediaServer) or MediaTomb. Many of the aforementioned HTPC programs (XBMC, MythTV) provide this functionality as well.

  3. Set up a download server. Centralize all your downloads to one Linux powered server. Get your Usenet downloads with HellaNZB or SABnzbd+. Get your torrents with Transmission, Vuze (formerly Azureus), TorrentFlux, Deluge or MonoTorrent. All of the software mentioned in this section has a web interface of some kind.
  4. Have an enterprise class VoIP phone system in your house. Asterisk gives you the ability to have all kinds of crazy phone system features, probably surpassing whatever you have at work, for free (not counting the hardware, obviously). If you want a smaller project, you could always just play with Ekiga.
  5. Set up your own surveillance system. Both ZoneMinder and Gspy will monitor your video cameras and optionally perform some action (playing a sound, emailing you, text messaging you, etc) when they detect motion. You could also use something like Motion to roll your own.
  6. Be really, really paranoid (Act like a spy!). With Linux, you have so many security and privacy options it’s not even funny.

    Encryption capabilities are already integrated into most desktop oriented distributions that allow you to encrypt certain files. You can encrypt your home directory or your entire hard drive with dm-crypt.

    You can use GnuPG to encrypt and sign email messages (most email clients support this). You can also encrypt your Pidgin chats with Pidgin-Encryption or Off-The-Record Messaging.

    Lock down your network (especially wireless) with FreeRADIUS and IPCop.

    When you’re not at home, you can use Tor for secure web browsing or SSH tunneling to encrypt just about any type of traffic.

    Steghide can conceal secret messages within images or audio, using a technique called Steganography.

    When you’re done with all that, don’t forget to clean up after yourself using either shred or dd.

  7. Poke into other people’s business (Act like a spy some more!). Wireshark will let you look at all the network traffic happening around your computer. This is especially cool because most instant messages and emails are unencrypted, meaning you can read them as they go by. You can also see what web pages people are visiting.

    This is even more fun if you get on someone else’s wireless network to spy on them. Find a wireless network with Kismet, then use the Aircrack-ng suite to gain access.

    You could also use Ophcrack to get into a physical computer for which you don’t have the password…

Monday, February 9, 2009

From the archives: the best distros of 2000


Distros

Back in May 2000 the first issue of Linux Format magazine hit the newsstands. One of its features was a group test of Linux distributions, reflecting the state of play in Linux flavours at the time. If you fancy a trip down memory lane or just a quick look at how beautiful Linux wasn't all those years ago, we've dug out the original article complete with screenshots - read on!

Historical note

Remember that nine years is a long time in the computing world -- and even more so for Linux. In 2000 the OS was still regarded as a niche player, a fantastic showcase of technology for geeks but not yet ready for prime time. Today we see Linux on netbooks, Linux on Dell boxes, Linux everywhere; it's serious business.

Corel Linux is long dead, despite a high-profile entrance into the distro scene, while Caldera Linux occupied a healthy position (before the SCO shenanigans busted it up). SUSE, Mandrake, Red Hat and Mandriva are still alive in various flavours, while the British Definite distro bought the farm and WinLinux only made it to a 2003 release...........................more..






Sunday, February 8, 2009

Linux PDF editor for manipulating PDF documents


by Vivek Gite

Adobe Acrobat is a commercial tool for manipulating PDF files. Earlier I was using CUPs - printing system, to export PDF files. I've also tried out gv for the same purpose. However, I needed complete editing of pdf documents. My search ended with PDFedit software, which is free and open source editor for manipulating PDF documents. The software available in both GUI and CLI (commandline) interface.

This software also supports scripting and almost anything can be scripted. PDFedit is a low-level tool for users. You can use this software:
=> To write / create / edit PDF files.
=> Print PDF files.
=> Save PDF files.
=> Export PDF files to XML etc.

Install PDFEdit

If you are using Debian or Ubuntu Linux, enter:
$ sudo apt-get install pdfedit

Start Editing PDF Files with PDFEdit editor

To start PDFEdit, type:
$ pdfedit /path/to/pdf.file &
$ pdfedit &

PDFEdit Linux freeware pdf writer software
( Fig 01: PDFedit ~ Linux PDF maker in action [click to enlarge the image] )

Other Linux pdf maker / writer software

During my research I came across other apps to edit PDFs. I hope you will find following tools useful:

=> scribus - Open Source Desktop Page Layout / desktop publishing (DTP) application software. It works under Linux, Mac and Windows computer. This software is another good alternative to PDFEdit. Just open file using open option and you can edit PDF file. You can install scribus using apt-get command:
$ sudo apt-get install scribus

To use scribus to edit PDF files:
Start scribus > New File > Insert > Image > Double click > Select PDF file

=> flpsed - a WYSIWYG pseudo PostScript editor. This software is very fast and light weight. To install flpsed, enter:
$ sudo apt-get install flpsed
To edit file, enter:
$ flpsed /path/to/pdf-file.pdf &

=> Gimp - I've also used gimp for editing pdf files. However, you need basic knowledge of gimp itself for editing pdf files. GIMP is almost installed on all Linux distribution. Please note that GIMP is not elegant solution for editing pdf files.

Online PDF manipulation tool

Finally, you can always use the Internet to modify PDF files using a web browser. [pdfescape.com]

Conclusion

PDFEdit is the best free open source software for for Linux / Unix-like operating systems. However, it does not support editing protected or encrypted PDF files.

Further readings:

Thursday, February 5, 2009

10 mistakes 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.

Note: This information is also available as a PDF download.

#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.

Wednesday, February 4, 2009

11 reasons to switch to Linux


, posted: 4-FEB-2009 08:24
People like to publish top-10 lists of all sorts. And "reasons to switch to Linux" is no exception. Many of those have been published, and the latest entry is here. However, I think the author completely forgot a very important point. Also, some of the points he makes should be examined a bit more closely and critically. The comments on the original article reflect some valid and some unfounded criticism. Let me just run through those points (italics are quotes from the original 10-point list, my comments are directly below each point) and provide my own take on those:
  1. Free: Linux is an open source project. As they say, it is free as in free beer. All you need to install Linux is an Internet connection to download the iso files and a CD where you can burn the iso. Compare this with Windows which costs a lot!

    That is of course true. It doesn't cost anything to download a GNU/Linux distro, besides whatever charges you have for bandwidth. Note also that in the case of Ubuntu you don't even need to burn your own CD. They will send you one for free if you request it. On the other hand, most users are not aware of the cost of Windows, since it comes pre-loaded with their PC and is 'just there'. Consequently, for many this is not really a reason to 'switch'. The cost advantage is only relevant if you are installing a new computer from scratch. Also, the author forgot to mention a very aspect of 'free'. See point 11 below.
  2. Linux distributions are COMPLETE: All the decent Linux distributions are complete: they include almost all the applications like office applications, pdf reader, web servers, compilers, etc. You don’t have to pay anything to download and install these applications. Ubuntu comes with OpenOffice, which is a perfect substitute for MS Office.

    Well, they may not all include them right off the bat, but you can usually install easily whatever is missing through the repository of that distro. This easy and efficient means of installing software is really one of the biggest advantages for the end-user when dealing with modern GNU/Linux distributions. While most of the high-profile FOSS software, such as OpenOffice, Thunderbird and Firefox are also available for Windows, you have this huge selection of FOSS software in the repos, with a very easy management and installation interface. I think the incredible ease of use should have been emphasised more.
  3. Virus, Spyware, Adware? None of these can affect a Linux based system. In fact, you don’t even have to install an anti-virus software which bogs down system performance in Windows.

    That is an overly optimistic statement. Of course one can write software that takes advantage of vulnerabilities even under Linux, or any other OS, really. But the commenters that complain about this assertion are also missing the point: They talk about how Linux security is based on the fact that there is less of an effort made by the malware authors to exploit Linux, due to its smaller market share. The 'less effort' part might be true, but it is not the complete picture. The Linux OS architecture is more secure and desktops apps are not normally run in admin mode. Exploiting Linux by clickable, executable email attachments is possible, but more complex and requires more steps for the user to go through. If Linux would gain significant market share, we would certainly see an increase in exploit attempts. How effective they would be, however, is another story. For the time being, though, GNU/Linux systems clearly have much less of a risk of being infected by anything than Windows machines.
  4. Low system requirements: I have a tough time running Windows XP on my system and Vista needs 1-2 GB RAM to work properly. On the other hand, Ubuntu boots and runs perfectly fast on this low configuration PC.

    Ok, let's not get carried away here. A full blown Gnome or KDE desktop will chew up a pretty astonishing amount of memory. The good thing is, however, that there are smaller, compact desktops (xfce, and others) available, which result in significantly smaller system requirements. Also, it is possible to produce distros with incredibly small footprint for embedded systems or small servers, especially if you forgo the graphical desktop. So, the correct thing to say would be that 'it is possible' to create very small footprint Linux systems. The flexibility to do so is a huge plus for Linux. But we should also admit that modern, full-blown GNU/Linux desktop distros will very happily use up gigabytes of memory as well.
  5. Much Stable: Linux is much more stable when compared with Windows. This is the reason most of the web servers are run using Linux. Forget about the blue screen of death [BSOD]!

    GNU/Linux can be very stable, especially in a server environment. I have had lockups in the graphical desktop, though. That desktop is a complex piece of software, apparently, and I find it disturbing that applications can screw it up in such a way that it locks me out. That doesn't happen often, but it has happened. The legendary reputation for stability of GNU/Linux was build in server environments. In general, the core of the OS is very stable. But while the desktop is quite good, it is not perfect. Maybe a bit more comparable to the typical Windows user experience? Your mileage may vary, though. If you don't try experimental 3D features in the desktop, or use a well-supported graphic card, or have your standard set of apps that you use every day, you may experience very good stability from the Linux desktop as well.
  6. Programming tools: If you want to learn programming, Linux is the best for you. Linux distributions come with many compilers and other tools to write and execute code. For example, I use gcc to compile C files which I write using the vi editor. I also have python IDLE installed which I use to learn programming in python.

    I can only agree here. The amount of available software development tools and languages, all for no cost at all, makes a Linux system a dream for any student of programming languages and software development. Combine that with a huge number of ready-made server packages, libraries, etc., and you can see how putting together complex, working software systems is quite a joy.
  7. Faster release cycles: Linux distributions are upgraded very fast. New versions of most Linux distributions are released once in every 6 months.

    True. It's important to point out that the improvements and updates are incremental and thus aide in the stability of the overall distro. See also what I wrote about that yesterday.
  8. Helpful community: Linux has a large fan-following. There are many forums and blogs which can help you if you have any problem. Millions of people cannot be wrong!

    Well, even millions of people can be wrong as history has shown over and over again. However, the point about the helpful community is of course a valid one. While this same community also has a problem with prick-ish elitists and fanboys, there is indeed a very large community of helpful and very nice individuals out there. And with popular distros a solution to a problem is often just a quick search away. It should also be pointed out that for those who want commercial support it is available as well through support contracts with the large Linux vendors (RedHat, Novell, Oracle, Canonical, etc.).
  9. You can run Linux along with Windows: You can run Linux along with Windows on a different partition. You can boot to Windows wherever you want. It is also possible to run Linux in Windows using emulator software like VMWare or MS Virtual PC. Likewise, it is also possible to run Windows applications in Linux using emulators like Wine (This Wine is different!).

    That's all true. Even though your mileage may vary when trying to run Windows software under Wine.
  10. A new learning experience: Install Linux on your computer and you will learn many new things. Linux does have a point and click interface, but you can use the command line or “Terminal” as it is called to completely unleash the power of Linux. This way you will learn many cool and new things.

    Yes, learning a bit about the command line and looking under the hood is a rewarding experience. GNU/Linux (and BSD and most other *nix OSs) wear their hearts on their sleeves. You can see and experience what's going on. A wonderful way to learn. But one more point: 'Linux' doesn't have a point and click interface, it's the graphical desktops you have in many distros with the point and click interface. Contrary to Windows, the desktop and the underlying OS are well separated. Linux as a server doesn't have a point and click interface. Ok, maybe I'm picky, but I think that is an important strength that shouldn't be left unmentioned: No unnecessary weight if you don't want to.
  11. Linux is truly free, as in freedom: As promised, there is at least one more point. The original article completely forgot to mention this one, which I personally think is the most important one of them all: GNU/Linux is free, as in freedom! The first point alluded to free as in beer (price) only. But I think the freedom aspect is much more important. Computers run our lives, they store our data and our most intimate secrets and communications. How can we give up control over this data to proprietary, closed software that was developed by corporations with the single, overriding motive of increasing their profits? Nothing wrong with making a profit, but the goals of those corporations are often directly opposite to our goals as consumers and users. How can we not demand complete transparency in the software that runs and manages our lives? How can we allow software that puts artificial restrictions on us to have any control over our lives and data? To put it in the words of the Free Software Foundation: Free software is the answer to a world built in code.
So, this is my comment on that most recent "10 reasons to switch to Linux" post. A bit too much enthusiasm and the most important point was forgotten. But I think the points provide a good basis at least for a more differentiated discussion.