Sunday, 23 May 2010

Dual display user debacle (Part 2)

I also want people aware that I'm targeting Windows 7 in the dual-display-user-debacle, Vista is not different enough to be worth testing on, but Windows XP should work with minimal issues.

##### run the program without any commands
Device 0 = '\\.\DISPLAY1' [NVIDIA GeForce 9800 GTX/9800 GTX+] 00000005...Active
Attached Prim.
Display: '\\.\DISPLAY1' width 1280 x height 1024 bpp 32 freq. 60 flags 0 positn (x,y) (0,0)
Device 1 = '\\.\DISPLAY2' [NVIDIA GeForce 9800 GTX/9800 GTX+] 00000001...Active
Display: '\\.\DISPLAY2' width 1280 x height 1024 bpp 32 freq. 60 flags 0 positn (x,y) (1280,0)
###### disable the secondary display device \\.\DISPLAY2
>DisplayReZ.exe \\.\DISPLAY2 -disable
Device 0 = '\\.\DISPLAY1' [NVIDIA GeForce 9800 GTX/9800 GTX+] 00000005...Active
Attached Prim.
Display: '\\.\DISPLAY1' width 1280 x height 1024 bpp 32 freq. 60 flags 0 positn (x,y) (0,0)
Device 1 = '\\.\DISPLAY2' [NVIDIA GeForce 9800 GTX/9800 GTX+] 00000001...Active
Display: '\\.\DISPLAY2' width 1280 x height 1024 bpp 32 freq. 60 flags 0 positn (x,y) (1280,0)
##### turn on the secondary again, screen settings are coppied for the primary device
>DisplayReZ.exe \\.\DISPLAY2 -enable
Device 0 = '\\.\DISPLAY1' [NVIDIA GeForce 9800 GTX/9800 GTX+] 00000005...Active
Attached Prim.
Display: '\\.\DISPLAY1' width 1280 x height 1024 bpp 32 freq. 60 flags 0 positn (x,y) (0,0)
Device 1 = '\\.\DISPLAY2' [NVIDIA GeForce 9800 GTX/9800 GTX+] 00000000...
Display: '\\.\DISPLAY2' width 0 x height 0 bpp 0 freq. 0 flags 0 positn (x,y) (0,0)
My idea is to drop the code into a library, and then call it from a background service automatically when a user logs on or does a fast-user-switch.

Saturday, 22 May 2010

The dual displays user debacle

I was looking for a way to have each user configure separate desktop sizes. I have only got space for 1 computer at home, the desktop has 2 attached displays, used when I develop software, I sometimes turn off the secondary to save power - whereupon the mouse pointer gets lost in the black desktop. My problem however is the computer is used by 3 other persons who do not want an extended desktop, if they logon and change the desktop size, everyone unfortunately gets the new desktop setup.
Since the days of Windows NT3.51 I have not detected a way of being able to do this, I'm just missing something, since users with disabilities must be able to dynamically customize Windows for different kinds of peripherals they attach. I know what I am asking is not trivial, since the graphics card drivers need to support this somehow, it's not just an O/S problem. I was thinking of locating the desktop settings and creating symbolic links to coppies of them in each user's registry keys and folders, can this work?
Basically I have this:
I log in : and want to use 2560x1024 over 2 displays .
Wife and kids log in : want 1280x1024 on 1 display ONLY

I posted the question out after googlesearch gave no results, A response to my post on MS forums led toa utility, actually 2. XPKeepPerUserDisplaySettings and XP User Display , between them I was hence inspired to roll my own, and I have now gotten most of it working.

My requirement is to be able to.
1. Disable the secondary display in a user application (which is launched when user logs on)
2. Re-enable the secondary display when a diferent user logs on.
3. Run as a service (for necessary rights), and to monitor logon/logoff without resorting to using Registry "Run" key.

For anyone onto this concept already, I found 2 MSDN tech notes that de-mystify. I have hence gotten what I wanted working, it just needs tidying up so that it will run standalone.
Enumeration and Display Control[^] and PRB: You Must Restart the Computer After You Use the ChangeDisplaySettingsEx Function to Attach a Secondary Monitor[^] .
The second note describes the work-around for a unexpected way that the ChangeDisplaySettingsEx() function operates. Once I have a tidy commandline callable application, I will be uploading the sources.

I've still to implement item 3, it will probably involve a Windows 7 compliant Tray-Icon management application, so watch this space if you want to do same.

Sunday, 16 May 2010

The Digital Economy Act 2010

Read it in full - Hopefully you give up after page 1, I did'nt, becasuse it's really only 7 pages long, the thing that struck me is that it is just a load of air, OFCOM will do this that and the next thing and generate reports which (we may or my not) have full access to later on. I am just getting sick of the wishy washy way the government run things. It's &*#!@ war, why are we letting pen-pushers decide how the world will work electronically going forward. There are a lot of things in there that make Google's recent infringement of peoples open wifi network privacy while gathering streetview data, pale in comparisson. We need in my opinion to be getting intelligent minds onto the task of getting Britain a policy the does protect copyright, but mostly that makes the internet and associated networks safe to operate, and economic. The bill goes on about p2p and BitTorrent types in such general terms it's impossible to discern whether the writter (I assume somone has to read it) has any clue of the gravity of the situation.
I would move to Somalia tomorrow if I had my very own cellphone tower, I mean, communication is power, and the govt. has been know to #%@&# it up. I am also aware that there are a million more pressing matters to sort out like volcanic ash, channel tunnel breakdowns, low gritting salt stocks, gas prices.. oh yeah, I forgot, important stuff, like immigration and . Crown Copyright

So while the clever people work out policy, I will be studying cryptography, military spec network redundancy, and how to tunnel a P2P network using ASIC generated host hopping with some low latency clientside trade-off. It would have to be an open-source project of course.

So while the good work of passing bills needs to be done, citizens need to do a whole lot more, we cannot leave Whitehall to do it all for us, it is responsible yet dirty work, and I for one am not keen on doing it. But what I can do is help people to make informed decisions of the future, use the limited freedoms Britons do have better, and mostly to be a power for good.

Saturday, 8 May 2010

Google site thinks I'm popular

Apparently you get this page when you have exceeded some arbitrary bandwidth limit. The message
"Bandwidth Limit Exceeded" made me initially think someone had hacked my site down, and it was being blocked on accoutn a spammer was linking to me, because I have my own domain name record pointing to the site from . Anyway, Apparently I have to wait for a day, after which I'll be able to edit my content and remove all the photos (they have probably hacked all my electronics porno images, and replaced them with pictures of the fairer variety LOL). Well, I'm convinced it's a server problem, So I'll be upgrading my flickr account and moving all my google pictures over to flickr.

It appears flickr have a 200 photo limit, so I will have to start shelling out every year to carry on using flickr, which is not bad at all, since flickr gets abused to do image framing in other sites all the time anyway.

Let's see how my website's brief moment of fame plays out - I'm sceptical it is real traffic, because I know that people have hosted high visitor-count sites there for other open-source things quite happily.

Saturday, 1 May 2010

Digital identity rant

Ok, so not all of use have the patience to create a spam mailbox each time we sign up for a new internet service just to try it out. Recently I accepted a trial for some popular antivirus software (I'm ditching it latter btw.) and they asked me for a physical address, why?

It's this kind of un-necessary data collection that ends mcAfee to believe that most of their customers go by the name Bill, or that they all live in the north pole, or on Catsmeet street. (You may not get the cat's meet reference) My larger concern, is that it is not a case of Apple trying to gather data so they can geographically place their customers, and then provide geographically relevant services (read: outlets so they can take more money from us). No way, I mean all you need to do now is set up next door to the Apple store. But what happens when companies loose that data accidentally or on purpose. The Internet is quite often like a sports track events meet, there is no single main-event, millions of spectators, and a few kids who can do the 100 meters. Now if you just happen to want to participate, you have to step into the area in the middle, perhaps the long-jump sandpit. At first it does not look so dangerous, and that's where my analogy will switch off again. Because using the web is dangerous, and 74% of the people reading this are power users. But because we are not giving companies like Apple, McAfee and many others the finger when it comes to personal information, it becomes a lot like knowing that the long-jump pit is not for sand-castles.