VirtualBox – Increasing Your Screen Resolution

Since I’m currently taking Windows 7 for a test drive I had to set up a copy VirtualBox with Ubuntu 8.10 in order to make use of the terminal (I can’t stand PuTTY or any other Windows alternative).  In the past I had always used VMWare so this was my first venture into the land of VirtualBox.   Overall I found it much easier to install and make use of, but I was stumped when it came to making the window bigger than 800×600.  Within the Ubuntu session it only let me choose 640×480 or 800×600, which didn’t work for me. So I did some research and eventually came up with a solution.

Use your host key (ie: Right Ctrl) to escape out of the confines of the Ubuntu desktop, and click the Devices drop down, and then Install Guest Addons.  This will mount a virtual CD within your Ubuntu session. I actually got an error at this step but I just hit Ok and it didn’t effect me. Now you should see a CD icon on your desktop.

Open up your Terminal and type:

cd /media/cdrom0

In this folder there are some scripts for 64 bit linux and 32 bit.  For some reason the 64bit ones failed to work for me, so I had to use the 32 bit ones within 64 bit linux.  I would suggest doing the same.

sudo sh ./VBoxLinuxAdditions-x86.run

This will configure your Ubuntu session so that it can allow you to use higher resolutions. First you must reboot your Ubuntu session or restart the display manager by hitting Ctrl+Alt+Backspace.  Next go to:

System
Preferences
Screen Resolution

Set your resolution and hit apply.

Tags: , , , ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
read comments

Postgres – Column “name” Does Not Exist

I don’t use Postgres very often, as I prefer MySQL, however a project I took over was built off Postgres and I find myself running into silly little road blocks. Today I encountered one that made me want to slap the developer when I finally realized what was going on. I created a simple insert query and tried to run it, and was presented with this error:

ERROR: column "-12.0" does not exist

The query I was trying to run was this:

INSERT INTO timezones (gmt_offset, "description")
VALUES
("-12.0","(GMT -12:00) Eniwetok, Kwajalein"),
("-11.0","(GMT -11:00) Midway Island, Samoa"),
("-10.0","(GMT -10:00) Hawaii"),
("-9.0","(GMT -9:00) Alaska"),
("-8.0","(GMT -8:00) Pacific Time (US & Canada)"),
("-7.0","(GMT -7:00) Mountain Time (US & Canada)"),
("-6.0","(GMT -6:00) Central Time (US & Canada), Mexico City"),
("-5.0","(GMT -5:00) Eastern Time (US & Canada), Bogota, Lima"),
("-4.0","(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz"),
("-3.5","(GMT -3:30) Newfoundland"),
("-3.0","(GMT -3:00) Brazil, Buenos Aires, Georgetown"),
("-2.0","(GMT -2:00) Mid-Atlantic"),
("-1.0","(GMT -1:00 hour) Azores, Cape Verde Islands"),
("0.0","(GMT) Western Europe Time, London, Lisbon, Casablanca"),
("1.0","(GMT +1:00 hour) Brussels, Copenhagen, Madrid, Paris"),
("2.0","(GMT +2:00) Kaliningrad, South Africa"),
("3.0","(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg"),
("3.5","(GMT +3:30) Tehran"),
("4.0","(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi"),
("4.5","(GMT +4:30) Kabul"),
("5.0","(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent"),
("5.5","(GMT +5:30) Bombay, Calcutta, Madras, New Delhi"),
("5.75","(GMT +5:45) Kathmandu"),
("6.0","(GMT +6:00) Almaty, Dhaka, Colombo"),
("7.0","(GMT +7:00) Bangkok, Hanoi, Jakarta"),
("8.0","(GMT +8:00) Beijing, Perth, Singapore, Hong Kong"),
("9.0","(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk"),
("9.5","(GMT +9:30) Adelaide, Darwin"),
("10.0","(GMT +10:00) Eastern Australia, Guam, Vladivostok"),
("11.0","(GMT +11:00) Magadan, Solomon Islands, New Caledonia"),
("12.0","(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka");

I found this to be very odd, as I’ve written queries just like that countless times.  So I tried tweaking the column types, I tried both text and numeric but just wasn’t getting anywhere.  Eventually, just on a whim, I replaced the double quotes with single quotes and it took the query.  For some reason Postgres interprets the query in a completely different way if you use double quotes.  How odd :S

Tags: , , ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
read comments

Linux Disk Usage

Every now and then one of my servers will stop working because the hard drive or one of its partitions has filled up.  In almost every case it has simply been choking on a log file that grew to massive proportions, but not always.

There are a lot of linux commands that will help you track down what’s using up all your memory.  However I found that they often left me just as puzzled afterwards.  Here’s a handy one that will show you the space being used by every folder or file in the current directory and most importantly they will be sorted by size.

du -sk * | sort -n

Tags: , ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS
read comments
 Page 26 of 30  « First  ... « 24  25  26  27  28 » ...  Last »