EzDevInfo.com

x-windows interview questions

Top x-windows frequently asked interview questions

How can I merge the gnome clipboard and the X selection?

I'm constantly frustrated by the two separate clipboards in X/Gnome. I'm constantly doing things like control-C to copy, and then middle-click to paste, and getting the wrong data. Or select something, then go where I want to paste it, and selecting what I want to paste over, only to lose my first selection!

Is there any way to merge these two clipboards?

Update: Parcellite comes close, but pasting over a selection is really essential. Is there a way to disable select-as-copy in X?


Source: (StackOverflow)

How to split Emacs over a dual monitor?

I would like to split Emacs over a double monitor. How do I do that?


Source: (StackOverflow)

Advertisements

How do I make YouTube videos fill up an entire screen when using dual monitors?

I am using a dual monitor setup on Ubuntu 9.10 using the TwinView configuration in NIVIDA X Server Settings. My total resolution is 2960x1050 pixels, and my individual monitors are 1680x1050 (primary) and 1280x1024 (secondary).

When going into fullscreen mode on any video on YouTube, I only see a cropped version of the video on my primary display as seen below. This does not occur on any other video sharing website - they properly make the video to fill the entire screen on my primary monitor. To my knowledge this problem only happens on YouTube.

Cropped YouTube video in fullscreen

I would rather not have to manually download YouTube videos to watch them - I want to be able to view YouTube videos directly from the YouTube website.


Source: (StackOverflow)

Mapping Super+hjkl to arrow keys under X

I'm trying to map:

Super+h -> Left
Super+j -> Down
Super+k -> Up
Super+l -> Right

globally under X. The idea is I don't want to leave my home row that often to use the arrow keys, so I'll use the Super modifier + hjkl to emulate the arrow keys under X. Is there any way to do this?

One thing I've tried is xbindkeys + xte using this configuration:

"xte 'keydown Up' 'keyup Up'"
  Mod4+k

"xte 'keydown Down' 'keyup Down'"
  Mod4+j

"xte 'keydown Left' 'keyup Left'"
  Mod4+h

"xte 'keydown Right' 'keyup Right'"
  Mod4+l

but there seems to a large delay between me pressing the key and noticing any result, and most of the time nothing happens at all.

Is there a more elegant way of doing this that actually works with no delay?


Source: (StackOverflow)

Extend Linux Desktop to another X Windows Display

I am a long time Linux user of the Xinerama and other technologies for extending a desktop to multiple monitors. However when I travel with my laptop I miss the multi-monitor support I enjoy at home. Recently I acquired a second laptop for a low price. Both laptops are running Fedora (versions 10 and 11 respectively). I use Gnome as my primary desktop environment.

I know about synergy. I use synergy all the time to control the screen of other Windows / Linux systems I use.

I would like to know, can I sit both my primary and secondary laptops together and achieve a Xinerama-like extended desktop environment? Ideally I would like to start a GNOME session on my primary laptop. And then start a X-Windows Desktop on my secondary laptop and extend my primary laptop's desktop onto it. I would like to be able to move Windows from the primary desktop to the secondary laptop desktop.

Would I need to use synergy to do this with some other bit of X-Windows technology? Or is there X-Windows technology that will do all this for me?

I am familiar with X Windows ability to display applications remotely. I am also familiar with Nomachine's NoX.


Source: (StackOverflow)

Multiple GPUs in Linux - How to specify which GPU runs X windows

I have been running Red Hat Enterprise Linux 6.1 on a system with a GTX 480. Recently I added a 3GB GTX 580, as my CUDA application requires more memory than I have on the 480. Due to space issues in the box, I had to place the 580 on the PCI-E bus closest to the CPU, and move the 480 to the second slot.

Now, when I run RHEL, X windows is running on the 580. I'd like to have the 480 run X windows so the full 3GB is available on the 580. I only have one monitor which will only display if connected to the 580; there is no signal if connected to the 480.

I have explored a couple of options:

  1. Changing the BIOS - there does not appear to be any way of specifying the primary GPU on my BIOS

  2. Altering the xorg.conf file. I ran nvidia-xconfig -a. The tail end of my xorg.conf file is appended below.

I thought that I could just remove one of the "Screen" sections and have Screen0 utilize Device1 but that prevents X windows from running.


Section "Device" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce GTX 580" BusID "PCI:9:0:0" EndSection    
Section "Device" Identifier "Device1" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce GTX 480" BusID "PCI:7:0:0" EndSection
Section "Screen" Identifier "Screen0" Device "Device0" Monitor "Monitor0" DefaultDepth 24 SubSection "Display" Depth 24 EndSubSection EndSection
Section "Screen" Identifier "Screen1" Device "Device1" Monitor "Monitor1" DefaultDepth 24 SubSection "Display" Depth 24 EndSubSection EndSection

Here are selected highlights from the xorg.0.log when X windows fails to start:

(==) Using config file: "/etc/X11/xorg.conf"
(==) ServerLayout "Layout0"
(**) |-->Screen "Screen0" (0)
(**) |   |-->Monitor "Monitor0"
(**) |   |-->Device "Device1"
...
(--) PCI: (0:7:0:0) 10de:06c0:10de:075f nVidia Corporation GF100 [GeForce GTX 480] rev 163, Mem @ 0xf6000000/33554432, 0xc8000000/134217728, 0xd0000000/67108864, I/O @ 0x0000dc00/128, BIOS @ 0x????????/524288
(--) PCI:*(0:9:0:0) 10de:1080:19da:2203 nVidia Corporation GF110 [Geforce GTX 580] rev 161, Mem @ 0xfa000000/16777216, 0xd8000000/134217728, 0xd6000000/33554432, I/O @ 0x0000ec00/128, BIOS @ 0x????????/524288
...
(II) Module nvidia: vendor="NVIDIA Corporation"
    compiled for 4.0.2, module version = 1.0.0
    Module class: X.Org Video Driver
(II) NVIDIA dlloader X Driver  270.41.19  Mon May 16 23:33:35 PDT 2011
(II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
(II) Primary Device is: PCI 09@00:00:0
...
(**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
(==) NVIDIA(0): RGB weight 888
(==) NVIDIA(0): Default visual is TrueColor
(==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
(II) Sep 15 16:18:27 NVIDIA(0): NVIDIA GPU GeForce GTX 480 (GF100) at PCI:7:0:0 (GPU-0)
(--) Sep 15 16:18:27 NVIDIA(0): Memory: 1572864 kBytes
(--) Sep 15 16:18:27 NVIDIA(0): VideoBIOS: 70.00.21.00.02
(II) Sep 15 16:18:27 NVIDIA(0): Detected PCI Express Link width: 8X
(--) Sep 15 16:18:27 NVIDIA(0): Interlaced video modes are supported on this GPU
(--) Sep 15 16:18:27 NVIDIA(0): Connected display device(s) on GeForce GTX 480 at PCI:7:0:0
(--) Sep 15 16:18:27 NVIDIA(0):     none
(EE) Sep 15 16:18:27 NVIDIA(0): No display devices found for this X screen.
(II) UnloadModule: "nvidia"
(II) UnloadModule: "wfb"
(II) UnloadModule: "fb"
(EE) Screen(s) found, but none have a usable configuration.

Fatal server error:
no screens found

Source: (StackOverflow)

How do I get X11 Forwarding to work on Windows with PuTTY and Xming?

I've always wanted to get X11 Forwarding to work with PuTTY, and the X Window System I'm using is Xming. When I have Xming running and I establish a new connection to my server, I receive the following after a command:

$ firefox
PuTTY X11 proxy: wrong authentication protocol attemptedPuTTY X11 proxy: wrong authentication protocol attemptedError: cannot open display: localhost:10.168

$ google-chrome
PuTTY X11 proxy: wrong authentication protocol attempted
(google-chrome:7083): Gtk-WARNING **: cannot open display: localhost:10.168

$ gedit
PuTTY X11 proxy: wrong authentication protocol attempted
** (gedit:6990): WARNING **: Could not open X display
PuTTY X11 proxy: wrong authentication protocol attemptedCannot open display:
Run 'gedit --help' to see a full list of available command line options.

$ gnome-system-monitor
PuTTY X11 proxy: wrong authentication protocol attempted
** (gnome-system-monitor:7024): WARNING **: Could not open X display
PuTTY X11 proxy: wrong authentication protocol attempted
(gnome-system-monitor:7024): Gtk-WARNING **: cannot open display: localhost:10.168

How do I fix these errors and get X11 Forwarding to work as a whole?


Source: (StackOverflow)

Command-line way to send keystrokes to a window open on a different X-session

On my main machine, I have a Ubuntu desktop open and logged on. I am then also logging in to this machine from a remote computer, using X2go which creates a new X-session. I have a libreoffice file open on the original session. I want to save this file and close it - but from the remote machine! (Both sessions have same user logged in; I can sudo if needed)

I have tried using xdotool search but this fails to find the window. Is there a way to do what I want from this second session? I can see the process with ps -A I can even see the open file with lsof! How can I do a "save-and-close" on it?


Source: (StackOverflow)

How do I specify an IPv6 address in the X Window DISPLAY variable?

I'm trying to export a DISPLAY variable containing a numeric IPv6 address. What format would the variable take, since IPv6 addresses contain :, which normally is used for the display number? Googling this has come up with a surprising lack of answers.


Source: (StackOverflow)

Xforwarding doesn't allow for switching users

I'm ssh'd into a remote computer and xforwarding is working fine... but as soon as I "sudo su -" or "sudo su user2" it no longer Xforwards anything giving me the error:

X11 connection rejected because of wrong authentication.
xterm Xt error: Can't open display: localhost:10.0

Any Ideas?

Thanks


Source: (StackOverflow)

Does any Linux X terminal update line-wrapping on resize? [closed]

The Mac OSX Terminal will re-wrap lines when the window is resized. Is this functionality available in any terminal emulator for Linux?

I'd prefer to do this with terminals like gnome-terminal that are included in the Ubuntu repositories.


Source: (StackOverflow)

X forwarding over SSH from Mac to a Linux box

I need run Mac applications on a remote Mac machine and display it on a local Linux machine's X server (a lot of articles on the Internet seem to be detailing how would you do it the opposite way).

$ ssh -X mac-box
$ cd /Developer/Applications/Xcode.app
$ ./Contents/MacOS/Xcode
Sat Oct  3 20:41:26 mac-box.local Xcode[15634] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
^C
  1. My $DISPLAY variable appears to be empty. What should it look like so that forwarding works correctly?
  2. Can I run OSX applications this way at all?

Source: (StackOverflow)

Using XFCE4 with awesome

When I got tired of using the standard XFCE window manager, xfwm, I simply installed openbox and selected "XFCE/Openbox" session in the GDM login screen. This was very convenient because I didn't want the plain Openbox session in which there are no network-manager, no panels, nothing.

Now I have installed awesome: I really like the idea of tiling window managers. But after I launched it, everything went wrong. Absence of XFCE panels isn't anything bad, but subpixel-aliased fonts were somehow turned on, and that was really awful.

I tried to login in XFCE, kill openbox/xfwm and start awesome, but that didn't worked: xfce4-session keeps restarting it's predefined WM, and killing it kills the whole X session too. And I didn't found the configuration for a dropdown list in GDM either.

How can I start XFCE session with awesome as a WM?


Source: (StackOverflow)

3 or 4 monitors with Nvidia and Ubuntu

I saw that someone was running 3 monitors with Ubuntu 8.10 and two Nvidia cards (http://stackoverflow.com/questions/27113/how-to-use-3-monitors).

I was curious if you can do this with Xinerama, a hacked up TwinView config, or multiple X screens, or some other method? Does it work with compiz?

I intend to run my Dell 30" in the middle with two 1280x1024 on the sides and continue to use one X screen, and run compiz, on Ubuntu 9.04. Currently, I am using 2 monitors with twinview and compiz, which runs fantastic. I just can't get the third monitor running (unless I enable it in its own X screen, and then enable Xinerama to enable windows to be dragged as if all one X screen, but this breaks compiz, and I don't care much for having separate X screen).

I would very interested in knowing how to set up 4 monitors with 2 GPU's.


Source: (StackOverflow)

What are my X client options for MS Windows? [closed]

I need to connect to a headless X Windows server (running on Ubuntu) from my MS Windows 7 computer over a 100 Mbit network. I could use VNC (or any other remote viewer) but the 3D graphics performance would be lousy I imagine. I used to have it hooked up to a monitor, but that's broken now and I can't afford a new one. A friend advised that I could try and use an X client, and that the 3D graphics wont suffer too much over 100 Mbit. Cygwin seems to be an option, but I was wondering if there were any more lightweight options.


Source: (StackOverflow)