Tuesday, April 23, 2013

AMD Catalyst 13.1 Update Caused Single Monitor View to Stop Working

I have a dual monitor setup with two 23" monitors.  My company uses a product called LogMeIn to remotely log in to our work monitors.  I happen to have a dual monitor set up there too.  This causes problems with LogMeIn because in fullscreen mode showing both monitors at the same time makes it almost unusable and switching back and forth between the remote monitors is a pain.

I found a great workaround.  Win7 (I don't know about other versions) has a feature to "duplicate" your monitor setup (Window-P key, then choose duplicate).  When using the AMD Catalyst drivers prior to version 13.1 this caused the two monitors to act as one single large monitor.  Then by maximizing the LogMeIn screen I could view both remote monitors at full zoom! Sweet.

Then Catalyst 13.1 came along and all that came to a screeching halt.  When going into duplicate mode, it actually did what it says it's going to do and instead of creating one large monitor it created a duplicate of my primary monitor.  Fail for me.

Disclaimer

Don't go beyond this point if you're going to blame me for your monitor mishaps.  I only write the instructions.  Besides, do you really want to trust someone named Dummy Coder?  Oh, you do?  Well continue on then.

Disable Display

I searched for awhile and finally found that if I go into the Catalyst Control Center, then go to Common Display Tasks and finally click Disable Display.



Select the display to disable and select Apply.  The monitor you selected will lose its signal.  Don't worry. We're going to get it back.

Create a Monitor Group

Next in the Catalyst Control Center choose Desktop Management then Creating and Arranging Desktops



You should only see one monitor available.  Click on the dropdown arrow in the right upper corner of the monitor and select Create Group.



In the window that comes up select 2 Displays (2 x 1) and click Accept


Both monitors will again display and your desktop should span both monitors as a single large monitor.  You need to confirm that you want to keep the settings.

Now when you do the Windows-P combination, "Extend" will create two distinct separate monitors and "Duplicate" will create a single large monitor.

Dummy Coder

Tuesday, March 20, 2012

PDF Displaying Blank Page In Javascript Popup window

The company I work for uses Adobe Livecycle for workflow management.  We also have a web front-end that acts as a proxy for user interaction with these workflows.  The web front-end will call the Livecycle APIs to generate a PDF and display it to a user.

Recently I was asked to display one of these PDFs in a separate window.  Pretty simple task right?  I wrote a little bit of Javascript with some window.open goodness and tested it out in IE7 (our standard).  Blank page.  Crap.

Turns out with a little bit of searching, IE7 and Adobe Reader don't play nice together when opening up a PDF in a new window created by Javascript.  Many people had the issue with the most common resolution to just create a link with a blank target.  That didn't quite suit my needs.  So here's my resolution.

The window.open command can take in an optional URL.  Instead of putting the URL of the PDF in the original window.open command I did something similar to the following:

var childWin = window.open('', 'windowname', 'other options');
childWin.location.replace('url of PDF');


By opening up the window with a blank page and then immediately doing a location.replace on the child window I was able to successfully bring up the PDF.

Hope that helps!

Wednesday, March 14, 2012

Bad Interpreter - No such file or directory

I ran into an issue with a shell script not functioning, getting the following error:

bad interpreter: no such file or directory

I verified that the shell was located at /bin/sh.  I then remembered that a colleague of mine made some changes to the script a few days earlier...on Windows...then moved it back.  Hmm.  Linebreaks ended up being the issue.

I ran

dos2unix filename

and the scripts ran just fine.

Hope that helps someone.

Friday, December 23, 2011

Incorrect $HOME using Git Bash on Windows

I had installed Git Bash and was trying to push a set of commits back to github.  This was failing because git was looking for my ssh keys in the wrong location.  It should have been looking in /c/Users/myusername/.ssh but instead was looking in /c/Windows/SysWOW64/config/systemprofile/.ssh.  I found out it was due to the $HOME environment variable.

I looked in my environment variables and saw %HOME% was set to %USERPROFILE% in the system properties.  In git bash, $USERPROFILE was set to /c/Users/myusername but $HOME was set to /c/Windows/SysWOW64/config/systemprofile.  Strange.  I then decided to try setting a %HOME% environment variable in the user variable on Windows.  I went back into git bash and $HOME was set correctly.

Hope this helps someone.

Friday, April 29, 2011

Changing non-US keyboard layout in Virtualboxes.org images

I wanted a quick Ubuntu server installation and installed the 10.04 server installation from virtualboxes.org.  Unfortunately for me, the keyboard layout wasn't correct and I wanted to change it.  Not being very well versed in Linux and all it's ins and outs, I wasn't sure how to do this.  I found out that you can change your keyboard configuration by using the following command:

dpkg-reconfigure console-setup

I ran through a few steps and now have a nice and easy to use US keyboard again.

Thursday, March 24, 2011

XDebug issue: Unexpected termination of script, debugging ended

I spent the better part of a day trying to figure out why I could debug a PHP script in Eclipse one minute and the next not at all. Hopefully this will help someone else out too.

My setup is Eclipse Helios PDT and WAMPServer 2.1 with PHP 5.3.5 and XDebug 2.1. I had no problem debugging scripts and then one day, poof! I started getting "Unexpected termination of script, debugging ended" messages and could not step through code at all.

As it turns out there appears to be a bug in the PDT (I can recreate this with multiple XDebug versions) with using XDebug and the Watches panel if you have some watches defined. To get around the error (I don't know if there's a fix) just remove all your watches before debugging by right-clicking on the watches view in the PHP debug perspective and choose "Remove All Watches".

This fixed it for me and I hope it will for you too.

Dummy Coder

Wednesday, March 23, 2011

How to find Oracle database block size

I had a need to find the database block size in Oracle (which is different from the OS block size).  Here's the query for finding that information:

SELECT tablespace_name, block_size FROM dba_tablespaces;

Dummy Coder