How to tell which keyboard was used to press a key?

I frequently work on pairing stations where there are multiple keyboards installed. I can use setxkbmap with -device <ID> to set the layout for a specific keyboard (using an ID from xinput), but often it’s not obvious which keyboard I’m at. It would be better to avoid the back-and-forth of trying both keyboards, so I’d like to write a quick tool to get this information for setxkbmap. I’d expect a typical use case like the following:

X “Can’t open display: :0” while DISPLAY variable is correct

I’m not able to start any GUI applications as a root user: # pgrep -lf Xorg 1590 /usr/bin/Xorg -br -nolisten tcp :0 vt7 -auth /var/lib/xdm/authdir/authfiles/A:0-PNnJzp # echo $DISPLAY :0 # xeyes No protocol specified Error: Can't open display: :0 # firefox No protocol specified No protocol specified Error: cannot open display: :0 # xcalc No … Read more

Viewing a part of the screen in a window on Linux

I plan to make a presentation with a live demo using my wide screen Ubuntu 12.10 Laptop and a projector. My plan is to connect the projector as a second (small) display and put my slides and live-demo there. It would be convenient, if I could see the projector display on my laptop LCD screen within a window (no zoom or stretch needed). So my question is:

Split a physical X display into two virtual displays?

I just purchased a TripleHead2Go and configured it using OSX. What this box does is simply take 1-3 multiple external monitors and combine their signal into one single resolution. I’m using two external 1920×1080 displays with it, bringing my display size to 3940×1080, alongside my laptop’s regular display of 1920×1200. My laptop is running FGLRX 8.95 with Catalyst 12.3, the video card is an AMD Radeon HD 6700M. Here’s what I’m looking at, presently: