Conky with Scripts, Weather, Email and images

Conky by Proto from LxH

Well, I decided that finally I had enough freetime to start playing with Conky. I am ok editing conkyrc, adding different fonts and so forth but i’ve never used scripts or images.

Bruce and the Conky boys who run Conky Hardcore! regularly post their Conky configs on LxH so I decided to have a look for something challenging (for me) and found a Conky config by Proto.

Conky first run
First off I just copied his conkyrc and ran it. Not surprisingly I was faced with a terminal full of errors. Directories not found, image files not found, missing scripts etc. I also had to change references to my Wireless network connection and also add my email details.

Conky and extra directories
I realised that the entire Conky setup was split into 3 main directories inside the .Conky directory. Conky1, Conky2 and Conky3. Each of these directories had image, script and sh directories. I moved everything to its correct location and started to make a bit of progress.

Email config [Solved]
Even though Proto had provided me with an TotalEmails script, I kept getting a “No conkyEmail” error, and a quick Google search led me to Kaivalagi’s python script at Ubuntu Forums. I followed his instructions and added the Karmic Koala repo and installed his conkyEmail script.
http://ubuntuforums.org/showthread.php?t=869771
However, now I had one email script in my home directory, and another in /usr/share/conkyemail/conkyEmail.py. I looked through the example that he provided, and looked through both scripts, but I thought, ok, this is beyond me. I’m off to LxH Conky Forum to see if the boys can help me on this one.

EDIT: I solved the email problem by also adding the same email details to my conkyrc as are in the totalemails script.

Harddrive Temperature
The next error I was getting was “sh: hddtemp: not found”, I knew about this from before and installed hddtemp with aptitude directly from then terminal.

Conky Sensors:
I solved this by installing lm-sensors.

Vertical and Horizontal Alignment
Finally, after removing the extra HDD and changing afew things, I only had to try to align everything. Basically, I have a laptop with a 1200X800 widescreen and also that removing some sections made things move up and down, leaving it looking a bit skewiff!

Block Obsessive Spam Bots by Redirecting their IP address

//

I had a major problem on two forums with obsessive spam attacks. These are the aggressive spambots which repeatedly attack every two minutes, clogging the forum logs with error messages.

Kaptcha was in place for sign ups, but sometimes human spammers sign up then add the details (login + password)  to a spambot script.

1. You add a ban trigger which stops them from posting – They continually try to post spam

2. You add a ban trigger which stops them from logging in – They continually try to login

3. You delete the account and ban the IP, Email address, User name – They come back with different details

I was at my wit’s end so I decided to try and use an htaccess file with a rewrite permanent redirect.

I Googled and found these two sites: HERE and HERE.

This is the result:

RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_ADDR} ^94\.23\.216\.104$ [OR]
RewriteCond %{REMOTE_ADDR} ^94\.23\.216\.103$ [OR]
RewriteCond %{REMOTE_ADDR} ^62\.60\.136\.28$ [OR]
RewriteCond %{REMOTE_ADDR} ^94\.23\.207\.161$ [OR]
RewriteCond %{REMOTE_ADDR} ^61\.145\.121\.124$ [OR]
RewriteCond %{REMOTE_ADDR} ^94\.23\.216\.105$ [OR]
RewriteCond %{REMOTE_ADDR} ^94\.23\.216\.106$ [OR]
RewriteCond %{REMOTE_ADDR} ^212\.117\.162\.244$ [OR]
RewriteCond %{REMOTE_ADDR} ^216\.224\.124\.124$ [OR]
RewriteCond %{REMOTE_ADDR} ^212\.117\.164\.65$ [OR]
RewriteCond %{REMOTE_ADDR} ^91\.121\.109\.65$
RewriteRule .* http://www.usdoj.gov/criminal/cybercrime/cyberstalking.htm [R,L]

My domains are hosted at ICDsoft on Linux servers and have the mod rewrite engine turned off by default. So that had to be enabled. Below that are the Rewrite Conditions which basically tell the server to redirect the incoming IP addresses to the Cyberstalking page of usdoj.gov, which is very apt site for the bastards (spambots) to end up.

I basically have a clean error log directory now, and if a new spambot gets through, I just add its IP to htaccess, and redirect it well away from my forums.

Many people who use Linux have Linux forums, mine are Smf hosted at ICDsoft, and I thought that this info may help some of you fight back the ever increasing spam attacks.

Incidentally, the support at ICDsoft is awesome, I have 4 servers and many sites hosted with them and can do nothing but recommend the quality:

Ubuntu Slowdown – Dual Boot Loses Swap UUID [Fix]

//

ubuntu-logo-100x90This was reported as an issue before when dual-booting Ubuntu with another distro. Basically the Swap UUID Doesn’t get updated in /etc/fstab when another distro is installed on another partition.

I installed Fedora for a test run on a spare partition, with Grub being installed to MBR.

Later after an Ubuntu update, which included a new kernel and also a newer Grub, Ubuntu took back control of Grub.

I booted into Ubuntu, only to find that everything was a bit sluggish, and having experienced this before, I checked my Swap partition in  readiness to solve this problem which I had a feeling was repeating itself.

Check Swap:

free -m

With the result:

Swap:            0          0          0

Fix with “blkid” to find the real UUID of the Swap Partition:

blkid


/dev/sda1: LABEL="ACER" UUID="320D-180E" TYPE="vfat"
/dev/sda2: LABEL="Fedora-12-i686-L" UUID="3b915b51-c7ce-4077-975d-df2a177b94cb" TYPE="ext4"
/dev/sda3: UUID="78a42ee0-4d8a-474c-9cd6-b3f3a6dd6449" TYPE="ext4"
/dev/sda4: UUID="4bfbb29b-78da-4172-ae54-b1bb934de7f5" TYPE="swap"

Then use Nano to Fstab and change the old Swap UUID to the new UUID:

sudo nano /etc/fstab

Now just turn Swap on and check used memory again:

sudo swapon -a

with the result:

free -m

   Swap:         1153          0       1153

So there you have it, if you install another Linux distro on a spare partition to dual-boot and use the same Swap partition, you may find that when you boot into Ubuntu that it is a little sluggish than usual.

This is a known problem for dual and triple booters, but easily remedied, as you see above.

//

Sabayon Linux 5.1

sabayonFabio Erculiani has announced the release of Sabayon Linux 5.1, a Gentoo-based desktop distribution with GNOME or KDE desktops: “The best, refined blend of GNU/Linux, coming with bleeding edge edges, is eventually here. Features: based on the new GCC 4.4.1 and glibc 2.10; ships with a desktop-optimized Linux kernel 2.6.31; provides extra server-optimized and OpenVZ-enabled kernels in repositories; installer now available in multiple languages; complete ext4 file system support; features X.Org 7.5 and up-to-date FLOSS, NVIDIA, AMD video drivers; containing GNOME 2.28 (with GNOME Shell) and KDE 4.3.4; outstanding 3D desktop applications (Compiz, Compiz Fusion and KWin)….” See the release announcement for a complete list of new features and changes. Download the KDE (K) or GNOME (G) edition for your preferred architecture: Sabayon_Linux_5.1-r1_x86_K.iso (1,936MB, MD5, torrent), Sabayon_Linux_5.1-r1_x86_G.iso (1,734MB, MD5, torrent). Sabayon_Linux_5.1-r1_amd64_K.iso (2,032MB, MD5, torrent), Sabayon_Linux_5.1-r1_amd64_G.iso (1,882MB, MD5, torrent).

Stay up to date with all the latest distro releases at http://distrowatch.com

Ready to run ChromeOS available – ChromiumOS Cherry

chromiumcherrySo, after all the hype about ChromeOS, we were all pretty narked when we found that Google had only released the source code, and we would have to manually compile the distro.

Fear not! Hexxeh to the rescue. Hexxeh decided that he would be the one to give ChromeOS to the masses via a ready made USB pendrive image that anybody can download, and boot directly into ChromeOS on any machine (which can boot from USB). There are instructions for: MacWindowsLinux

I first picked up on Hexxeh on Twitter and then followed the project to his blog which outlines plans and also offers various mirrors and a torrent to obtain the image. On his blog’s FAQ he says that he is “a student who occasionally pretends he’s a Web Developer/Programmer and works on various websites with people” and he started this project “Because I think Chromium OS is a cool idea, and I thought I’d fill a gap that hadn’t been filled”.

It’s great that somebody has taken the time to provide the masses with something which we first saw as a bit of a let-down after all the hype. Could this be the first ever ChromeOS derivative? I hope so, and this weekend I will be providing a full write up.

Go to his blogs to get the full details and also follow him on Twitter:

Hexxeh’s Blog:- http://blog.hexxeh.net/

ChromiumOS Cherry: – http://chromeos.hexxeh.net/

Hexxeh on Twitter:- http://twitter.com/hexxeh

[Howto] Faster internet with Google DNS

Yet another contribution from Google to help us get what we need over the internet…………… quickly!

Google launched it’s own DNS service, and seeing as their bots crawl practically everything on the net, you will find even new sites will be stored, listed and ready to go. Hopefully this service will be a lot faster than your usual ISP.

How to configure them:

Gui
Every distro has it’s own Network Config Manager Gui, and i’m not going to post screenshots of all of them for Kde, Gnome and Xfce4 etc. The basic theory is that you right-click your netork icon, and edit the IpV4 settings and choose DHCP (addresses only) and then add the two Google DNS server IP’s – 8.8.8.8, 8.8.4.4.

Geek style
Open /etc/resolv.conf (I use Nano text editor)

sudo nano /etc/resolv.conf

Then edit the dns servers to the Google ones.

nameserver 8.8.8.8
nameserver 8.8.4.4

Follow our guide on how to stop Network manager overwriting your settings:
http://debianandi.blogspot.com.es/2013/01/stop-resolvconf-being-overwritten-by.html

Now either restart your network connection, or reboot completely and start surfing. You should see a faster domain name resolution.

It looks like OpenDNS has a new rival on the block!

Linux Trojan Discovered in Screensaver

trojanSo, there was a trojan infected screensaver uploaded to Gnome-Look.Org (recently removed) that inserted a bash script into /usr/bin/ by using wget and then executing the script. Originally the script’s contents were a ping command but this was later changed to:  rm -f ./*.*

What does this tell us about Linux security? In fact what does this
tell us about any computer operating system’s security?

Right, it tells us that it means absolutely nothing if a stupid user
is prepared to sacrifice his/her security to get something pretty and
fluffy from an untrusted 3rd party web site.

The main security for Linux, apart from being practically crack-proof
is the fact that we get our applications and goodies from verified
secure repositories. That is now history thanks to the Windows mentality
that is infecting the minds of the usually security-conscious Linux
users.

It’s fate. It was bound to happen sooner or later thanks to Linux’
popularity over the last couple of years. Along with it came the 3rd
party apps and goodies sites which generally offer the same stuff which is
available in most distro repos.

My message? Only trust verified Linux distro repos and stay away from these
3rd party sites which are lacking the staff/time to check each upload before
making it available to the general populace.