Tuesday, January 27, 2009

Extended desktop under OS X

Of course I now find out I need a mini DVI to DVI/VGA connector to use the new monitor with my Macbook. Sigh...

Saturday, January 24, 2009

Extended desktop under Linux

I've been working exclusively on laptops for about 6 months, now. I am really missing the screen real estate. Virtual desktops are just not he same. So, I just got a new monitor, Acer X223w, 22 inches, 1680x1050, $149 from TigerDirect (refurbished). It's sweet, very crisp, seems larger than 22".

So, naturally, I want it to work with all my laptops, IBM Thinkpad R50e running Kubuntu, Lenovo Thinkpad Z60m running Window XP Pro, and a Macbook running Leopard. I know XP will do extended desktop, but I hadn't been able to get extended desktop, under Linux, working ever on any Intel 855GM card. So here was the chance.

The xrandr command comes with the package x11-xserver-utils and is the Resize, Rotate and Reflection extension for the X-server. "xrandr -q" will display the screens that X knows about.

scott@kubu:~$ xrandr -q
Screen 0: minimum 320 x 200, current 2704 x 1050, maximum 2704 x 1818
VGA connected 1680x1050+1024+0 (normal left inverted right x axis y axis) 474mm x 296mm
1680x1050 60.0*+
1600x1200 59.9
1400x1050 60.0
1280x1024 75.0
1440x900 75.0 59.9
1280x960 59.9
1360x765 59.8
1152x864 75.0 74.8
1024x768 75.1 70.1 60.0
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 75.0 72.8 66.7 60.0
720x400 70.1
LVDS connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x768 59.3*+ 85.0 75.0 70.1 60.0
832x624 74.6
800x600 85.1 72.2 75.0 60.3 56.2
640x480 85.0 72.8 75.0 59.9
720x400 85.0
640x400 85.1
640x350 85.1

VGA is clearly the Acer screen, LVDS the Thinkpad screen. After lots of googling, I found a stanza I needed to add to the /etc/X11/xorg.conf file in the Screen section...

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
SubSection "Display"
Depth 24
Virtual 2704 1818
Modes "1680x1050@60" "1024x768@60"
EndSubSection
EndSection


I added the "SubSection" part. The Virtual line is the sum of the height and width of each of the two screens. The Modes line is just the modes from the two screens.

I restarted the X-server and the laptop came up normally. Now to resize the X-server with the following...

xrandr --output VGA --mode 1680x1050
xrandr --output LVDS --mode 1024x768
xrandr --output VGA --right-of LVDS

After the last command, the screen flickered and I had an extended desktop! It's kind of odd, the laptop is on the left, the Acer screen on the right. The laptop had my desktop icons in the upper left corner, but the KDE kicker is on the bottom of the Acer screen. It's actually the better layout, IMHO, but not what I expected. I thought the kicker would be on the bottom of the laptop screen. Anyway, the Macbook is next...

Friday, January 9, 2009

Squashing spam comments in Wordpress

Settings->Discussion has an entry box that takes words, usernames, email addresses and IP addresses to filter out spam.

Thursday, January 8, 2009

Removing Spam from Wordpress blogs

Logged into the admin account of my wordpress blog after a bit of an absense. Had 9000 spam comments to the About. Deleting by had would have been a tedious task, so I installed the Akismet plugin and it whacked marked all comments as spam and I was able to delete them with 1 click.

I got a php error a few times when it borked after processing about 2000 comments. I just reloaded the page and it eventually finished.

http://akismet.com/