Download NetBeans!

20070516 Wednesday May 16, 2007

Father of Java, Father of Dork

A cool pic from NetBeans Day 2007, San Francisco, the day prior to JavaOne. Left to right on the stage: Bob Beasley, father of the Dog Oral Reward Kit (D.O.R.K.) and James Gosling, father of Java:

Below them, me. What am I doing? (In fact, what are we all doing there? What are we looking at? This could be a surreal caption competition. Or perhaps a "Spot the Ball" competition. Don't worry though, a competition comes up later in this blog entry.) I am demonstrating my hurriedly thrown together NetBeans Movie Player, created in Prague airport, in Amsterdam airport, in mid air while flying from Amsterdam to San Francisco, and (with a certain degree of desperation at that point) in my San Franciscan hotel room on the night (and early hours) before NetBeans Day. (Reasons for all this desperation are recorded in earlier entries in this blog.)

And why am I standing some way below them? In other words, why am I not on the stage with them during my demo? Because I hadn't figured out how to display my screen on the wall at the same time as on my laptop's screen, running Ubuntu 7.04 "Feisty Fawn". Whatever that's called in the technical world. Dual monitors. Dual display. Something like that. So I had to stand below the stage, giving me a better view of the wall, because I couldn't see anything on my laptop's screen, which was black. (Which, when you think about it, was a lot better than the other way round, which would have had me seeing my laptop's screen, but no one in the audience being able to see my screen on the wall. So I felt quite fortunate when I thought about that alternative scenario!) But, despite the fact that everyone could see my screen, it wasn't much fun trying to move my mouse on the wall, believe me. Expanding project nodes, and so on, imagine doing that with your mouse while everything is on the wall, and nothing is on your screen and, in addition to that, there are 1000 people with high expectations, packed in a claustrophobic room, literally inches away from you. However, what's worse, on top of that, is the fact that I still haven't figured the dual display thingy out. Someone came to me after NetBeans Day and we exchanged contact details and then he sent me instructions for how to set it it up. He told me to add the two lines in bold below to my etc/x11/Xorg.conf file:

Section "Device"
	Identifier	"nVidia Corporation NV43 [GeForce Go 6200/6400]"
	Driver		"nvidia"
	Busid		"PCI:1:0:0"
        Option          "MonitorLayout" "CRT,LFP"
        Option          "Clone"         "true"
EndSection

I tried that, but it didn't work. (I sent the same instructions to my colleague Petr Pisl, who had had the same problem with Ubuntu 7.04. He followed the instructions and they worked great for him. But he uses Intel while I use nVidia. That must be the difference, because the guy who sent me the instructions was also using Intel.)

I ended up doing 4 presentations during the past week, at NetBeans Day and JavaOne, in contortionist positions, such that I could see the wall while simultaneously somehow being able to see my audience at the same time. In fact, I could have used Windows without a problem, since I have a dual boot set up, but (as I proclaimed, quite proudly, in explanation, at least once or twice) I'd rather use Ubuntu 7.04 uncomfortably than Windows comfortably. (That's not necessarily a negative statement about Windows, but it is a positive statement about Ubuntu 7.04 because, aside from this issue, I've been extremely happy with it.)

So, yes, this blog entry is partly an appeal to nVidia users out there on Ubuntu 7.04: "What do I need to do to set up dual display correctly?" The first person writing (to geertjan DOT wielenga AT sun DOT com) with the correct answer to this vexing question (which, right now, means more to me than "What is the meaning of life?"), will receive a beautiful postcard from Prague, signed by me (and many of my colleagues, not because they need the answer, but because I have a stack of postcards that they signed a few years ago, so that I could use them as rewards for prize winners of pseudo-competitions in this blog, such as this one). In the subject line of your e-mail, please put: "You will never need to use your mouse on the wall again!"

But, back to the picture with which I started this blog entry. Demonstrating a self-made Java application, no matter how trivial, in the presence of James Gosling himself, is surely one of the greatest honors that can befall a Java programmer. That picture is going to remain representative of a significant milestone in my life forever.

May 16 2007, 10:02:09 AM PDT Permalink

Trackback URL: http://blogs.sun.com/geertjan/entry/father_of_java_father_of
Comments:

I think you also need to enable TwinView (special NVidia-specific hack) in your Screen section: Option "TwinView" Then restart X. For more info: http://http.download.nvidia.com/XFree86/Linux-x86/1.0-8762/README/appendix-g.html

Posted by Tom Wheeler on May 16, 2007 at 10:53 AM PDT #

If you enable TwinView and use the "DynamicTwinView" option you can "hotplug" external displays without having to restart the X server.
You can detect and configure the displays using nvidia-settings.

The following is an example config (from my Solaris laptop, actually):

Section "Device"
[...]

# This enables TwinView and places the external display (CRT here) as a seperate screen to the right of the laptop display by default.
# "TwinViewOrientation" can be set to "Clone" instead if you want both screens to be the same.
# If you have a DVI connector on your laptop, substitute "DVI" for "CRT".
Option "TwinView" "1"
Option "TwinViewOrientation" "CRT RightOf DFP"
Option "TwinViewXineramaInfoOrder" "DFP, CRT"
# This allows you to "hotplug" a screen.
# Run nvidia-settings and it will detect an external display and let you enable cloning and other options on-the-fly.
Option "DynamicTwinView" "1"
EndSection

Posted by trisk+opensolaris@acm.jhu.edu on May 16, 2007 at 12:46 PM PDT #

You run nvidia-settings, select 'Monitor Configuration', press 'Detect Monitors', and then configure the monitors as you like. Probably matching resolution and telling it to clone them.

Posted by Robin on May 16, 2007 at 06:36 PM PDT #

Thanks for the tips! Will try them out soon.

Posted by Geertjan on May 21, 2007 at 04:06 AM PDT #

Just an additional note: when you first do this, gnome thinks of the screen as one huge one, and maximised windows go across both of them, and other weird things. If you log out and log back in, it sees it as two screens on one workspace, so things like the panel only stretch across one monitor and a window only maximises in one, which is typically what you want.

Posted by Robin on May 21, 2007 at 04:28 AM PDT #

Ouch, I had the exact same problem when I was presenting my thesis project a few weeks ago. Unfortunately, I didn't have a room full of Java hackers (and possibly Linux fans) to tip me what to do, so I had to present on my laptop (really, an abysmal experience). It was a new laptop that I had gotten a few weeks before the presentation, and since the dual screen/projector switching used to work seamlessly for me before (FC6, Toshiba laptop, Intel graphics card), I assumed the same would be the case for the new laptop (FC6, Gateway laptop, ATI graphics card). Alas, not the case, I'll try out your solution

Posted by akochnev on May 21, 2007 at 05:53 AM PDT #

Geertjan, the white thing behind your arm on the photograph, is that just a random object, or is it the actual dog bone that Bob Beasley presented to Gosling?

Posted by Seapegasus on June 13, 2007 at 05:55 AM PDT #

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed