You are not logged in.
Pages: 1
ok, I don't really understand the usage of Xnest...
it starts fine with "Xnest :1" but I cannot execute anything in that display (DISPLAY=":1" xterm fails... cannot connect to display :1.0)
I'd like to use xnest to mess with other window managers w/o leaving X... does anyone know how to do this?
Offline
#!/bin/sh
Xnest :1 -name "Bla" +kb -ac &
export DISPLAY=:1
xsetroot -display :1 -solid black &
exec the_actual_wm
Offline
i like that this subject is discussed ...
here some things i never figured out how to do - hopefully someone out there knows how to solve them.
- how can i have the same keyboard settings in the nested X as in the main X (whenever i use Xnest, i have a us keyboard inside :1 but in :0 my correct "XkbLayout" "de_CH")
- is there a way to specify the size of the :1?
- is there a way that :1 addapts to the window-size it is nested in? (resizing window <-> geometry of X changes) [if not, the window must not be resizable, but it is]
- is there a way to copy-paste across X'es?
- funny thing i figured out once: start kde in :0 start a nested X and start xfwm in it, start xfce4-panel in it and press the "exit" button on the xfce panel. the reaction is not that xfce exits but that kde asks to end session --- why?
The impossible missions are the only ones which succeed.
Offline
#!/bin/sh Xnest :1 -name "Bla" +kb -ac & export DISPLAY=:1 xsetroot -display :1 -solid black & exec the_actual_wm
hmm maybe my error was that I was just assuming "DISPLAY=:1" would take care of everything... is it required to pass the "-display :1" args still?
Offline
- Maybe the "+kb -ac" option takes care of the keyboard stuff, no idea where I got it from.
- For the size use -geometry, see the Xnest manpage.
- Probably not, as xrandr doesn't work.
- Don't think so, as it are two seperate X servers, and that's the whole point, isn't it?
- Buggy program that doesn't expect multiple X servers running. To see how it does it look at the source or do a strace.
For programs that don't check the DISPLAY environment variable but do have a -display option it is needed.
Offline
- funny thing i figured out once: start kde in :0 start a nested X and start xfwm in it, start xfce4-panel in it and press the "exit" button on the xfce panel. the reaction is not that xfce exits but that kde asks to end session --- why?
it may have ":0" hardcoded for the display... or the env variable wasn't set before starting the xfce4-panel (most WMs use XOpenDisplay(NULL) which gets the display based on the env variable DISPLAY
Offline
XNEST(1) XNEST(1)
[mod: the rest of this post is the manpage of xnest - dp]
:?
Offline
Offline
When I use:
Xnest :1 &
DISPLAY=:1
exec xfce4-session
everything works fine
btw.: could some moderator please delete the 'man-page-post'?
Offline
- Maybe the "+kb -ac" option takes care of the keyboard stuff, no idea where I got it from.
- For the size use -geometry, see the Xnest manpage.
- Probably not, as xrandr doesn't work.
- Don't think so, as it are two seperate X servers, and that's the whole point, isn't it?
- Buggy program that doesn't expect multiple X servers running. To see how it does it look at the source or do a strace.
For programs that don't check the DISPLAY environment variable but do have a -display option it is needed.
i3839, thank you very much for the comments
keyboard: i use +kb ... it is, as if it does not check the settings ... anyway
size: -geometry :oops: yes ... i forgot
resizable window: it is logical that you cannot resize an X server live (this would be a cool feature request ;-) ) ... the confusing part is, that kde let's you make the window with the nested :1 smaller but the nested X does not have scrollbars. when you resize :1 to it's original size, you get faulty graphics in the regions that were closed (feature request: scrollbars in nested X server, as moving of mouse does not scroll the virtual screen in the window the nested X is running in (in a real X server, if you have a virtual size that is larger that the effective resolution, the screen is moved by the mouse))
copy/paste: i use vnc to copy/paste between them, but this means having lots of windows around and the advantage of a nested X is lost ... that's why i asked ... if there is no simply way, never mind
i tried strace xfce4-panel in the nested X but after some seconds, strace crashed :1 and :0 :evil: ... anyway, it is only a module of the xfce4-panel and i in most cases use xfce4 in the :0 and run something else in :1 so no problem with this
The impossible missions are the only ones which succeed.
Offline
Yes, it Xnest crashes very fast, not sure what it is. I only used it to try out xfce4 without messing up anything else. No idea for what else than testing you'd use it though.
Offline
Just a thought, would you be able to resize the Xnest window using something like <ctrl><alt><+/->, like you can do in X?
i tried it, but it doesn't work ... it was worth a try ;-)
On a sidenote, I've never actually figured out what is required in the config file(s) in order to be able to go <ctrl><alt><+/-> in X and have it change resolution. Sometimes it works and sometimes it doesn't...
me neither ... and since i have this laptop without the numbers-part of the keyboard (you need [+] and [-] from the numbers part of the keyboard) i dropped my illusions and use software-solution only (xrandr)
The impossible missions are the only ones which succeed.
Offline
Ctrl+Alt+-/+ can only change between the modes given in the X config file. Other than that, it works always except if you explicitly disable it in the X config. Problem of this method is that the X programs can't know about the changes, as they aren't notified. That's solved by Xrandr, which is much better and should be used if possible. Xrandr is a X extension which must be supported by the X driver (e.g. nv).
Offline
Pages: 1