Snott

Category: Linux

Linux Related stuff, system administration, installation tutorials and more

  • Keep your arch linux system clean and light

    Keep your arch linux system clean and light

    Archlinux is a system that can take a lot of punishment from the user without breaking, nevertheless, it’s always useful to check once in a while your orphan packages to make sure your system doesn’t have unneeded dependencies or packages that no longer depend on any other package, so here are a couple of tips to improve your package management skills and to keep your system clean of packages you don’t want (after all that’s why you installed Arch in the first place).

    1) Uninstall Procedure

    The first thing to note, and I have seen lots of people NOT doing this, is  to remove package using the -s flag, so the package gets uninstalled along with the installed dependencies no longer required by any other package. For example, if you installed devede player you will get these 4 packages installed:

    mencoder  dvdauthor  vcdimager  devede

    If you then proceed to remove devede using just:

    pacman -R devede

    you will only get the devede package removed, leaving the remaining 3 packages in your system taking up space for something you already uninstalled and have no practical use now.

    So instead of uninstalling that way, try this one:

    pacman -Rs devede

    That will get all 4 packages uninstalled with no harm to your system.

    2) Orphan management

    WARNING: Please remember that pacman doesn’t hold your hand, and in some cases might suggest packages in the below method that are indeed useful for you, the method I am about to explain can be dangerous if you don’t have an idea of what you are doing.

    Taken from the ArchWiki:

    pacman is a powerful package management tool, but it does not attempt to handle all corner cases. Read The Arch Way if this confuses you. Rather, users must be vigilant and take responsibility for maintaining their own system.

    With this command you can list the orphan packages on your system, that is packages not required by any currently installed package:

    pacman -Qtd

    Dont blindly just copy the entire list and remove it from your system, doing this without checking first whats listed can lead to aliens eating your comp and pooping it before you realize what is happening.

    3) Using the -D switch in pacman

    This option is famous for NOT being known/used, but it’s very helpful, with this you can keep a list of packages you are trying so you can easily remove them later or keep them if you want.

    To test any given package after you install it, go ahead and do:

    pacman -D –asdeps

    This will tell pacman the package was installed as a dependency, consequently, it will be listed as an orphan (which you can see with “pacman -Qtd”)

    If you then decide that you want to keep the package, you can use the –asexplicit flag as is:

    pacman -D –asexplicit

    4) Knowing what is taking up space in your system

    There are some useful tools for this, one that is distro independent and very useful is Baobab (part of GNOME and included by default).

    This will tell you in a nice graphical way what is taking space on your system so you can take action.

    Another tool (this one is Arch specific) is a script that lists the real size of some of your packages, what do I mean by real? well, say you want to know the size of one of your games, the normal way to do it is search for the installation folder and check the properties for that folder, looking at how much space is taking off your hard drive, but what about dependencies? if it’s a big program, most likely is has lots of dependencies and those take space too.

    This tool will tell you (in order from biggest to smallest) the size of those packages including dependencies, I’m sure you will be impressed by some of the apps that will appear on this list.

    To use it, save the file as bigpkg.sh give it executable permissions with:

    chmod +x bigpkg.sh

    and run it:

     

    ./bigpkg.sh

    I hope that with this tips you can get a better understanding of how pacman and dependencies work, and have yourself a cleaner system to save the valuable disk space for your por….important files.

    Do you know of any other ways to keep your system clean? let us know in the comment section below!

  • Conky clock and stats configuration

    Conky clock and stats configuration

    Conky is a really cool application able to display whatever info you throw at it, being that your CPU usage stats, free/used storage space, how many emails are in your inbox, if there are any updates available for you package manager, etc.

    Previously, I have shown you how to configure openbox to get a real minimal desktop that its fast, lightweight and functional.

    One thing missing on that page was some stats of the running system as well as a pretty clock, in this post I am going to show you how to put a conky-powered big and pretty desktop clock along with some info about your system and email/updates.

    First off, if you don’t have conky, install it

    sudo pacman -S conky

    This is assuming you are using ArchLinux, if you are on other distro, just use your distro package manager to install the package.

    Ok to start, take this file and extract it on your home folder (NOT in any directory, all files should be in /home/youruser)

    Important note, conky configuration file is ~/.conky/.conkyrc, BUT WE ARE NOT GOING TO USE OR EDIT THAT file, we are going to use the ones provided in the above file for the stats and email/package updates, and another one for the clock. Later on this post I will show you how to make conky use another file different from the default one.

    In order to check gmail, you need to edit the python script (gmail.py, provided in compressed file above), note that you have to input your username and password there.

    Next open the file called conkyrc_archlinux  and on the line just after “TEXT” replace the path there with your own home folder.

    Now to test it just type:

    conky -c conkyrc_archlinux

    on a terminal and your brand new widget will display some useful info in a very stylish format.

    Next will be the clock, open the file called conkyrcclock, then replace all instances of /home/myuser with your own home path.

    Now you should have everything setup and would need to just run your new conky clock configuration, go ahead and type in a terminal:

    conky -c conkyrcclock

    This will bring up the clock. The -c switch tells conky to use the specified configuration file (conkyrcclock) and not the default one (.conkyrc). So you should now have 2 conky instances running on your system (don’t worry, memory footprint is VERY small).

    Now last step would be to add this 2 conky instances to your autostart so they open up as soon as you login.

    If you have gnome/kde you have a GUI for this in your system settings page. For openbox you have to edit the autostart.sh located at ~/.config/openbox/autostart.sh and add the following:

    conky -c conkyrc_archlinux &

    conky -c conkyclockrc &

    Here are a couple of screenshots, this is an openbox desktop, if you want a similar openbox desktop you can follow my openbox configuration guide:

    Openbox desktop cleanOpenbox desktop dirty

     

    Have fun with your new widgets! If you have a question just ask in the comments below