Linux Blog

Package management on Slackware

Filed under: General Linux,Linux Software — TheLinuxBlog.com at 6:38 am on Friday, December 21, 2007

People complain that Slackware is hard to use. I don’t believe that thats true. I don’t think that its any harder to use than any other Linux distribution. I also believe that there is perfection in simplicity. Believe me that it isn’t the easiest to set up but once its up it is actually easy to update and maintain once you learn how.

Despite popular believe Slackware does have good package management software. The main ones that come to mind are slapt-get, slackbuilds, pkgtools, swaret and slackpkg. Below is a small amount of information about each of them.

I’ve never myself used swaret so I don’t know too much about it other than its a package manager that manages dependencies. I also know that a new version will be released soon. If your interested in finding the best package management for Slackware you might want to check swaret out.

slapt is a mashup of the two words slack & apt. Those familiar with Debian or Ubuntu will know apt-get is at the heart of these systems, slapt-get is a clone of this system. Its been in Beta since its creation but works perfectly. There are graphical front ends for this software. I personally don’t use it because I can not find a fast repository in my area.

slackbuilds are kind of like the Gentoo package management. They are distributed with the source code on the Slackware DVD. They are basically scripts that help compile the source code. Its pretty easy to use, for more information visit: slackbuilds.org

pkgtools are the base of Slackware package management. Basically it is a suite of utilities that you can use to install, remove and upgrade software. The best source I’ve found for finding extra packages is linuxpackages.net.

My favorite for updating Slackware is slackpkg. It uses pkgtools to install and remove packages. It comes on the Slackware CD’s / DVD’s in the extras folder and is pretty easy to use. Basically you install it, select a mirror from the config file and then run:

slackpkg update

Once its finished doing its thing you can then do:

slackpkg upgrade-all

This will start a fairly lengthy process of downloading and installing all of the new packages. Other options are available such as options to install new packages, remove packages revert to vanilla system and many more. One thing I have to caution on is updating to current. Its not as easy as upgrading from release X to slackware-current all the time. This is due to the different versions of GCC, glib, solibs and various other types of libraries. Always read the UPGRADE.TXT or at least have a back up of all of your critical data before attempting to upgrade.

There are a lot of options, if your interested in running Slackware I suggest you try them all and then use the one you like. If you don’t want to run Slackware because another distribution suits you better try not to use the “I don’t use Slackware because its hard to maintain” card.

Graphical Shell Scripting

Filed under: Shell Script Sundays — TheLinuxBlog.com at 4:07 pm on Sunday, December 16, 2007

From all of my other previous shell scripting articles you can see that shell scripting is a very good way to get a task done or to automate. This is great but some times a little bit of that three letter acronym “GUI” is a nice touch. Well my friends, if you’ve been reading my articles and following my dialog examples then you are in luck. If not don’t worry, you can view all of the articles in the Shell Script section to the right.

The program to make your GUI’s for your shell scripts is the exact same thing as dialog except its graphical. Its called Xdialog. Once installed you basically use it the same way as dialog. If your thinking about upgrading a script thats written in dialog you might want to think twice because some window managers will display the windows differently.

Check out these Xdialog examples and corresponding screenshots:

Xdialog
 
Xdialog -yesno "Do you like Xdialog?" 5 50 && echo "Thats nice" || echo "Yea, some times its better to stick to CLI"

Xdialog ExampleXdialog Example

Recursive MD5 Sum Script

Filed under: Shell Script Sundays — TheLinuxBlog.com at 12:08 am on Sunday, December 9, 2007

This week I made this shell script to search one level deep and MD5 all of the files. I did this because I had multiple images and I wanted to see what images were the same so that I could merge them together. Its a pretty simple script & the output is the same as md5suming a file except there is more than one sum generated.

#MD5 Files in the directories
md5Dir () {
echo $directory;
for x in $(ls -1 $directory); do
md5sum $directory'/'$x;
done;
}
#Lists The Directories
for i in $(ls | grep active); do
directory=$i;
md5Dir;
done;

It only does one level deep but thats good enough for now. I am going to make it search recursively depending on the levels given by the user. I would also like to make it display files that are the same at the end.

It gets the job done for small directories, but if I wanted to run it on large multiple directories with lots of files in them I would definitely redirect the output to a file because it can be quite overwhelming. To run it just copy the code into a file and do the following:

sh [filename]

I hope this helps some one who is trying to MD5 multiple files in different directories!

Comments Are Back!

Filed under: The Linux Blog News — TheLinuxBlog.com at 4:03 am on Saturday, December 8, 2007

Ok, I’ve decided to add comments back to The Linux Blog. The idea behind commends is that people post comments for help, advice, questions, comments on the article or just to be nice. Before this was not happening so I turned them off. Now, I’ve re-added them back hoping that people will actually comment.

The spam problem has been fixed and we should not see any spammy comments since posters now have to be approved.

I’ll leave them on for a while and see how it does. In other news I’ve been writing like mad, trying to get some good articles written.

On the list of stuff to write are a couple of Shell Scripting articles, one about IP Soft Phones for Linux, Battery Life & Optimization, virtualization. I also have some tutorials that I would really like to write to help people out with WordPress and other web applications that run on open source software such as MediaWiki.

If you have any questions, or would like to request something, now you can actually just comment , so go ahead, leave a comment

« Previous Page