Wednesday, February 28, 2007

Rhythmbox, the better music manager

I just made the switch from my original music player, VLC, to Rhythmbox. Now, I'm not knocking VLC. VLC is still totally awesome. It can play nearly everything, and is very powerful. Only, it isn't a very good regular media player. It's very minimal. It doesn't remember what music you have, and it doesn't read music tags. I found that Rhythmbox suits these needs much better. Rhythmbox is based on the ever-popular itunes music player. Only, Apple is being a punk and doesn't have a linux version of itunes. I think this is kinda a small problem for music-minded people in switching to linux. But Ubuntu did something very awesome, or GNOME, I'm not sure which. But Rhythmbox is now shipped by default in Ubuntu 6.10. So yeah, basically, Rhythmbox had all the functionality I wanted from VLC, the ability to add directories and repeat/shuffle, with a better user interface. So, I'm happy now and recommend Rhythmbox to people who are still looking for a good music player.

I don't know much about amaroK, since I don't use KDE, but what I hear is that it's also really really good.

Tuesday, February 20, 2007

CM time

Ok, I'm probably not going to get much blogging done. As you can tell, not much has been happening to me, it's because I'm trying to spend as much time as I can practicing for the Certificate of Merit (CM). For those of you who don't know, it's an annual test for testing how proficient someone is in music. I've gotten really behind, so I'm gonna have to spend more time practicing. It's during the weekend. After this, a huge load will be lifted off me (I'll either pass or be kicked out; either way, I'll be sure). I'll be sure to notify you of the results.

Monday, February 19, 2007

Piiiiiiiii!!!

This video was discovered by a complex interplay between Larry and me:




If there was really a cult where you can join to wear red robes, learn magic, and sing about pi, I'd join.

Friday, February 16, 2007

Linux-mania

Today, two of my friends asked me to install Ubuntu linux for them. Of course, I accepted. You know? I never thought I would be able to gain so many converts just by being me. I'm rather amazed at myself.

(Note: due to the extreme boredom in my life at the moment. This is all I could think of.)

Tuesday, February 13, 2007

Solaris reborn

Ok, with the death of Debian, I have felt a new life. I'm going back to diagnose the wifi problem in my personal Solaris operating system. It's been a long time since I've logged on. I'm also looking for help on openSolaris. If you have suggestions, speak up!

Sunday, February 11, 2007

Fill-in post

I've been thinking about that Bunny post going around the internet for a couple of years. So, I've put up a resistance. I've seen a couple of these, but I can't find them anymore. So, I've started up another one:

(\__/) This is bunny
(><) Bunny wants to dominate the world
(x.x) Join the resistance to stop bunny and save it.

Hopefully, this will catch on. If anyone knows any of the original ones, please share.

Friday, February 09, 2007

Debian died

Ok, I'm not sure how possible this is, but I witness one of the weirdest things ever. I witnessed the Debian system I installed at school commit suicide. Yes, suicide. All I wanted to do was install java on there. Apparently, I messed around with the sources.list file a bit too much. The OS started taking itself apart by removing a whole bunch of stuff and (hopefully) reinstalling it. I have never witnessed a computer act so strangely, if it's not recoverable, I might install PCBSD on it because I'm like that.

Thursday, February 08, 2007

I'm on Google!

As Larry pointed out to me in a comment, I'M NOW ON GOOGLE!!! I feel so special now that I'm on the #1 search engine........anywhere. Now I'm one step closer to taking over the world becoming more popular. I'm happy.

Tuesday, February 06, 2007

How to customize xplanet-gnome

Ok, now you have xplanet-gnome set up. Here's how you can customize it by editing the script. We'll go through the script line by line and examine what all of the parts do. So, let's get to it.

[1-3]
#!/bin/bash
#xplanet-gnome.sh shell script v0.2
#shows Earth on your Gnome desktop with current lighting conditions,i.e. day and night

These are comments about the program. It basically says you need bash shell and tells you what version and what this script does. These don't have any significance to the actual program, so we'll skip this.

[5]
DELAY=30m

This is the update interval for the script. Every 30 minutes, your desktop will be updated to the current view of the Earth. To me, this is a long time, so I decreased it to 1 minute. Just change the 30 to a 1. If you want your delay on the order of seconds or hours, just change the m to a "s" or a "h", respectively, no quotes.

[7-10]
PREFIX=/home/gregory/xplanet-images
OUTPUT=xplanet.png
APPEND=2

These I covered in the previous guide, so I don't think I need to go over it again.

[11-16]
GEOMETRY=1024x768
LONGITUDE=-118
LATITUDE=34
#default is no projection,i.e. render a globe
#rectangular is the flat world map. also try ancient, azimuthal, mercator,..
PROJECTION=rectangular

The geometry should be your screen resolution. It is basically how big your image will be. The next two lines should be the longitude and latitude of your location. Currently, it's centered at good ol' Los Angeles, California. As the next two lines explain, the last line is the projection. There are several different options for this. I've only tried the ones on the script, but all of the options are ancient, azimuthal, bonne, gnomonic, hemisphere, lambert, mercator, mollweide, orthographic, peters, polyconic, rectangular, and tsc. Have fun with all of these.

[20-25]
if [ -e "$PREFIX$OUTPUT" ]; then
rm "$PREFIX$OUTPUT"
OUTPUT="$APPEND$OUTPUT"
else
rm "$PREFIX$APPEND$OUTPUT"
fi



I'm not too sure about these. I think they basically say, if the spare file exists, then remove it and put the recommended file on it. If anyone else has an idea what this means, please speak up.

[27-31]
if [ -z $PROJECTION ]; then
xplanet -num_times 1 -output "$PREFIX$OUTPUT" -geometry $GEOMETRY -longitude $LONGITUDE -latitude $LATITUDE
else
xplanet -num_times 1 -output "$PREFIX$OUTPUT" -geometry $GEOMETRY -longitude $LONGITUDE -latitude $LATITUDE -projection $PROJECTION
fi

These are the lines that actually do something. The first line checks to see if you specified a projection. If you didn't, it calls xplanet without the projection parameter. Now, we're going to study the line after the else statement. The "xplanet" means it's going to run xplanet. The "-num_times" tells xplanet to only run once, and not continue on running. The "-output" tells xplanet to display to a file instead of opening a window; this file is the one you will make as your desktop. The "-geometry" gives the size of the file. Which, in this case, is your resolution which you specified above. The "-longitude" and "-latitude" are pretty self-explanatory; they tell xplanet where to center the image. Lastly is the "-projection" parameter, which tells xplanet what projection to use. These lines are the most important lines in the script.

[33-36]
#update Gnome backgound
gconftool -t str -s /apps/nautilus/preferences/background_filename "$PREFIX$OUTPUT"
sleep $DELAY
exec $0

The line starting with gconftool basically stores the image in memory so that GNOME knows about it (I think). The sleep line tells the script how long to wait. And the exec line tells it to start up again.

Sunday, February 04, 2007

Code to Xplanet-Gnome

This code is not mine, it originally comes from this web site. Unfortunately, the web site is down. This post is only for archival purposes. Thank you, and thank open source.

#!/bin/bash
#xplanet-gnome.sh shell script v0.2
#shows Earth on your Gnome desktop with current lighting conditions,i.e. day and night

DELAY=30m

PREFIX=/multimedia/wallpapers/
OUTPUT=xplanet.png
APPEND=2

GEOMETRY=1024x768
LONGITUDE=15
LATITUDE=30
#default is no projection,i.e. render a globe
#rectangular is the flat world map. also try ancient, azimuthal, mercator,..
#PROJECTION=rectangular

#rename background image so Gnome realises image has changed - thx to dmbasso

if [ -e "$PREFIX$OUTPUT" ]; then
rm "$PREFIX$OUTPUT"
OUTPUT="$APPEND$OUTPUT"
else
rm "$PREFIX$APPEND$OUTPUT"
fi

if [ -z $PROJECTION ]; then
xplanet -num_times 1 -output "$PREFIX$OUTPUT" -geometry $GEOMETRY -longitude $LONGITUDE -latitude $LATITUDE
else
xplanet -num_times 1 -output "$PREFIX$OUTPUT" -geometry $GEOMETRY -longitude $LONGITUDE -latitude $LATITUDE -projection $PROJECTION
fi

#update Gnome backgound
gconftool -t str -s /desktop/gnome/background/picture_filename "$PREFIX$OUTPUT"

sleep $DELAY
exec $0

Thursday, February 01, 2007

Real-time Earth Desktop with xplanet-gnome

Ok, I found a really cool GNOME tweak that enables you to have a real-time background of Earth. You could see where it's night and where it is day. I think it's really cool. Well, it uses a very simple script available here. Now, the original web site has installation instructions, but it took me a couple of days to finally figure out how to do it.

Install Gnome2: It comes with all supported version of Ubuntu. I think it comes with the latest version of Debian, not too sure about previous versions.

Install xplanet: In Ubuntu and Debian, you need to install both xplanet, and the xplanet-images

apt-get install xplanet xplanet-images

Now, download the script. Put it somewhere easy, I put it in my /home directory. Now, make the script executable. This can be done by

chmod a+x xplanet-gnome.sh

Now you have the script. The xplanet images are usually put in /usr/share/xplanet/images. In order to keep from having to run the script as root (never run a script you don't know as root), I made a copy of the xplanet images folder in my home folder (I'm not sure if this is necessary, but if someone manages to do this, please comment).

cp /usr/share/xplanet/images ~

Now, you have to change the script. Look for this line in the script (line 7 for me) and change it (in bold).

PREFIX=/home/yourfolder/images/

Make sure you use the path to the images folder, don't copy and paste this.

Ok, the script is now ready to go. Now, look at the OUTPUT variable (for me, this says xplanet.png), this is the file that your Desktop will be based on. First, run the script by typing

./xplanet-gnome.sh

Now, you want to set your Desktop to get this file. Just right-click on your desktop and click "Change Desktop Background". Press "Add Wallpaper" and look for the file that was made (it should be at /home/yourfolder/images/xplanet.png). Voila, there's your Desktop. Now, if you want, just set it to run whenever you start. It is explained in detail on the original web site, but a quick way on Ubuntu is to go System>Preferences>Session->"Startup Programs" tab>add. Just enter "/home/yourfolder/xplanet-gnome.sh". Now, next post, I'll give some ways to customize your script.