October 2007 Archives

Wed Oct 31 11:11:08 CDT 2007

Remotely load a URL in Firefox

Today's trick is to write a script that will start a new Firefox tab with a page that you specify. Maybe you want to schedule a page to load with cron to check your todo list in the morning. Maybe you have found a page that your wife is looking for, and easier than signing into a chat service is to ssh to her computer and load the page for her. Or, maybe you want load a webpage so that you can take a screenshot of it from a remote location.

The code for this is very similar to the screenshot code. You must set some ENV variables so that X knows where to find your Firefox. Also, this version only seems to work if you already have Firefox running. I expect that removing the 'new-tab' option will fix that, but then you get a new window.

This is the code:
#Script to load a url in a new Firefox tab.  Works remotely.
if [ $# = 1 ]; then
export DISPLAY
export HOME

firefox --remote "openurl($webpage ,new-tab)"
The first few lines check to see if you have given a page to load. If not, it will default to Google.

Posted by Nesman | Permanent Link

Mon Oct 22 15:28:45 CDT 2007

Gmail has increased storage again

Just in case nearly 3GB wasn't enough for you, Google has now upped limits above 4GB for Gmail accounts. I had been watching to see the storage limit roll over the 3GB mark and it just jumped. Keep in mind that this space isn't too be used as offsite storage. I tried to move a large amount of files a while back and got the "Lockdown in sector 4" error:
Gmail error message

Posted by Nesman | Permanent Link

Sat Oct 20 21:35:33 CDT 2007

Using ImageMagick to take screenshots in Linux

There are many reasons to take a screenshot of your computer.
  • Proof of an event
  • Easy way to describe an error to a tech
  • Check on a computer remotely
  • Document a computer activity like software installation.

I used to run a cron job at work to take screenshots at random intervals so that I could get an overview of the ammount of time I spent on different tasks. It was also a handy way to log which clients' sites I had viewed.

More recently, I noticed that bashcurescancer switched from it's striking console-sytle black background to a more standard color scheme. At first glance I thought the domain had expired and this was a registrar landing page. Thinking that it might display differently on my work pc in IE than it had in Firefox at home, I decided to check it out.

Since I didn't have access to a Linux machine at the office, I had to do it remotely. I used ssh to connect to my home network and then to my laptop. I gave the command to launch a Firefox tab with the page and waited for it to load.

This is the script that I used to save screenshots:
#These next lines are helpful to prevent GTK errors 
#otherwise it doesn't seem to get the right permissions.
export DISPLAY
export HOME
import -window root -geometry 800x600 -silent /mnt/hd/samson/backup/screenshots/`date +%b%d%a%H%M`.jpg

To make it easy to see my screenshots, I saved them to an NFS share from my server, Samson. Then, I ssh'd to the server and symlinked the screenshots directory into my web directory.
ln -s /mnt/hd/spare/screenshots htdocs/screenshots

This creates a web directory named screenshots so that I can browse to my screenshot or any new images.

Next time I'll go over the code that I use to fire up Firefox remotely.

Posted by Nesman | Permanent Link

Thu Oct 18 07:59:13 CDT 2007

Bash cures cancer

Brock at bashcurescancer has a great article up about substitution in variable names.
I want to read it later.

Posted by Nesman | Permanent Link

Tue Oct 9 21:20:49 CDT 2007

I for one welcome our new Google overlords!

Yeah, the big G is taking over. You might notice a small and tasteful ad block on the page now.

Posted by Nesman | Permanent Link

Tue Oct 9 10:39:27 CDT 2007

Blue Face of Death

When the hospitial switched it's oxygen machines to Windows, it brought new meaning to BSoD.

Posted by Nesman | Permanent Link

Mon Oct 8 22:10:59 CDT 2007

that didn't work. it ignores file paths and clobbers files.

Posted by Nesman | Permanent Link

Mon Oct 8 21:58:54 CDT 2007

test post after updating a post and running ./nb -u all without seeing it publish.

Posted by Nesman | Permanent Link

Sat Oct 6 09:26:24 CDT 2007

testing scp

this post is to test to make sure scp pushes articles to the server. edit: this edit is to make sure that adding "scp `find $BLOG_DIR -mmin -20` nfs.net:/home/htdocs" as my publish script will work. I don't think it will.

Posted by Nesman | Permanent Link

Fri Oct 5 10:27:56 CDT 2007

Default Linux Screensavers

Linux Screensavers were probably my first real experience with Linux. I remember installing Red Hat at ITT. The instructors let us play around with the setting, and this is where everybody ended up. They range from very plain to very shiny.
(Most of) These come installed on most Linux systems by default. These days I tend to run with a blank screen after a few minutes, but that's another story. I would just let it hibernate, but that doesn't always work out. Some of my favorites:
  • Substrate is my favorite. It draws a shaded crystaline that ends up looking like a top view of a city.
  • FuzzyFlakes is overly cute snowflakes.
  • GFlux
  • GLMatrix
  • GLPlanet
  • glschool
  • Helix
  • Hypertorus
  • Interaggregate
  • WebCollage was requested to be left running on my computer at work for 3rd shift to stare at.

Posted by Nesman | Permanent Link

Wed Oct 3 10:25:09 CDT 2007

New month

This is a new entry for a new month.

Posted by Nesman | Permanent Link