Ubuntu – Touchscreen and additional external monitor

multi-touchmultiple-monitorstouchscreen

Soon I'll commence a PhD study with a strong focus on modelling. I'm lucky enough to have my supervisor offer me a laptop. Since besides making and running models I'll be making minutes of meetings and perhaps giving a lecture from time to time, we were thinking of a touchscreen notebook.

Due to contracts I'll be stuck with HP or Dell. A nice laptop we've found can be seen at here. The most important aspect here is probably that the graphics chip is an Intel HD Graphics 3000.

Ideally I'd work with just the touchscreen during meetings and lectures, and would extend the laptop to an external monitor for modelling purposes. In the latter case I'd still use my laptop screen to draw diagrams. There are two points I'm worried about for now:

  1. Will the laptop touchscreen work with Ubuntu 11.10? Although similar questions on AskUbuntu and Googling suggest that it won't be a problem, I'd like to know for sure before buying the laptop. Would be a real waste if I need to switch back to Windows just to use the touchscreen.

  2. And if the touchscreen works, will it still work when I connect an external monitor? I found a similar question (see How do I calibrate a touchscreen on a dual monitor system?) but unfortunately that one has never been answered.

If you can tell me anything that might help (different set-ups that worked or didn't work, etc.), please let me know.

Best Answer

There is a specific command for mapping input to a display in xsetwacom called MapToOutput. Here is what you do:

Start by figuring out the name of the display you want to map to. This can be done by running xrandr:

phnomic@phnomic-jobb:~$ xrandr
Screen 0: minimum 320 x 200, current 3200 x 1597, maximum 8192 x 8192
LVDS1 connected 1280x800+1920+797 (normal left inverted right x axis y axis) 286mm x 179mm
   1280x800       60.0*+
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200      59.9*+
   1920x1080      60.0  
   1600x1200      60.0  
   1680x1050      60.0  
   1280x1024      60.0  
   1440x900       59.9  
   1280x960       60.0  
   1024x768       60.0  
   800x600        60.3  
   640x480        60.0  
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
HDMI3 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)

In my case I want to use LVDS1.

Next, figure out what your devices are called. This is done using xsetwacom --list:

phnomic@phnomic-jobb:~$ xsetwacom --list
Wacom ISDv4 E6 Pen stylus           id: 20  type: STYLUS    
Wacom ISDv4 E6 Pen eraser           id: 21  type: ERASER    
Wacom ISDv4 E6 Finger touch         id: 22  type: TOUCH     

Finally run the command xsetwacom set "[device name]" MapToOutput [screen name] for all devices that you wish to assign. In my case, this becomes:

phnomic@phnomic-jobb:~$ xsetwacom set "Wacom ISDv4 E6 Pen stylus" MapToOutput LVDS1
phnomic@phnomic-jobb:~$ xsetwacom set "Wacom ISDv4 E6 Pen eraser" MapToOutput LVDS1
phnomic@phnomic-jobb:~$ xsetwacom set "Wacom ISDv4 E6 Finger touch" MapToOutput LVDS1

And then you are all good to use your fancy touch screen regardless of what monitors you connect it to and what orientation you use for your monitors.

If you want to know more, I recommend this sourceforge post.