InfiniteSnow
Posts: 3
Joined: Sun Sep 14, 2014 10:43 am

Problem starting window manager through SSH

Sun Sep 14, 2014 10:55 am

I am trying to install a window manager on my Raspberry PI running on Arch Linux from my Macbook with OSX 10.9 and Xquartz.

I am using a SSH connection started with ssh -Y pi@pi

Running xeyes works like a charm - the eyes appear on my screen in their own window.

I tried to install i3 and ratpoison.

Running i3-config-wizard works and exits, but creates a broken config - running i3 seems to work (it shows the error message, mouse clicks work: when clicking on "edit configuration" a urxvt terminal opens with nano).

Fixing the configuration file results in this error:

ERROR: Another window manager seems to be running (X error 10)

Typing ratpoison returns:

ratpoison: There can be only ONE.

When started with exec i3 / exec ratpoison, they still complain with the same thing AND crash the SSH session.

When started with startx with their .xinitrc set as exec i3 / exec ratpoison, they seem to start correctly, but nothing is displayed on my mac.

I tried to run them through xnest with /usr/X11/bin/Xnest -geometry 1280x900 :1 & DISPLAY=:1 ssh -Y pi@pi i3. In this case, for i3, the configuration wizard appears, but keystrokes don't work. With the broken config file, only the borders of the error message are displayed, and input doesn't work. Fixing the config file results in black screen on the Xnest window. Ratpoison always returns a black screen with this method.

I can't figure this out. Any ideas?

Thank you in advance.

InfiniteSnow
Posts: 3
Joined: Sun Sep 14, 2014 10:43 am

Re: Problem starting window manager through SSH

Sun Sep 14, 2014 1:13 pm

If I got it correctly, X forwarding works only for single applications, and not entire window managers. So, Xnest is the way to go. I had to run Xnest with Xnest :1 & on my Macbook, set the environment DISPLAY variable to :1, and then everything worked, exept i3 which is not showing text, but I'll figure this out later.

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Problem starting window manager through SSH

Sun Sep 14, 2014 1:26 pm

InfiniteSnow wrote:If I got it correctly, X forwarding works only for single applications, and not entire window managers. So, Xnest is the way to go. I had to run Xnest with Xnest :1 & on my Macbook, set the environment DISPLAY variable to :1, and then everything worked, exept i3 which is not showing text, but I'll figure this out later.
http://www.raspberrypi.org/forums/viewt ... 53&t=86934
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Problem starting window manager through SSH

Tue Sep 16, 2014 3:27 pm

Whenever keystrokes don't work, also check what $DISPLAY is for your terminal session. You can always reset it manually on command line with DISPLAY=:1 (or whatever you want it to be). I have it set in my .bashrc for the display I want to use in general, and then reset it by hand when need be.

And also, if you are on the command line, make sure you are in the same tty that is hooked up to the display. Not sure how this would apply if you are doing the port forwarding or other way to tunnel, but this is more stuff to consider when debugging.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

InfiniteSnow
Posts: 3
Joined: Sun Sep 14, 2014 10:43 am

Re: Problem starting window manager through SSH

Tue Sep 16, 2014 3:42 pm

Thank you, but I already solved everything I expressed above. I had to set the DISPLAY variable before ssh-ing into the Pi. I have made a further step forward; I got that Xnest is a bit obsolete, so I switched to Xephyr and many other problems got solved.

Now I have another inconvenience with Xmodmap key mappings within i3. For example, I have Xephyr set to send Alt_R and Alt_L as Alt_R and Alt_L, not as Mode_switch; I have mapped my Alt_R as Mode_switch (in the keycode section, it's key #69) and Meta_L and Meta_R as Mod4. Xev recognizes them all correctly; the problem is with the modifiers. Mod4 should be the Modifier inside i3, but ONLY Meta_R works (Meta_L does not). Furthermore, Mode_switch doesn't work either.
Setting Xephyr to send Alt_R and Alt_L as Mode_switch makes Mode_switch work.

It seems like keycodes are set correctly, but editing modifiers is somewhat not recognized.

Return to “Arch”