Categories
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:

#!/bin/bash
 CL="https://sunsite.icm.edu.pl/pub/Linux/slackware/slackware64-current/ChangeLog.txt"
 LOCAL_CL="/var/lib/slackpkg/ChangeLog.txt"
 TMP="/tmp"
 TMPCL="${TMP}/ChangeLog.txt"
 if [[ -f ${TMPCL} ]]; then
     rm $TMPCL
 fi
     wget -q -P ${TMP} ${CL}
     if [ "$?" != 0 ]; then
         echo "Error checking updates…Wait until next try."
     fi
 NCL=$(head -n 1 ${TMPCL})
 LCL=$(head -n 1 ${LOCAL_CL})
 if [[ ${NCL} != ${LCL} ]];then
     echo "Updated packages available!"
 else
     echo "No news is good news!"
 fi

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.

Categories
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…

Categories
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 slackbuilds.org::slackbuilds/14.1/ /mnt/HD/HD_a2/sbopkg/repo/SBo/14.1/

Cheers.

Categories
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 🙂

Categories
linux slackware

coming back home

E’ bello tornare a casa.. le vecchie abitudini, si sa, sono dure a morire e io alla fine non sono riuscito a stare lontano dalla mia amata slackware troppo a lungo.. 🙂 ma gli ultimi 2 sono stati i mesi dei cambiamenti e dei ritorni.. e presto ve ne parlerò.. 🙂

Categories
linux slackware web

google in stile kde4

Ciao a tutti,

torno dopo una pausa abbastanza lunga per mostrarvi alcuni temi per firefox che renderanno l’interfaccia di google più simile al vostro ambiente preferito, kde4!!

Categories
kde4 linux slackware

divertiti con la tua webcam, kamoso!!

Vi voglio parlare di un piccolo software che sto provando in questi giorni e che mi sta piacendo molto, si tratta di kamoso, un programma per gestire la webcam con kde.

“Un altro programma per la webcam!?” direte, beh si, in effetti non è il primo e immagino non sarà nemmeno l’ultimo, ma questo programmino ha qualcosa (almeno nelle intenzioni) che gli antagonisti non hanno…

Categories
freedom linux slackware

slackware-current

klogo-official-oxygen-128x128

Oggi pomeriggio ho fatto il salto in -current sul mio portatile… Ho aggiornato perchè ho visto nel changelog che PJV ha upgradato (che brutto termine 🙂 ) kde4 alla versione 4.3.1 ed ero troppo curioso di vedere gli aggiornamenti… quindi eccomi qui… 🙂

Se avete voglia di continuare a leggere vi spiegherò come eseguire questo terribile aggiornamento senza rischiare di far esplodere il vostro pc… 😉

Categories
linux slackware

remote blogging

Quest’oggi vi parlerò del remote blogging, cioè l’uso di applicazioni che risiedono sul vostro pc per pubblicare dei contenuti sul vostro blog o spazio web che sia 🙂

La cosa utile di questo genere di applicazioni è che non necessitano di una connessione ad internet per funzionare, si possono scrivere gli articoli in locale e poi inviarli una volta pronti per essere pubblicati…

Categories
fotografia linux slackware

weekend delle novità

Ragazzi, che spettacolo…

I 2 giorni appena trascorsi mi hanno regalato un sacco di novità dal punto di vista delle mie passioni 😀 , Slackware e Nikon sono ancora di più al centro dell’attenzione da ieri…