Battery broken annoying warning…

Hi all.

I had to move from PackardBell EasyNote W3301 laptop to my Acer Travelmate 2420 due to the hardware failure. I moved hard drive from one lappy to another. This was a little hacky but worked.

First thing I have noticed was a Battery broken annoyance each time my machine would boot to KDE4… Yes, thank You, I know the battery sucks and that I cannot afford a new one. Now please bugger off and stop rubbing the fact in… 😉

I got rid of it. Here is how.

Open konsole and type in:

systemsettings

Broken battery warning step 1

followed by the Enter punch.

KDE4 Control Center will pop up. Now go to Hardware > Power Management > Global Settings.

Broken battery warning step 2

Now click on the Configure Notifications button. New window will pop up. Look for a Broken battery notification entry and click on it.

Broken battery warning step 3

Now uncheck the Play a sound and Show a message in a popup boxes. OK the window and close KCC and Konsole.

Broken battery warning step 4

On next reboot / log in it won’t bother You anymore.

Hope this helps.

Regards.

Andy

Fantastic brushed metal themes for PCLinuxOS apps by Linuzoid…

Hi all.

PCLinuxOS 2011 was released recently. It came out beautifully themed. It looks like it’s made out of a brushed metal. Fantastic job – I love it. One of our forum members – Linuzoid decided that PCLinuxOS would look even better with a beautiful apps themed to match the OS.

First He came up with “Set of Brushed Metal Splash Screens”, soon after that “Brush Metal LibreOffice Splash Screen” thread appeared on the forum. Today I was pleasantly surprised again when I saw “Brushed metal theme for K3b” topic with a dedication… for me…

Of course I have all of those beauties installed. They are blending in perfectly with the Brushed Metal theme. Thanks to Linuzoid PCLinuxOS 2011 looks even more “unified”. I bet that soon LibreOffice splash and K3b theme will be added as a defaults for the packages available from the PCLinuxOS repositories.

DigiKam Brushed Metal Splash

LibreOffice Brushed Metal Splash

K3B Brushed Metal Splash

Thank You Linuzoid!

Andy

Pidgin as IRC, Google Talk, Yahoo client + Freenode IRC login registration + CheckGmail… Oldie but goodie…

Hi all.

This was one of my earliest HOWTO’s… I had a good laugh when I saw the screenshots after almost 3 years.

In the IRC HOWTO You will find the freenode.net login registration part and the link to Google Talk setup. In the Google Talk HOWTO. You will find links to the CheckGmail HOWTO and a link to the Pidgin + Yahoo setup part…

Some of the info is still valid ;). One day I will redo them and post here on WoTW ;).

Have fun.

Andy

Irssi config by AndrzejL. Autologin to Freenode. SSL. Autojoin PCLinuxOS channels.

Hi all.

Irssi is not very difficult to be configured but it takes time.

Here is a pre-configured config file. Place it in Your ~/.irssi/ folder replacing the current file. Edit few lines. Start irssi. Enjoy.

If You don’t know how to save and replace the config file run this command in the terminal:

cd ~/.irssi/ && mv ./config ./config.backup && wget -c http://andrzejl.cyryl.net/WoTW/WoTW_files/Irssi%20Config/config && kwrite ~/.irssi/config

Now when kwrite opens go to View in the menu bar and click on Show line numbers. Now edit the lines and close kwrite window. Choose yes when asked do You want to save the file.

The lines that need to be edited:

6 – change this line to Your Freenode password
80-82 – edit / delete entries if You don’t want to autojoin or want to autojoin different channels.
251-253 – have to be edited as well. Real name. Username. Nick.

All the rest can be edited as well if You know what You are doing but those indicated lines have to be changed.

If You are interested in configuring Irssi You may want to read this topics as well:

Adding and running Irssi perl scripts. [Nicklist.pl]
Adding and running Irssi perl scripts. [ShortenURL.pl]

Andy

Where the heck is this file from…

Hi all.

Sometimes I find myself looking for a source of a certain file in my installation… Let’s say I have a file /usr/bin/firefox… What package did it came from? This command sorts me out:

rpm -qf /path/to/the/file

Example:

[andrzejl@wishmasbell ~]$ rpm -qf /usr/bin/firefox
firefox-5.0-5pclos2011
[andrzejl@wishmasbell ~]$

I hope someone will find it usefull.

Regards.

Andy

Synchronizing files between the machines via SSH using rsync…

Hi all.

I own few machines. One of them is my main – everyday machine, others are my backup machines that I use when the main machine is doing something heavy or when I cannot access it for another reason. Sometimes it’s annoying. Really annoying. Why? Oh for example the pidgin config files are not synchronized between the machines. I added some contacts to the main machine pidgin configuration and I never had a chance to set them up on the rest of my machines. I had a chat or two with a friend and the logs are not available on my other machines so I cannot check the history of the chat. I changed the configuration of the Firefox on my main machine and the other machines are still not updated… Same goes to Thunderbird / e-mail settings and synchronization… Even my folders with data… It was seriously bothering me so… I have found a perfect solution.

Assuming that You have read my previous posts about SSH:

Passwordless SSH authentication. Using authentication keys

Tightening security for SSH Server…

Using Midnight Commander and SSH to transfer files securely between hosts.

Copying files securely between local machine and shell account

You may want to have a look at this one as well… Synchronizing files between the machines via SSH using rsync…

It’s extremely simple. Assuming that You have passwordless authentication working all You need is one command. Command should be ran on the ssh client machine. In other words You should run it on the machine You want to synchronize files to. It will connect to the remote SSH server machine and download the files from it.

rsync -avz -e ssh andrzejl@192.168.0.100:/home/andrzejl/.purple /home/andrzejl/

This command will connect with login andrzejl to the SSH server running on the 192.168.0.100 machine and it will incrementally synchronize the /home/andrzejl/.purple folder to the /home/andrzejl/ folder on a local machine. I didn’t add the .purple folder at the end of the command as the synchronization process will create it if it’s not there. If I would add it – it would create /home/andrzejl/.purple/.purple folder.

Now imagine possibilities… Put that command in a script and then create automatized job in crontab so it will be executed every let’s say 1 hour (I did it here – works perfect!)… Your client (backup / spare) machine config files will always be synchronized with Your main – server machine. Your data folders can be synchronized between all Your machines… Perfect… That’s what I wanted…

Hope it helps somebody someday.

Andy

Edit 01: OH BOY! Is this faster then copying the files with midnight commander… When syncing my pidgin folder to a fresh install and using mc it could take up to 3 hours due to a fact that the logs folder has almost 60 megs and it contains over 41 000 small files… Rsync does it in less then 20 minutes… and later it just copies the “new” files thanks to the “increment” option so it takes several seconds… Rsync rocks…

If that’s not cool… I don’t know what is…

Regards.

Andy

Edit 02: If You have followed my Tightening security for SSH Server… topic and You have changed the SSH port You will have to slightly modify the command to add the port number.

Here is how it looks like:

rsync -avz -e 'ssh -p 20202' andrzejl@192.168.0.100:/home/andrzejl/.purple /home/andrzejl/

Regards.

Andy

Fixing crontab -e "/bin/sh: /usr/bin/vi: No such file or directory error."

Hi all.

I was trying to run crontab -e on one of my machines to add few cron jobs and I have found myself looking at this error:

/bin/sh: /usr/bin/vi: No such file or directory

Wth? I have vi installed I thought… and I have started investigation. Crontab is looking for the vi file in a wrong place. To fix it run this commands:

su

give it a root password.

ln -s /bin/vi /usr/bin/vi

exit

crontab -e

Crontab errors and fix snapshot

You will be able to add entries ;).

Hope this helps somebody someday.

Andy

Running Wireshark as a Non-root user…

Hi all.

Wireshark… network packet sniffer. When opening it as user I had no capturing interfaces to use as a source for sniffing. I don’t feel comfortable running Wireshark as root. Nothing should be run with root privileges unless there is absolutely no other option. So I have decided to mess around with Wireshark and to enable the packet capturing for a non-root user. After a bit of search online I was able to do so.

Here is how.

I assume that You have PCLinuxOS installed / fully upgraded and that You have installed Wireshark.

Run those commands to allow non-root user the Wireshark access:

su

give it a root password

apt-get --yes install libpcap libcap-utils

give it some time to finish.

groupadd wireshark

usermod -a -G wireshark andrzejl

You need to change andrzejl to Your login.

chgrp wireshark /usr/bin/dumpcap

chmod 750 /usr/bin/dumpcap

chmod o+x /usr/bin/dumpcap

setcap cap_net_raw,cap_net_admin=eip /usr/sbin/dumpcap

getcap /usr/bin/dumpcap

after that You can run:

exit

wireshark

This will start Wireshark from Your user account. You should now have access to the capturing interfaces.

Wireshark as a non-root user.

Hope this helps somebody someday.

Andy