Sunday, November 16, 2008

Online Version of Perl Invisible FInder

Here is the online version invisible finder for gmail.
Felt a lot of people needs this.
Hope it is helpful
And please dont believe it's something foolish to get password. I need to login to get the invisible user List.
And login 2 times atleast and see only the common users in both time. This is because it sometimes gives some false results ie only less than 10%
Happy Picking Hiding People.
Now you can Run but cant hide :P
There is a Problem with the server I had been using the script does'nt work now as the server blocks opening of the 5222 port, which is needed for the script's working.I am trying to find an alternative server.In the mean time you can try running the script on your computer.The script I have used is Find Invisible Users In Gmail

Automatic Desktop Wallpaper Changer

I have a lot of wallpaper that I wanted to switch automatically. After a lot of search i found that there a command way to control all the gnome settings. So I the command I used is "gconftool-2".
So code is like:
#!/bin/bash
folder="/home/rsrijith/Pics" #folder where the pics lie in
find $folder -iregex ".*.jp.?g" >$folder/temp_back #list all images in the folder
no=$(cat $folder/temp_back|wc -l)
rand=$(echo `expr $RANDOM % $no`)
while ( grep -q $rand $folder/.last50 )
do
rand=$(echo `expr $RANDOM % $no`)
done
echo $rand >> $folder/.last50
tail -50 $folder/.last50 >$folder/temp
cat $folder/temp >$folder/.last50
rm $folder/temp
file=$(sed -n $rand'p' $folder/temp_back)
ON_USER=rsrijith #your username here

export DBUS_SESSION=$(grep -v "^#" /home/$ON_USER/.dbus/session-bus/`cat /var/lib/dbus/machine-id`-0)

sudo -u $ON_USER $DBUS_SESSION /usr/bin/gconftool-2 -t string -s /desktop/gnome/background/picture_filename "$file" && echo "Worked On:"$(date) >>/home/$ON_USER/logs/desktopbackground
echo "Set Wallpaper as:"$file >>/home/$ON_USER/logs/desktopbackground
rm $folder/temp_back

I have used the DBUS_SESSION variable to make it compatible with Ubuntu 8.10. The Dbus session is a bit bit different from earlier versions. The change is that it does'nt accept the change until the gnome is restarted. It's due to the new session that is made each time you update that value.

So the folder variable should the folder where the wallpapers should lie. You can put pictures in folders inside that folder. All of it will be taken. But I have specified to take only jpg and jpeg only.Now a random image is picked from that using the environment variable $RANDOM. Next we update the gnome settings using gconftool-2 if that image was'nt used in the last 50 changes.

Thus this file picks an image and puts it as wallpaper. So the next part is making this change automatically. For this we use cron (linux scheduler).
Use the command below to enter the crontab
sudo crontab -e
Enter the crontab entry as
*/15 * * * * /home/rsrijith/shell/deskback 2>>/home/rsrijith/logs/deskbackground
Check the entry using
sudo crontab -l
That's all!!!
Anyone tried? Worked? Comment me !!!