xorg interview questions
Top xorg frequently asked interview questions
I am trying to change this xorg.conf
file that I used to modify under Ubuntu 9.04, so it can have the higher resolutions of my monitor. Under 9.04, the monitor was unknown, and I had to key in all resolutions in the file, and although it is found under 9.10, 9.10 does not have the highest resolution that my monitor can sustain.
How can I change such a setting? Is xorg.conf
moved, or replaced?
Source: (StackOverflow)
I'm in the middle of trying to setup dual monitors on ubuntu and would like to backup my xorg.conf...
The documentation I've been thus far say to do the following:
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
But I don't see the xorg.conf file anywhere... Am I missing something? Where is this located?
Source: (StackOverflow)
I'm looking for a method of reporting display resolution. I want to set up scripts to launch rdesktop
, and I want to launch it on several machines with different resolutions, so I want a way to dynamically determine it.
Source: (StackOverflow)
The linux commandline tool wmctrl
allows you to list all windows, or all desktops, among other things. In the desktop-listing mode, the current desktop is marked with an asterisk.
I need a tool that can figure out the currently active window's title. Unfortunately, wmctrl
doesn't have a helper that does this - despite it knowing which window is currently active (see :ACTIVE:
marker).
Is there another commandline tool that can give me the window id and/or window title of the current window?
Source: (StackOverflow)
Is there a way I can get this behavior on Mac OS?
alt + right-click-drag will resize the window, relative to where you've clicked within the window and the window's center
alt + left-click-drag will move the window, regardless of where you've clicked within the window.
There's a Windows port of this behavior as well: http://www.codeproject.com/KB/DLL/wm.aspx
Source: (StackOverflow)
I had a device running Ubuntu 12.04 LTS have its screen freeze. Generally I have simply jumped onto an available tty, i.e. Ctrl-Alt-F1 and executed the command /etc/init.d/lightdm restart
or service lightdm restart
. This however kills everything I have open. How do I avoid this?
Source: (StackOverflow)
These two files seem to have the same function. What is the difference between the two if any?
Source: (StackOverflow)
After launching the X11 app (XQuartz 2.3.6, xorg-server 1.4.2-apple56) on my Mac (OS X 10.6.8), opening an terminal in X11 and running xhost +
, I then ssh -Y
to my Ubuntu 10.04 VM (running on VMware Fusion). When I run gedit .bashrc
(for example), I get:
(gedit:9510): Gtk-WARNING **: cannot open display:
set | grep DISPLAY
returns nothing.
But if I ssh -Y
into my Ubuntu 11.04 machine, gedit .bashrc
works. echo $DISPLAY
returns "localhost:10.0".
I tried export DISPLAY=localhost:10.0
while sshed into my VM and then running gedit .bashrc
, but I get:
(gedit:9625): Gtk-WARNING **: cannot open display: localhost:10.0
What could be different in the configuration of the two difference Ubuntu machines that would explain why one works and the other doesn't?
Update: As suggested by Zoredache in the comment below, I ran sudo apt-get install xbase-clients
, but I continue to have the same problem.
Source: (StackOverflow)
I set the mouse acceleration and sensitivity levels to minimum in System->Preferences->Mouse but with the new mouse I have, even those settings are too fast. Is there a way to further reduce the speed? The resolution of the mouse seems to be much higher than needed. Is there a way to reduce that?. The mouse is an Okano A1020 Laser Mouse.
lsusb -v says the following:
Bus 006 Device 002: ID 12cf:0047
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x12cf
idProduct 0x0047
bcdDevice 51.04
iManufacturer 1 MouseCenter
iProduct 2 LASER Mouse
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 2 Mouse
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 46
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
Device Status: 0x0000
(Bus Powered)
EDIT: In the meantime, I tried xset m 0 0
, which didn't improve anything either, the mouse stayed at the same speed.
another edit: Thanks for asking, I didn't notice this earlier. The acceleration setting does have an effect, but the sensitivity setting does not.
Also, I double checked the company name and model, and it is correct as stated.
Source: (StackOverflow)
This is the Linux version of my Disabling mouse acceleration in Mac OS X question. Hopefully I'll get an answer this time.
I am tired of mouse acceleration and want to have a completely linear mouse response. This is easily achievable through any of the 5 or so methods (some subtly implied) on the X.Org wiki page on pointer acceleration. However, they also disable velocity scaling.
I don't want a 1:1 mapping between device and screen coordinates. I want a 1:N mapping where N is a constant. Any ideas?
Source: (StackOverflow)
On my debian-based machine, I have a working multiseat configuration.
One annoying detail that so far I couldn't fix is that any USB hardware I connect is always assigned to the primary seat.
Scouring the internet, it seems that the solution to this problem is to attach a USB hub to the machine and assign the "ownership" of it to the secondary seat. This way, any device attached to the hub will be controlled to the secondary seat. However, I'm a bit confused about how to assign the ownership.
lsusb
allowed me to track the bus position of the hub:
Bus 002 Device 004: ID 1a40:0201 Terminus Technology Inc. Hub
I will be most grateful if somebody will guide me from here...
PS: Initially I thought I had to tweak the xorg.conf
settings, but reading the conf.xorg documentation I couldn't find anything relevant. In some other post I also read about using udev
, but again... I failed to find a clear how-to on how to achieve this.
Source: (StackOverflow)
When I connect to my Ubuntu box from any Mac OS X 10.6 client (Snow Leopard) using Nomachine, the 'd' key minimizes all windows on my Ubuntu box. I found another post here that says the issue can be fixed by changing some settings on the Ubuntu box when connected. However, I cannot find the location of the settings indicated in that post.
Does anyone know how to resolve this 'd' key problem?
Source: (StackOverflow)
as many others I don't need CapsLock. I want to reassign it such that it has the function of AltGr.
I use Kubuntu 9.10 but I think there must be a solution which is distribution independent.
I already tried to use setxkbmap
or xmodmap
. Using xmodmap
at least I managed that CapsLock to behaves like Del by following this description.
But I could not achieve assigning the AltGr behavior to CapsLock.
Source: (StackOverflow)
Elo touchscreen model:
- Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r)
Problem description:
- My problem + others problem with this is that, when i touch-over (mouse-over) the touchscreen, the mouse cursor do not follow my (finger/touch) movement. On press the cursor press (click) in the wrong location.
My goal is to fix it, so that the press location is exact.
Tried
Following attempts i have done but no luck.
1) Query/Device status
--
udi = '/org/freedesktop/Hal/devices/usb_device_4e7_20_20B23159_if0_logicaldev_input'
button.has_state = false (bool)
info.addons.singleton = {'hald-addon-input'} (string list)
info.capabilities = {'input', 'button', 'input.mouse'} (string list)
info.category = 'input' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_4e7_20_20B23159_if0' (string)
info.product = 'Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface' (string)
info.subsystem = 'input' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_4e7_20_20B23159_if0_logicaldev_input' (string)
input.device = '/dev/input/event11' (string)
input.originating_device = '/org/freedesktop/Hal/devices/usb_device_4e7_20_20B23159_if0' (string)
input.product = 'Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface' (string)
input.x11_driver = 'evdev' (string)
linux.device_file = '/dev/input/event11' (string)
linux.hotplug_type = 2 (0x2) (int)
linux.subsystem = 'input' (string)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.0/input/input11/event11' (string)
2) Add a new file
$ vim /etc/X11/xorg.conf.d/elo.conf
Section "InputDevice"
Identifier "touchscreen1"
Driver "elographics"
Option "Device" "/dev/ttyS0"
Option "MinX" "470"
Option "MaxX" "3670"
Option "MinY" "600"
Option "MaxY" "3550"
Option "ScreenNumber" "0"
Option "ReportingMode" "Scaled"
Option "ButtonThreshold" "17"
Option "ButtonNumber" "1"
Option "SendCoreEvents"
EndSection
3) Logout to restart the X
4) Result is still same nothing was improved.
I appreciate your advise, on this.
Follow up:
$ cat /proc/bus/input/devices
I: Bus=0003 Vendor=04e7 Product=0020 Version=0100
N: Name="Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface"
P: Phys=usb-0000:00:1d.1-1/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/input/input6
U: Uniq=20B23159
H: Handlers=mouse1 event6 js0
B: PROP=0
B: EV=1b
B: KEY=10000 0 0 0 0 0 0 0 0
B: ABS=100 3
B: MSC=10
$ cat /dev/input/event6
$ xinput_calibrator -v --device 14 --precalib 0 1024 0 768 --output-type xinput
DEBUG: XInputExtension version is 2.0
DEBUG: Skipping virtual master devices and devices without axis valuators.
DEBUG: Selected device: Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface
DEBUG: Setting precalibration: 0, 1024, 0, 768
DEBUG: Not usbtouchscreen calibrator: Not a usbtouchscreen device
DEBUG: Read axes swap value of 0.
Calibrating EVDEV driver for "Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface" id=14
current calibration values (from XInput): min_x=0, max_x=4095 and min_y=0, max_y=4095
DEBUG: Adding click 0 (X=1908, Y=731)
;
; Solved! section
;
$ yum search xinput; install xinput
$ xinput --help
usage :
xinput get-feedbacks <device name>
xinput set-ptr-feedback <device name> <threshold> <num> <denom>
xinput set-integer-feedback <device name> <feedback id> <value>
xinput get-button-map <device name>
xinput set-button-map <device name> <map button 1> [<map button 2> [...]]
xinput set-pointer <device name> [<x index> <y index>]
xinput set-mode <device name> ABSOLUTE|RELATIVE
xinput list [--short || --long] [<device name>...]
xinput query-state <device name>
xinput test [-proximity] <device name>
xinput create-master <id> [<sendCore (dflt:1)>] [<enable (dflt:1)>]
xinput remove-master <id> [Floating|AttachToMaster (dflt:Floating)] [<returnPointer>] [<returnKeyboard>]
xinput reattach <id> <master>
xinput float <id>
xinput set-cp <window> <device>
xinput test-xi2 <device>
xinput list-props <device> [<device> ...]
xinput set-int-prop <device> <property> <format (8, 16, 32)> <val> [<val> ...]
xinput set-float-prop <device> <property> <val> [<val> ...]
xinput set-atom-prop <device> <property> <val> [<val> ...]
xinput watch-props <device>
xinput delete-prop <device> <property>
xinput set-prop <device> [--type=atom|float|int] [--format=8|16|32] <property> <val> [<val> ...]
; Hey how do i use xinput for query my stuffs?
$ xinput list
^
|_______________ Show me what i got! for <input source> to my local
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Broadcom Corp id=10 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=12 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Video Bus id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Sleep Button id=8 [slave keyboard (3)]
↳ Broadcom Corp id=9 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=11 [slave keyboard (3)]
↳ Dell WMI hotkeys id=13 [slave keyboard (3)]
⎡ main pointer id=15 [master pointer (16)]
⎜ ↳ Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface id=14 [slave pointer (15)]
⎜ ↳ main XTEST pointer id=17 [slave pointer (15)]
⎣ main keyboard id=16 [master keyboard (15)]
↳ main XTEST keyboard id=18 [slave keyboard (16)]
$ xinput get-feedbacks 14
1 feedback class
PtrFeedbackClass id=0
accelNum is 2
accelDenom is 1
threshold is 4
$ xinput watch-props 14
Device 'Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface':
Device Enabled (150): 1
Coordinate Transformation Matrix (152): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (272): 0
Device Accel Constant Deceleration (273): 1.000000
Device Accel Adaptive Deceleration (274): 1.000000
Device Accel Velocity Scaling (275): 10.000000
Device Product ID (269): 1255, 32
Device Node (270): "/dev/input/event11"
Evdev Axis Inversion (276): 0, 0
Evdev Axis Calibration (277): -4000, 4093, -100, 4089
Evdev Axes Swap (278): 0
Axis Labels (279): "Abs X" (369), "Abs Y" (370), "Abs Misc" (580)
Button Labels (280): "Button Left" (153), "Button Unknown" (271), "Button Unknown" (271), "Button Wheel Up" (156), "Button Wheel Down" (157)
Evdev Middle Button Emulation (281): 0
Evdev Middle Button Timeout (282): 50
Evdev Wheel Emulation (283): 0
Evdev Wheel Emulation Axes (284): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (285): 10
Evdev Wheel Emulation Timeout (286): 200
Evdev Wheel Emulation Button (287): 4
Evdev Drag Lock Buttons (288): 0
$ xinput query-state 14
2 classes :
ButtonClass
button[1]=up
button[2]=up
button[3]=up
button[4]=up
button[5]=up
ValuatorClass Mode=Absolute Proximity=In
valuator[0]=3018
valuator[1]=3226
valuator[2]=0
$ xinput test 14
motion a[0]=2940 a[1]=1717 a[2]=158
motion a[0]=2940 a[1]=1717 a[2]=201
button release 1 a[0]=2938 a[1]=1719 a[2]=0
^C
; Hey, how do i apply now settings to my local using xinput??
$ xinput set-pointer <device name> [<x index> <y index>]
^
|___this does not work anymore in latest kernels
report a bug it wasted my time
$ xinput set-int-prop "Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface" "Evdev Axis Calibration" 32 -4000 4093 -100 4089
Now, my right screen is having 1024x768 resolution and left laptop screen also, using the above statement, the mouse cursor is fitting well. If i have different resolutions, i need to finetune it ofcourse.
Source: (StackOverflow)