blogging code diy slackware

Check Slackware Changelog using conky

Yesterday I was wondering what’s the best way to update Slackware, and I decided to keep a local mirror of the current branch on my nas, I can mount the directory using the NFS protocol when I need it and the nas can go check for updates and fetch them during the night while I sleep and the network is idle.

The real problem is that I used to rely on Conky to check for updates to the current tree by issuing a slackpkg check-updates, but having slackpkg use my local mirror, it will always say that there are no updates, because the mirror is always updated. So I decided to bypass the mirror for the sole purpose of checking the changelog, and I came up with this script:

 if [[ -f ${TMPCL} ]]; then
     rm $TMPCL
     wget -q -P ${TMP} ${CL}
     if [ "$?" != 0 ]; then
         echo "Error checking updates…Wait until next try."
 NCL=$(head -n 1 ${TMPCL})
 LCL=$(head -n 1 ${LOCAL_CL})
 if [[ ${NCL} != ${LCL} ]];then
     echo "Updated packages available!"
     echo "No news is good news!"

Now I just download the Changelog.txt file from a trusted mirror, using head I check for changes in the first line between the latest file stored by slackpkg and the one I downloaded and if I find a difference I output a line to conky.

This script is made to be run by Conky and usually I have it run once every 12 hours if my pc is on for that long.
I hope someone find it useful 😉

See you on the next one.

diy linux

new home server ideas

I’m thinking about building a new home server, so I picked some parts I think might work well for what I need to do. Here’s the list for future reference:

PCPartPicker Part List:

  • CPU: AMD Ryzen 3 3200G 3.6 GHz Quad-Core Processor
  • CPU Cooler: Cooler Master MasterLiquid ML240L RGB 66.7 CFM Liquid CPU Cooler
  • Thermal Compound: Thermal Grizzly Kryonaut 1g 1 g Thermal Paste
  • Motherboard: Gigabyte B450 AORUS M Micro ATX AM4 Motherboard
  • Memory: Corsair Vengeance LPX 16 GB (2 x 8 GB) DDR4-3200 Memory
  • Case: Antec VSK10 MicroATX Mid Tower Case
  • Power Supply: EVGA BT 450 W 80+ Bronze Certified ATX Power Supply
  • Case Fan: 2x be quiet! Pure Wings 2 140 PWM 61.2 CFM 140 mm Fan

Total around €445.00 on amazon as suggested by PCPartPicker.

What do you guys think?

diy linux slackware

baking programs

Compiling programs always feels like you’re baking a cake, you look for it, check the dependancies and then run the slackbuild, leave your computer to go grab a drink and when you come back you see an error, checking for it you notice you’ve forgotten a dependency, it’s like you put your cake in the oven, starts cooking and after a while you go “oh shit, I forgot to add sugar to the dough“.

I’ve been compiling a couple programs in the past few days and I’ve ended up patching them a lot, to compile audacity I had to go around and add 6 patches before the script managed to compile correctly, and today with qpdfview it was the same, still dependancy errors but in the end I made it work and let me tell you, when you come back to your PC and the script has ended and it says the program is installed it’s almost like you could smell it, your freshly baked cake waiting for you to enjoy it…

code diy linux

GIT – how to setup your own server

Hello everyone,

I recently decided to move all my code under GIT, I’ve used it before and I’ve used also SVN, but I find GIT to be more straightforward in some aspects.

In order to use git I needed a place online where to store my projects, and I thought that github could be a good place, but the fact that you have to pay to keep a project private just didn’t sound right in my opinion. Of course github is there to make money (specially now that M$ bought it), but I prefer to have a simpler setup and be able to do things my way as much as possible.

So I started planning what I wanted my git server to have. Here’s a list:

  • Security – I decided to make it work only under ssh, that way only someone who has the key can clone or access the repository. I also added an unprivileged git user that has only access to very few commands, so even if somebody manages to access through ssh he’ll find himrself with only very few options available.
  • Notifications – my server already tells me a lot of what happens, so I wanted my git service to do the same. I implemented a mail service that notifies me every time a new repository is added or everytime there’s a push to a repository.
  • Automation – I wanted to have less steps possible between creation of the project and deployment to production. Now in two steps I can create a repository and clone it to my local computer, and when I’m done I just need to push my modifications and the code is deployed automatically.
  • Visibility – I haven’t yet decided if I want my code to be visible, so I haven’t even started thinking about this possibility.
diy linux

lock screen with xscreensaver

Just a quick tip in case you’re not using a major desktop environment like KDE. I’m using LXQT at the moment and as a screensaver it uses xscreensaver. It has no default shortcut to lock the screen, so I looked around a little bit and I found this command:

xscreensaver-command -lock

which will fire up the screensaver locking the screen.

to set it up just open the lxqt settings and add a new global shortcut (mine is Win + L) and save. That’s it, now everytime you need to lock your screen just hit the shortcut and voilà..

diy slackware

syncing sbopkg repository to local copy

I’m having a few problems with my nas and file permissions on a samba mount, I’m keeping a copy of the sbopkg repository for Slackware 14.1 on the nas and I have that as a samba shared folder mounted on my pc. Everything is working fine, except that the repository update fails because of rsync not being able to work owner/permissions out trough samba.

The problem could easily be solved if I had the opportunity to install sbopkg on my nas, but since that is not an option, I had to figure out how to update my repository in a different way.

What I did was simple, I’ve launched sbopkg -r in one screen tab, and ps axu | grep rsync in another tab, then I copied the rsync command and run it inside the shell on my nas, which has rsync installed. Easy as that is, now I can sync my local repository anytime I want.

To go one step further, I’ve added that same command as a cron job on the nas, and now my local repository is synced once a day at 5am without having to worry about it anymore. Isn’t that cool?!

Just as a reminder to myself, the full rsync command is:

rsync --archive --delete --no-owner --exclude=*.sbopkg --verbose --timeout=30 /mnt/HD/HD_a2/sbopkg/repo/SBo/14.1/


code diy kde4

kde4 material design splash screen

splash screen consistent with the material kdm theme I wrote, animated using qml

I can’t believe I’m back after just a couple of days with another article, and this time I’m going to show you (and let you use) my kde4 splash screen, it uses qml for rendering all of the neat animations while loading the various components, with smooth transitions between the various items.

as I said, it uses qml to render in all of its beauty, with spinners and icons going on and off depending on the various modules being loaded in the system.

Once again, the background image comes from and the icons are mostly Genericons, only some of them came from searching on Google.

download kde4 splash theme

kde4 linux slackware

kernel 3.9.8 e kde 4.10.4 sul mio laptop nuovo :)

Nebula, il mio nuovo laptop ha ricevuto oggi in regalo l’ultima versione stabile del kernel linux, la 3.9.8 e l’ultima versione di kde4-SC, la 4.10.4 🙂

diy linux web

my local apache splash page

I Just wanted to show you my apache splash page 🙂

blogging code linux WordPress

WordPress local install

Quando si tratta di fare le cose in modo automatico mi diverto sempre a buttare giù degli script che mi aiutino a superare la routine.. 🙂

E’ il caso di, uno scriptino che è in grado di installare e aggiornare da svn tutte le installazioni locali di WordPress che ho..

Lo script può essere lanciato con le 3 opzioni seguenti:

  • -h che visualizza solo un breve testo di aiuto e poi esce senza far nulla.
  • -i <nome> che installa i file di WordPress nella cartella “nome” e ci copia dentro un file wp-config.php pronto per l’uso con i dati del mio database locale di MySQL e si occupa inoltre di copiare i file del plugin WordPress-importer nella cartella wp-content/plugins/ all’interno della cartella “nome” appena creata.
  • -u che si occupa di aggiornare all’ultima nightly release tutte le installazioni di WordPress presenti nella document directory del mio webserver locale..

Come potete vedere l’opzione di default è -h così lo script non fa danni e vi spiega come usarlo al meglio.. 😉