Archive for the ‘ Linux ’ Category

Five ways to ease migration from Windows to Linux

Posted in Linux on October 13th, 2009 by admin – Be the first to comment Tags: , ,

With the ever-maturation of the Linux operating system there are more and more people considering a migration from their operating system of choice to the flagship of the open source community. For many this migration is a strange, but simple adventure. For others, however, the task is very daunting and one challenge after another. What most people do not realize is that there are very simple ways to help ease this migration.

In this brief series (if two articles can be considered a series) I will help ease the migration from both Windows to Linux and Mac to Linux. Hopefully, upon reading these articles, you will have a good game plan so your migration (or your users migration) will be as seamless as possible.

Choose your distribution wisely

This is the real key for easy migration. There are a LOT of distributions out there, for just about every type of user and every type of use. There have been plenty of distributions that have attempted to mimic the look and feel of Windows as closely as possible (this was a very ’90s tactic). But ultimately it boils down to which distribution you choose that will help to make your migration simple. Most Windows users are going to want to stick to one of the major distributions (Ubuntu, Red Hat, SuSE) if for only one reason: support. With the major distributions you can actually have a phone number to call when you have a problem. Outside of that you are going to want to look for a distribution who’s goal is simplicity. One advantage that Ubuntu has over the other major is that it takes the root user out of the picture with the help of sudo.

Start using similar software before you migrate

Let’s face it, you spend a vast majority of your time working with applications, not operating systems. Because of that you can make the job of migration much, much easier by employing the applications you will use with the Linux operating system while you are working with Windows. You can install Firefox, OpenOffice, Thunderbird, Scribus, The GIMP, and many other applications on Windows and get used to using them in a more familiar environment. By doing this you are removing one obstacle out of your way when the migration actually happens.

Check your hardware

One of the biggest issues that many people have had in the past is hardware incompatibility. Although this is slowly becoming an issue of the past, there are instances where a specific piece of hardware is supported. When you install the operating system, and find a particular piece of hardware is not supported your computing life has become infinitely more difficult. Before you actually do the migration make sure the hardware you plan to use will function as you expect. What you want to pay particular attention to are: Networking cards, video cards, sound cards. One of the best places to check is the Linux Drivers site.

Software installation

With the Windows operating system, installation is always nothing more than a double click of a file and then what sometimes seems like an endless amount of clicking the Next button. In Linux the process of installing software is more centralized. You often read in my articles about opening the Add/Remove Software tool. This is a fundamental change to the philosophy of Windows. Think of the Add/Remove Software tool as more a shopping center for software instead of a location to manage software already installed. Once you get beyond the Windows Add/Remove Software philosophy, installing software in Linux is a snap.

More than one way to…

One of the philosophies that originally drew me to Linux was that there is almost always more than one way to take care of a task in Linux. This is something that many Windows users struggle with at the beginning. With Windows there is generally one way to handle a task – the Windows way. With Linux there is always multiple ways to do something. This is often very confusing to the new user. This is especially made true when that new user goes to a mailing list for help and gets five different replies with five different ways to solve a single problem. Is everyone wrong? Is everyone right? In that situation the best thing to do would be read everyone’s solution and decide which one sounds like it would be the easiest for you to re-create. To this end, when going to a mailing list for Linux help, it is always best to be as specific as possible. Instead of saying “How do I do A?” you might say “How do I do A using a graphical tool in GNOME?” or “What is the easiest way to do A in KDE?”

Final thoughts

You might think these very generic lessons for migration, but to the new-to-Linux user they are lessons that can save a lot of time and a lot of headache. Do you have any migration tips for Windows-to-Linux users? If so, share them with your fellow Ghacks readers.

How to Map your network with Zenmap

Posted in How To, Linux on August 9th, 2009 by admin – Be the first to comment Tags: , ,

Nmap is one of the most useful network discovery tools you will ever use. Nmap allows you to explore networks of any size to determine the following information:

* Port details
* Host details
* State
* Service
* Devices
* Addresses
* and much, much more

Nmap is one of those applications you will need to open anytime you see issues on your network, need to get information about hosts, track down an IP address, etc. Nmap is flexible, powerful, deployed all over the world (it is in the top 10 programs on Freshmeat), easy to use, well documented, cross platform (Linux, OS X, and Windows ) and (best of all) FREE!

But Nmap is a commmand-line only tool. Most users don’t want to monkey with the command line. Fortunately there are plenty of front-end tools for command line equivalents. For Nmap you can use the user-friend Zenmap. And how can you get up to speed quickly with Zenmap? Easy…you read this tutorial on how to run a scan on your entire LAN and then read the results.

Getting and installing

To install Zenmap you will have to install Nmap along with it. You can do this one of two ways: with Synaptic (or another GUI front end for your installation tool), or from the command line. To install via your Add/Remove Software tool follow these steps:

1. Open up your Add/Remove Software utility.
2. Search for Nmap.
3. Mark Nmap for installation.
4. Search for Zenmap.
5. Mark Zenmap for installation.
6. Click Apply to install.

Once installed you will see the entry for Zenmap in your Internet (or Network) sub-menu of your Applications or Main menu. You will want to run Zenmap as the root user because, most likely, your standard user will not have access to the networking devices.

Running Zenmap
Map your network with Zenmap 1

Figure 1

When you fire up Zenmap you will see the main window (see Figure 1) which will be empty of scans (because none have been issued as of yet).

To start a new scan you can do one of two things: You can enter a target IP (or range), select the type of scan, and hit Scan. Or you can open up the Command Wizard to construct a much more specific type of scan.

If you opt for just entering in your target(s) here’s how it works. The first thing you do is enter a target IP address. If you want to use a range of addresses the address would look like this: 192.168.1.1-200. NOTE: There are no spaces in the address.

You then need to select the type of scan to run. There are eight different types of scans to run. The intense scan will give you the most information and the Operating System Detection will give you the least amount of information.

The second method of setting up a scan is the Command Wizard. When you click this button you will walk through the following steps:

* Novice/Expert: Select the level of configuration you want to use.
* Profile/Command: Create a new profile or create a command to run once.
* Profile Details: If you go the Profile route you will have to enter the profile details.
* Scan Type: TCP or Non-TCP scan types as well as inclusion of Services version and Operating system detection.
* Ping Options: ICMP, ACK, SYN, IPPronto, etc details (if needed).
* Scripting Options: If you need to add special scripts to your scan.
* Target Options: Exclude hosts as well as configure ports to scan.
* Source Options: Use decoys, set source address, set source port options if needed.
* Misc Options: Various options to include.

Once you have finished configuring your scan via the Wizard you can hit the Scan button. However, if you opted to go the Profile route you will need to select your new profile from the Profile dropdown list.

Scan results
Map your network with Zenmap 2

Figure 2

After your scan has completed you can take a look at your scan results. There are five tabs that will give you various information about the scan. Obviously the Scan Details tab is where you will get a good summation of your scan. To get the low-level details of your scan take a look at the Nmap Output tab. As your scan is running this is the only tab you can view – and it will give you every piece of information you need.

Saving scans

A nice feature of Zenmap is the ability to save scans. Once you have a scan completed you can save your scan and open it for later viewing. The only downfall of this is the Nmap Output is a bit cramped together. While the scan is running the output is displayed in real time so it’s easy to read. When not in real time this output can really be a pain to get through. Fortunately, between the other tabs, you can get all of the information you need quickly and easily.

Final thoughts

Zenmap makes easy work out of the complicated Nmap command utility. If you have any need to map a network or analyze your network topography, Zenmap is the way to go.

How to Create custom desktop shortcuts in Ubuntu

Posted in How To, Linux on August 8th, 2009 by admin – Be the first to comment Tags: , ,

Do you need your operating system to be as efficient as possible? Do you hate having to go back and forth between the mouse and the keyboard? Would you rather have a keyboard shortcut for everything? If this is you then you are in luck. Linux desktops tend to be the most configurable of all the desktops. And among the many configuration options is the keyboard shortcut. With this you can create shortcuts to get creative with starting applications.

In this article I am going to show you how to set custom keyboard shortcuts in GNOME and then show how you can get creative with them. The GNOME release I am using is 2.26.1 and the Ubuntu release is 9.04.

Creating shortcuts
Create custom desktop shortcuts in Ubuntu 1

Figure 1

Creating shortcuts in GNOME is quite simple. You will notice in the Preferences sub-menu of the System menu there is an entry for Keyboard Shortcuts. Click on that to open up the Keyboard Shortcuts manager (see Figure 1). As you can see there are a number of keyboard shortcuts already created for you. This is not only a good place to create new
Create custom desktop shortcuts in Ubuntu 2

Figure 2

shortcuts but to find out what shortcuts are already enabled on the system. You might even find some of the keyboard shortcuts you want to use are disabled by default. You can enable them and give them new shortcuts. For example, the Expo key (which displays all desktops side by side – see Figure 2) is listed with the Mod4+E shortcut. What is the Mod4 key? It’s the Window’s key which is usually referred to as the “Super” key. So I reassigned that shortcut to work properly.

Add a new shortcut

Now it’s time to see just how shortcuts are created. As I mentioned earlier, creating shortcuts really is quite simple.
Create custom desktop shortcuts in Ubuntu 3

Figure 3

Once you have the Keyboard Shortcuts window open you will see the Add key at the bottom of the window. If you click on that a new, small window will open (see Figure 3). In this new window you only need to add two pieces of information:

Name: This is the name of the shortcut.

Command: This is the command you want to run when you hit the keyboard shortcut.
Create

Figure 4

After you fill out this information click Apply and you will see the shortcut is listed as disabled (see Figure 4). The reason the shortcut is listed as disabled is because an actual shortcut has yet to be defined. Now we have to define the shortcut. To do this click on the Disabled section associated with your shortcut. In figure 4 I have created a shortcut to open up the Claws Mail email client. Now I want to assign the shortcut combination of the Alt Key + “c” to start the application. To do this I will click on the “Disabled” entry which will change and say “New shortcut…”. When you see this change hit the keyboard combination you want to use and it will then be assigned. You know it worked if the shortcut is now listed in conjunction with new shortcut.

Be creative

Don’t think you just have to be limited to opening up standard applications with this feature. For example: I use the Nano editor a LOT. But to use the Nano editor I have to open up a console window and then enter the nano command to start up the editor. Instead I create a shortcut that will automatically open up the gnome-terminal with the Nano editor running. To do this I will create a shortcut with the following information:

Name: Nano

Command: gnome-terminal -e nano

Assign this the Ctrl-N combination and when you hit that keyboard shortcut you will have the gnome-terminal console opened immediately to the Nano editor.

You can also, for example, open a browser window to a specific site. Say, for instance, you want to have one keyboard shortcut to open Firefox to ghacks.net and one shortcut to open Firefox to Slashdot. You can do this by adding shortcuts with the following information:

For Ghacks

Name: Firefox Ghacks

Command: firefox http://www.ghacks.net

For Slashdot

Name: Firefox Slashdot

Command: firefox http://www.slashdot.org

Final thoughts

Creating keyboard shortcuts can make your desktop life so much easier. Have you used creative shortcuts to make your desktop life easier? If so, share them.

How to Adding a widescreen monitor in Linux

Posted in How To, Linux on August 3rd, 2009 by admin – Be the first to comment Tags: , ,

Recently I purchased a 23″ wide screen monitor for my primary desktop PC. I had a feeling there would be a bit of an issue when I plugged it into my Elive Compiz installation that isn’t as user-friendly as, say, a Ubuntu installation. When I did plug it in it wasn’t horrible. The biggest problem I had was the new aspect ratio of the monitor (16:9) was causing everything on the screen to seem stretched with the previous resolution (1280×1024).

The monitor itself was reporting that the ideal resolution was 1920×1080, so I figured it was just a matter of adding the correct mode to the “Screen” section of my /etc/X11/xorg.conf file. It wasn’t that easy.

The first attempt

Normally, when I needed to change a resolution, or just hard-code a resolution, I would add a sub section in the xorg.conf file like:

SubSection “Display”
Modes “1920×1080″ “1440×900″ “1600×1200″ “1440×1440″ “1280×1024″ “1280×960″ “1280×800″ “1152×864″ “1024×768″ “832×624″ “800×600″ “720×400″ “640×480″
EndSubSection

Normally this would work, picking up the 1920×1080 mode first. In this instance, however, this did not work. I will tell you that I am working with an NVidia Geforce 8800 chipset, so support in Linux is quite good. I know this isn’t an issue with the video card. But no matter what resolution I used I was having no luck fighting the aspect ratio. The screen was either stretched too far horizontally, cropped at the bottom, or cropped all around.

I remembered there was an application that would gather information about my monitor and report it back. Maybe that was the key. The application is ddcprobe will give you the following information:

* Monitor name
* Monitor VertRefresh values and HorizSync rates range
* dpms

To install this application issue the command:

sudo apt-get install xresprobe

and you are ready to check. To do this issue the command

ddcprobe

which will return something like this:

vbe: VESA 3.0 detected.
oem: NVIDIA
vendor: Build 070809.2
product: MCP67 – mcp68-02 Chip Rev
memory: 65536kb
mode: 640×400x256
mode: 640×480x256
mode: 800×600x16
mode: 800×600x256
mode: 1024×768x16
mode: 1024×768x256
mode: 1280×1024x16
mode: 1280×1024x256
mode: 320×200x64k
mode: 320×200x16m
mode: 640×480x64k
mode: 640×480x16m
mode: 800×600x64k
mode: 800×600x16m
mode: 1024×768x64k
mode: 1024×768x16m
mode: 1280×1024x64k
mode: 1280×1024x16m
edid:
edidfail

Notice the edidfail at the end. What happens is sometimes hardware will not respond properly when the EDID is queried. If this happens try to probe a few more times, you should get more information. In my case, the Samsung 2333sw would never report the full information.

Back to square one.

NVidia

Remember I mentioned I was using an NVidia GeForce chipset? That’s a good thing because there is a handy application called nvidia-settings that I had used with much success before. The only reason I hadn’t automatically tried this was because I have had issues with the Elive Compiz distribution and X when trying to use tools not standard to the distribution. And besides the Elive resolution tool wasn’t picking up the new monitor so there was no hope there.

Installing the new tool was as simple as issuing:

sudo apt-get install nvidia-settings

Running the tool was equally as easy by issuing the command:

sudo nvidia-settings
Adding a widescreen monitor in Linux

Figure 1

When this application starts you will see a number of sections in the left pane (see Figure 1) that you can click on. Click on the X Server Display Configuration and you will then see a button for Detect Displays. Click on that and the new resolution should appear. The next step is to click the Save to X Configuration File which will write your changes.Finally click the Quit button to finish up.

In order to actually have the changes take effect you have to log out of X and log back in. Once you do you should see your new wide screen monitor in action.

What did it write?

The results of the nvidia-settings change to the xorg.conf file surprised me. It completely rewrote the “Screen” section of the Xorg configuration file. Here is the “Screen” section:

Section “Screen”
Identifier “Screen0″
Device “Videocard0″
Monitor “Monitor0″
DefaultDepth 24
Option “TwinView” “0″
Option “TwinViewXineramaInfoOrder” “CRT-0″
Option “metamodes” “1920×1080 +0+0; 1440×900 +0+0; 1280×1024 +0+0; 1280×960 +0+0; 1280×800 +0+0; 1024×768 +0+0; 800×600 +0+0; 640×480 +0+0″
SubSection “Display”
Depth 24
EndSubSection
EndSection

The TwinView option is usually used for dual head displays. In order for Xorg to get the 16:9 aspect ration it must use it and splice the two images together.

Final thoughts

Linux has come such a long way. But when you are attempting to configure a distribution that isn’t especially made to be Noobie-friendly don’t expect for tasks like attaching a widescreen monitor to be an out of the box experience. The good news is that there are plenty of tools to help you out of little situations such as this.

In the end the new monitor works and is as beautiful a display as I have seen.

How to Manage your Active Directory from Linux with adtool

Posted in How To, Linux on August 3rd, 2009 by admin – Be the first to comment Tags: , , ,

Active Directory is one of those Microsoft tools that so many have no choice but to use. Although I much prefer LDAP because it is so much easier to set up and manage. But for much of the enterprise world Active Directory is the tool used. Does this mean you are locked into managing Active Directory from a Windows machine? No. If you are a creature of the command line you can manage your AD from the Linux command line. It’s not that difficult and, in the end, will give you many more options to keep your AD server managed.

Of course it is not just a matter of working on the Linux end of things. There is one issue to settle on the MS end. You have to activate Secure LDAP on your AD Server. This process goes beyond the scope of this article, but the steps are pretty clear.

Enable SLDAP

Here are the steps to enable Secure LDAP on your Windows 2003 AD server (I will leave out the details):

1. Create an Active Directory domain controller certificate request.
2. Create a Certification Authority.
3. Sign the certificate request by the Certification Authority.
4. Export the root certificate Certification Authority.
5. Import the root certificate Certification Authority onto the Domain Controller.
6. Import the LDAP Server certificate onto the Domain Controller.
7. Set up the UMRA (LDAP Client) computer.
8. Verify Secure LDAPS using SSL.

Installing adtool

Fortunately adtool will be found in your distributions’ repositories. So all you have to do is follow these steps:

1. Fire up Synaptic (or whichever Add/Remove Software utility you use).
2. Do a search for “adtool” (no quotes).
3. Mark the results for installation.
4. Click Apply to install.
5. Close Synaptic.

Configuring adtool

This is a bit of configuration you need to handle before you can use adtool on your AD server. First create the file (if it doesn’t exist) /etc/adtool.cfg and add the following contents:

uri ldaps://YOUR.DOMAIN.HERE
binddn cn=Administrator,cn=Users,dc=domain,dc=tld
bindpw $PASSWORD
searchbase dc=domain,dc=tld

Where YOUR.DOMAIN.HERE is the actual address to your Active Directory server.

Where PASSWORD is the password for the AD user that has proper permissions to manage the AD server.

You will also need to make sure the following is in your /etc/ldap/ldap.conf file:

BASE dc=YOUR,dc=DOMAIN,dc=HERE
URI ldaps://YOUR.DOMAIN.HERE
TLS_REQCERT allow

Without the above configuration you will not be able to accept the SSL certificates from the server.

Basic usage

The basic usage of the adtool command is simple. Of course you will have to understand Active Directory in order to really understand the usage of this tool. Below I will give you samples of commands to handle the basic tasks for AD. Any information in ALL CAPS would be altered to fit your needs.

Create a new organizational unit:

adtool oucreate ORGANIZATION NAME ou=user,dc=DOMAIN,dc=COM

Add a user:

adtool useradd USER ou=ORGANIZATION ou=user,cd=DOMAIN,dc=COM

Set a user password:

adtool setpass USER PASSWORD

Unlock a user:

adtool unlock USER

Create a group

adtool groupcreate GROUP ou=user,cd=DOMAIN,dc=COM

Add a user to a group:

adtool groupadd allusers USER

Add an email address for the user:

adtool attributereplace USER mail EMAIL@ADDRESS

Final thoughts

We’ve only really scratched the surface of this powerful tool. But from this you should be able to see how easy adtool can be as well as how helpful it is.

How to Get back the ctrl-alt-backspace behavior in Ubuntu

Posted in How To, Linux on August 1st, 2009 by admin – Be the first to comment Tags: , , , ,

In the most recent release of Ubuntu (9.04) the developers decided (after a very lengthy discussion) that the old tried-and-true Ctrl-Al-Backspace key combination would no longer kill the X server. Their justification for this (in a nutshell) was that this combination could be accidentally hit causing the user to lose data. This was not something they wanted on their hands. To me this is a feature that I would miss. There have been instances where a poorly written application decided it needed to take up all of my memory thereby making the desktop unusable. Of course you could always go to a virtual terminal but for new users this is more of a hassle than just being able to hit Ctrl-Alt-Backspace.

Now the problem with Ctrl-Alt-Backspace is that you can, in fact, lose data. But as a last resort, having this behavior back can really be helpful. And fortunately, it is possible to get the old standby behavior back. This tutorial will show you how.

There are two ways to get this behavior back into Ubuntu. You can either install the dontzap application or you can edit your /etc/X11/xorg.conf file. We’ll examine both.

Dontzap

The dontzap application does one thing – it sets the DontZap value in xorg.conf so you don’t have to. To install the application open up a terminal window and issue the following command:

sudo apt-get install dontzap

Now to set the value in your xorg.conf file you have to run the command with one of two switches:

–enable

or

–disable

To enable the Ctrl-Alt-Backspace behavior you use the –disable switch and to disable the Ctrl-Alt-Backspace behavior use the –enable switch. It seems backwards, but remember the command is dontzap not zap.

So the full command would be either:

sudo dontzap –enable

to disable Ctrl-Alt-Backspace. Or

sudo dontzap –disable

to enable Ctrl-Alt-Backspace.

Once you have run this command you will need to log out of X and log back in, in order for the behavior to finalize.

Manually enabling

If you don’t want to install the dontzap application you can hand-edit your xorg.conf file to include the correct DontZap entry. To do this enter the following command to open up your xorg.conf file for editing:

sudo nano /etc/X11/xorg.conf

What you want to do is add the following lines to the end of your file:

Section “ServerFlags”
Option “DontZap” “off”
EndSection

Just as you would have to using the dontzap command, you will have to log out of X and log back in for this to take effect.

Final thoughts

There was a lot of thought and discussion that went into the decision to disable the Ctrl-Alt-Backspace behavior by default. I give the Ubuntu developers a hand for really going out on a limb and thinking more of the new end users than of the old school users like myself. I guess the developers figured it would only be a matter of time before the old school guys would figure out a way to enable this behavior on their systems.

How to see a detailed history of the commands run in Linux

Posted in How To, Linux on July 26th, 2009 by admin – Be the first to comment Tags:

If you use or administer a Linux machine it can be quite useful to be able to take a look at the history of commands that have been executed on a machine. This can be pretty useful when debugging and issue. I usually use the command history to help me with this.

# history

946 rpm -R mutt-1.4.1-11.rhel4.i386.rpm
947 rpm -qR mutt-1.4.1-11.rhel4.i386.rpm
948 sudp rpm -qa | mail
949 sudo rpm -qa | mail
950 sudo rpm -qa | grep mail
951 rpm -qR sendmail-8.13.1-3.2.el4
952 cd scripts/log_parse/

This command gives me a straightforward list of the commands executed on this machine by the user I’m currently logged in as. However, sometimes I need a lot more information than just this. I need to know which command was executed at what time. For this I make a small modification to the commands settings, adding the date and time to the information output by the command:

# export HISTTIMEFORMAT=”%F %T “

Now run the history and see the difference:

# history

946 2009-07-20 08:12:33 rpm -R mutt-1.4.1-11.rhel4.i386.rpm
947 2009-07-20 08:09:33 rpm -qR mutt-1.4.1-11.rhel4.i386.rpm
948 2009-07-20 09:49:44 sudp rpm -qa | mail
949 2009-07-20 10:37:33 sudo rpm -qa | mail
950 2009-07-20 10:17:13 sudo rpm -qa | grep mail
951 2009-07-20 10:12:23 rpm -qR sendmail-8.13.1-3.2.el4
952 2009-07-20 10:22:43 cd scripts/log_parse/

Add this command to your users .bashrc file to make the change permanent.

How to recursively copy files from an FTP server with Linux

Posted in How To, Linux on July 22nd, 2009 by admin – Be the first to comment Tags: ,

The other day I was migrating my hosting from one server to another. My previous hosting only gave me FTP access. The new host came enabled with SSH and a complete Linux environment. I wanted to migrate the data from my old host to the new one. Here’s how I moved all my data.

I used the following command for the migration:

# ncftpget -R -v -u “remoteuser” -p “password” ftp://remotserver.com /home/localdir /remotedir

NC FTP is a really cool FTP client for the Linux command line. It ships by default with most Linux distributions. It comes installed with a few command such as ncftpget and ncftpput. In this example we’re using the first of the two commands. Here’s a breakup of the command.

-R -v These two tell ncftpget to get the files recursively, and make the output verbose.
-u -p These two parameters are followed by the username and password for the FTP session.
ftp://remotserver.com This is the IP address or the domain of the remote FTP server.
/home/localdir This is the path of the directory in your local machine where you want to copy the remote files
/remotedir This is path of the directory you want to copy in the remote server

Just be careful not to mix up the local and remote directories when you run the command. Otherwise, it should be pretty straightforward.

Synaptic tips and tricks

Posted in Linux on July 20th, 2009 by admin – Be the first to comment Tags: , ,

If you have been reading my tutorials on Ghacks long enough you will have seen mention of the Synaptic package manager quite often. There’s a good reason for this – the Synaptic package manager is one of the best and most user-friendly installation tools available (for any operating system). Not only does it make for simple installation, it eases upgrading as well as removing of packages.
If you’ve played around around with Synaptic enough you will have discovered some other nifty features. In this article I am going to show you some of the Synaptic features you may not know about yet.

Save space by deleting files

Are you on a system where space is a premium? Did you know that Synaptic keeps a cache of packages on your system that can take up valuable space? If you look in /var/cache/apt/archives you will see a large number of .deb files retained. If you need to get rid of them to save space you can easily do so through the Synaptic package manager.

To delete your Synaptic cache open up the Preferences window from the Settings menu. In the Preferences window click on the Files tab and then click the “Delete Cached Package Files” button and all of those packages will disappear, saving you a good amount of space.

From within this same tab you can configure Synaptic to handle package files in various ways. The default behavior is to only delete packages when they are no longer available.

Fixing broken packages

Have you ever tried to install a .deb from the command line only to find out you didn’t have the right dependencies installed? You might be interested to know that, chances are, that package was marked for installation anyway, and all you need to do to finish that installation is use the Fix Broken Packages feature in Synaptic. To do this click on the Edit menu and select “Fix Broken Packages” entry. The next step is to click the Apply button which will bring up the information window informing you what has to be done to fix the broken package. Make sure you review this, otherwise something could be removed or upgraded that you don’t want removed or upgraded!

What is installed on your computer?
It’s actually fairly easy to see every package currently installed on your machine. To do so click on the Status button in the bottom left pane of the main window (see Figure 1).

Once you have clicked on the Status button click on the “Installed” entry in the upper left pane which will reveal every application installed in the upper right pane. You can scroll through this to see what all is installed.

As you go through this list you will see icons to the left of each package entry. Each icon means something different. In Figure 2 I have pulled up the Icon Legend from the Synaptic Help menu. This legend displays what each icon means.
Figure 2

The icon list should be fairly self explanitory. The most important ones to look for are:

* Marked for installation.
* Marked for upgrade.
* Marked for removal.
* Installed.
* Installed (upgradeable).
* Broken
* Supported.

You can also click in the upper left pane on each section. Say you want to see only a listing of the packages that are upgradable. To do this click on the “Installed (upgradable)” entry and the upper right pane will change to only list those packages.

Final thoughts

Hopefully you seen a tip for the Synaptic package manager that you didn’t know. Synaptic is a large and important tool for the Linux operating system. We’ll come back to this topic to eventually you will be using Synaptic like a pro.

How to get a list of files an RPM package depends on

Posted in Linux on July 15th, 2009 by admin – Be the first to comment Tags: , ,

Sometimes when you are trying to uninstall or upgrade some software on a Linux machine you run into dependency related issues. Just about everyone I know who works with RPM based distributions has experienced what is known as “rpm hell” at one time or another. Here’s something to help you a bit if you are stuck in one of those situations.

Let’s look at how to check what files an installed RPM depends on.

Say you are trying to upgrade or uninstall the RPM of sendmail from your Linux computer. You might run into dependency issues when you run the uninstall command:

# rpm -e sendmail-8.13.1-3.2

In such a case it might be useful to take a look at what files this package depends on. Use the following command:

# rpm -qR sendmail-8.13.1-3.2
/bin/bash
/bin/mktemp
/bin/sh
/bin/sh
/bin/sh
/bin/sh
/bin/sh
/usr/sbin/alternatives
/usr/sbin/useradd
bash >= 2.0
chkconfig >= 1.3
config(sendmail) = 8.13.1-3.2.el4
cyrus-sasl
fileutils
gawk
libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1)

Now you can see a list of files that the sendmail package depends on and you’ll be better equipped to debug the failed uninstallation process.