Tuesday, August 31, 2010

Rotating BG Using Perl

So you would think it is cool to have your Background swap out every time
you boot up or log in your machine...It can be annoying to some, especially if you
think that a wallpaper takes up to much RAM and is a waste of time (coughs)
But if you are a person that likes wallpapers so much you wouldn't mind them
changing every time you log in, then you are whom this was written for...

I wrote the following for Gnome users only...you can alter the way
you set this up real easy for Openbox/KDE

First things first
1. Obtain some wallpapers that fit your resolution of your screen exactly.
The amount of wallpapers is up to you. Make sure they are all of the .jpg extension. Place these pictures in a folder you create named 'rotate' under /home/user/Pictures/rotate...make sure you change to your 'user'...Then rename images to 1.jpg 2.jpg 3.jpg etc.

Example:

Next:
1. Disable Show Desktop in Nautilus
How to:
Alt + F2
type: gconf-editor and click Run
Navigate to Apps -> nautilus -> preferences 
Scroll down and uncheck 'show desktop'
Warning: This will not allow you to right click anymore on your desktop...Which I don't care so much about anyways.
So if this is a major issue to you then proceed no further.



2. Open a Terminal and type:
mkdir ~/scripts && cd ~/scripts
nano change_bg.pl

3. Copy and Paste this code in the terminal screen:
 
#!/usr/bin/perl

use strict;
use warnings;

# How many pictures you have in your rotate folder
my $num_of_pics = 10; 

# Get a random number from your total of pictures
my $pic = int(rand($num_of_pics)+1); 
chomp($pic);

# Change your background using feh to a random pic from rotate folder
print `feh --bg-center ~/Pictures/rotate/$pic.jpg`; 
      # or --bg-tile, --bg-scale, --bg-seamless
 
 
4. Change $num_of_pics to number of pictures you have in the rotate folder
     Press Ctrl + X, Y to save, and Enter

5.  Make your script executable by typing this:
chmod a+x change_bg.pl

6. Install feh with this:
sudo apt-get -y install feh

7.  Create bash script to start your script at startup by typing this:
nano startchangebg.sh

8. Copy and Paste this in startchangebg.sh, change user for your user:


#!/bin/bash
cd /home/user/scripts
./change_bg.pl
exit



9. Make startchangebg.sh executable with:
chmod a+x startchangebg.sh

10.  Test your script by typing:
./startchangebg.sh

If your wallpaper changed, then it is working, if you are still seeing
the same wallpaper as before then you may have not disabled show desktop or you may have missed a step above.

If your wallpaper changed proceed otherwise go back through and check your steps.

11. Add Bash Script to Gnome Startup Applications:
 
Add new application and Browse to your /home/user/scripts/startchangebg.sh script
 
Finally Click Save and Close....Then Log off and back on and see if it works!
Sometimes it may choose the same background...so don't freak...the more pictures 
you have the better variety. I will say that there are ways to make a Perl script
start at boot without doing it this way...that is your choice:) I just know that
this way works too...Good luck and have fun :)
feel free to offer suggestions or ask me questions 
at naildownx at gshellz dot org

n@!LdownX Radio!

Listen to n@!LdownX Radio!
Follow our playlist at:
http://twitter.com/naildownxradio
Your source for modern rock/alternative music!

Macbook Pro Dualboot OS X and Debian Squeeze

In a perfect world...haha just starting it off like that makes me lol...
Probably you too huh :)
But in a perfect world it is great to have a native install of OS X
for my movie making moments and native linux for well, everything else
I enjoy ;) doing...Virtual machine may be your thing...not me, I like the full effect
you can get by sitting at a machine running at it's best. Here are some pics and screenshots I took of my Macbook Pro running:
OS X Snow Leopard 10.6
and
Debian Linux "Squeeze"
Both I love and use heavily...everyday :D
rEFIt Debian
rEFIt Mac
Debian Grub Loader
Debian Log In
Mac Log In





Debian Screenshot
Mac Screenshot


Thank you Blogger

I have come to realize that alot goes into making a webserver...

That actually was the easy part...but keeping it up and running
in the www and also bandwidth issues...
There is a reason why blogger works :D
Google has made it possible for all to blog without any of the hassle
and I am glad of that :)
Very much so :D

So I have decided to come back to my Blogger account...
It is way to easy not to!

Sunday, August 22, 2010

World Wide Web

n@!LDownX has visitors from all over the world :)
Makes the owner very happy :)
Click map to Enlarge...

Someone I Know :)




















This reminds me of someone I know :)
Really, I won't call real names though...geez I'm just saying ;)

Isadora
















My screenshot running Linux Mint 9 Isadora on my Macbook Pro 15" 5,4
Icons = Aw0Ken
Wallpaper I Customized Download Here

Facebook Privacy: Places







Many of you may have already seen this, but for those of you that missed it, here is one more chance for you to disable this setting in Facebook that shows people your places you have been.

I will show you the simple steps to stop this:
1. Goto Account -> Privacy Settings
















2. Click on Custom, then Customize Settings

3. Finally beside 'Places I check into', click the box, choose custom, then choose Only Me.





























After you have done this, then you have successfully prevented people from seeing your places you may have voluntarily or involuntarily checked into.

Thursday, August 19, 2010

GLOBAL SHELLZ

Global Shellz
I am a member there and love it!
Great people, great benefits! Check em out!

After activation benefits include:
100MB Storage Space
Web Hosting (pubic_html with ~username access)
GCC Access (on request)
2 BG Processes
BNC/ZNC
Email Address (you@globalshellz.org/gshellz.org)
Icecast Access
1 MySQL database with 2 user accounts.

FOR FREE!
Come visit the group at irc.freenode.net #global-shellz



WELCOME!

Welcome to my tech blog...
Primary interests are:
* Linux
* Apple
* Microsoft
* Development/Scripting/Testing
* Jokes
* Fun Videos
* IRC
* Free Shellz
* Crop Circles :)
So follow me and pick up on a few things about the world of computers.

Twitter: http://twitter.com/naildownx
Blogger: http://naildownx.blogspot.com
MSN: naildownx
Email: naildownx at gshellz dot org