Thursday, 20th November 2008.

Posted on Sunday, 5th August 2007 by Lee

I have a custom little utility that I wrote that uses ImageMagick and Zenity to take a screen shot. I have the script hooked up to Z keyboard command. This is the bash script.

#!/bin/bash

fn=$(zenity --entry --title='File Name' --text='File Name Prefix');
dt=`date '+%Y%m%d'`;
screenshot="/home/USERNAME/Desktop/$fn-$dt.png";
import -frame +repage $screenshot;

Be sure to change USERNAME to your actual username so the path to your desktop will be correct. Also, for the sake of your sanity, please note the +repage switch that we pass to ImageMagick’s import command. Without that, Gimp will be very unhappy with the offset of the PNG. The layer will appear outside of the image and you won’t be able to see your screen shot in Gimp. If you happen to have that problem already, you can zoom out in Gimp, then use the move tool to drag your image back into view.

The screen shot utility, when invoked, will first prompt you for a little file name prefix using zenity. That prefix will have a date appended to the end of the saved file name. So, for example, if you ran this script today and typed in “receipt” as the file name prefix, the final saved image will be named “receipt-20070804.png” since today is August 4th, 2007. After typing in your file name prefix, you will see a + style cursor. Either click on a window or click and drag a selection on your screen to take the screen shot. The sreen shot will be saved to your desktop.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists

Posted in Uncategorized | Comments (3)

Posted on Wednesday, 1st August 2007 by Lee

My scanner (Canoscan N676U) suddenly stopped responding when I upgraded to Ubuntu Feisty. I first noticed the problem when I was unable to import a scan through Gimp. Well it took a couple hours to figure this one out, but the sollution turned out to be easy to implement. From what I understand, the problem comes from the USB suspend functions built into the new kernel. I also understand that this isn’t just an Ubuntu problem. So if you are on another distro, this tip may work for you also.

Read the rest of this entry…

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists

Posted in Everyday Tips, Ubuntu | Comments (0)

Posted on Friday, 20th July 2007 by Lee

I’ve been asked several times how I have my Ruby on Rails development environment set up. The most frequently misunderstood aspect of a Rails development environment is that you do not have to have your Subversion repository physically located on the same server as your deployed application. The only requirement is that all the pieces of your development environment puzzle need to be able to access one another over the internet. So, here’s how I have myself setup. It works on both linux (Ubuntu) and Windows XP.

Read the rest of this entry…

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists

Posted in Ruby on Rails, Web Development | Comments (1)

Posted on Wednesday, 13th June 2007 by Lee

If you are using ISPConfig to manage the virtual hosts on your web server, you will notice that there is no way to separate SSL vs non-SSL Apache directives using the standard web interface. This is a problem if you are writing Ruby on Rails applications and proxying requests through Apache to a Mongrel cluster because Mongrel won’t know what type of requests it is receiving. Being behind the proxy, Mongrel doesn’t know if the original requests are coming via HTTP or HTTPS. The solution is to add RequestHeader set X_FORWARDED_PROTO ‘https’ as a line in your Apache virtual host configuration for the SSL virtual host. I will tell you how to get ISPConfig to handle that for you. I will also show how to get GoDaddy.com ssl certificates working and how our Apache 2.0 randomized proxy balancer works.

Read the rest of this entry…

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists

Posted in Ruby on Rails, Sys Admin, Ubuntu | Comments (0)

Posted on Monday, 11th June 2007 by Lee

I manage serveral servers and - for the most part - they are all set up using the Perfect Setup for Ubuntu. Overall the setup is great, but I have been noticing a very annoying delay when trying to log in via FTP. Everything works, but when I initially connect, 5 - 10 seconds pass by before I’m prompted for my login credentials. After many hours of pain and sadness, I finally discovered the solution.

Read the rest of this entry…

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists

Posted in Sys Admin, Ubuntu | Comments (0)

Posted on Friday, 1st June 2007 by Lee

As we all know, Firefox will save the values you type in a form. Then, Firefox will provide a drop down list of previously entered values for form fields that you have completed and submitted in the past. Today, I mistyped my username in a form causing Firefox to store an incorrect value in my form history. So every time I go to enter my username, the wrong username shows up in my drop down list. After much searching, I have finally discovered how to delete individual values from the saved form history in firefox. No extension or anything is required.

Read the rest of this entry…

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists

Posted in Everyday Tips, Web Development | Comments (5)

Posted on Friday, 18th May 2007 by Lee

If you are experiencing a long, annoying delay when attempting to connect to a remote server via SSH – especially if you have recently noticed this problem after installing/upgrading Ubuntu Feisty – try commenting out the “GSSAPIAuthentication yes” line in your /etc/ssh/ssh_config file:

Read the rest of this entry…

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists

Posted in Sys Admin, Ubuntu | Comments (0)

Posted on Tuesday, 8th May 2007 by Lee

If you have a VPS or your own dedicated server and you can’t send mail to Hotmail or MSN email accounts, the good news is that the solution is easy. I manage a few Postfix mail servers and I was getting lines like this in my /var/log/mail.log file.

Read the rest of this entry…

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists

Posted in Sys Admin, Ubuntu | Comments (1)

About