2.10.2006

Jacman: Package Management in Arch Linux

Arch Linux is not what one would call a "newbie friendly" distribution. As such, the default package management software, Pacman, has no default GUI front end to it. Pacman is all CLI. In many regards, it is very similar to apt from Debian and portage from Gentoo. The basics of Pacman's operation are, like most other package utilities, installing, removing, and updating packages.

For my personal use, I don't mind the command line. I can usually find the package I need and then just

#pacman -Sy

to install it. To be honest though, I much prefer a GUI for when I want to see all the available packages for my system. Command line querying for packages is too cumbersome for casual package browsing. Being a Debian user, I love the Synaptic utility for this.

While perusing the Arch forums for help with a problem that I was having, I noticed a link in someone's signature. I generally like to read people's signatures because they can be quite entertaining sometimes. Anyway, the poster's handle is arooaroo (his real name is Andy). Listed in his signature was a link with text "Jacman (Pacman GUI)." Upon seeing this, I immediately clicked the link and went searching for sreenshots.

Being a Java coder myself, I was intrigued with this utility. I downloaded the 0.3 version and fired it up after issuing an "su" to root. Below is what I encountered.

# jacman
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Exception in thread "main" java.lang.InternalError: Can't connect to X11 window
server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$000(Unknown Source)
at sun.awt.X11GraphicsEnvironment$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Unknown Source)
at sun.awt.X11.XToolkit.(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.awt.Toolkit$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Unknown Source)
at java.awt.Toolkit.getEventQueue(Unknown Source)
at java.awt.EventQueue.invokeLater(Unknown Source)
at javax.swing.SwingUtilities.invokeLater(Unknown Source)
at andyr.jacman.Jacman.main(Jacman.java:739)


Now, this is probably some problem on my part. Some command that I am not familiar with or something.
Anyway, at this point, I try to use jacman under my personal account. I know that I won't be able to install/remove/update anything but I just want to see if it comes up. Well, jacman comes up just fine. Since I am also familiar with the "Ubuntu way" of doing things, I "su" to root and install sudo.

#pacman -Sy sudo

After I get sudo set up, I revert to my personal account and issue

$sudo jacman
Password:

Voila! jacman comes up and I am off and running.

On startup, jacman presents you with five buttons: "Install Packages", "Update Packages", "Remove Packages", "Rollback Packages", and "Optimize Pacman". All of these work flawlessly on my machine.

In conclusion, I can say that jacman is a great utility for managing packages on my Arch Linux system. I am able to browse packages to my heart's content and install/remove just from a couple of clicks of a mouse. I am very pleased with what Andy has done so far.

Visit Andy's website for Jacman and other interesting software.

3 comments:

Anonymous said...

I wondered why I was getting more hits on my site. Your blog entry has been added to Linux Today.

I'm happy that you are happy with Jacman. It's going to get better too! I'm just hoping that it'll make Arch more attractive to new users, especially ones who prefer to use GUI tools rather than the command line.

I couldn't have done it without contributions from Jon-Anders (SoniX) though - so big thanks to him.

Anonymous said...

You might want to try "xhost +localhost" (allow all access to display from localhost) BEFORE "su", and "export DISPLAY=:0.0" (to tell X that you want to use the default display, although that seems to have been arranged automatically already)

BTW, you might also regard this as a counter-observation to your "Linux Snobs" post. You are right in that you often get impolite responses, but in my experience those just cover incompetence. The real problem is that those loudmouths drown out the valid questions and answers. It's a (very effective) form of cybersquatting. You are btter off trying a list or channel associated with a real geeky distro (Arch Linux/LFS/...).

Disclaimer: I am neither smart nor nice, and part of the RTFM crowd as well. Nor do I believe that trying to be everything to everybody is a smart strategy, for linux or anything else. I am a firm believer in learning to help yourself. Nevertheles I help others, both professionally and privately, when necessary.

FracturedSingleton said...

Thanks for the tip and counter-observation, "Anonymous". It was funny you should mention Arch Linux as I am sure you noticed that the good experience happened on their forum. Very helpful group there.