
Here we are with another episode of "Running on OpenBSD". I believe most of the questions were answered, (please let me know if i skipped your question). So instead of letting the series die I thought we cover details of certain tools that helped us.
During the preparation of our workstations we needed to start and restart our X session in order for certain changes to be made visible. However, this was extremely time consuming and thus made our experimentation more difficult. It was obvious that we needed a way to work into a virtual X server, enter the Xnest domain.
Xnest allows one to connect to existing Xservers and emulate a client connection. In laments terms you can run a window manager in a window, connect to an existing X server and watch what is being going on etc. We are interested only in the window manager in a window aspect.
Xnest behaves just like a normal X server so same things apply here also.
Just like we would normally do, we had to create an xinit script to act to our likings. Setting up backgrounds, choosing window managers etc. However, since we already have a local .xinitrc file we will create a new one, by simply copying our existing one into xinitrc.xnest. If you don't have one you can copy the OpenBSD default from /etc/X11/xinit/xinitrc.
In order to try how things look run something like the following.
xinit xinitrc.nest -- /usr/X11R6/bin/Xnest -full -dept 24 :2
This tells xinit to read the xinitrc.nest file and execute the the Xnest server with the "-full -depth 24" parameters into the second display :2.
And now you have a window with your window manager. Follow the instructions of your window manager of choice and have fun.
Depending on your existing X configuration you might receive errors from Xnest or get stack at a gray texture for background with the large X cursor. You have to manually add execute the following commands before you start your Xnest.
We have modified our xinit.xnest script to automatically add the required authentication details.
xauth add $(hostname)/unix:2.0 . deadbeef
xauth add localhost/unix:2.0 . deadbeef
And after you are finished.
xauth remove $(hostname)/unix:2.0 localhost/unix:2.0
You can add those commands into your xinit.xnest file and avoid the hassle. Also make sure you change the deadbeef to something else.
Xnest, as it seems, doesn't load the entire font path of it's parent server, for this reason sometimes you might notice that your fonts are missing from Xnest. In order to fix this issue we had to parse the entire font path again for our Xnest session with the following shell commands.
for fontpath in $(grep FontPath /etc/X11/xorg.conf |awk '{print $2}'|sed -e 's/"//g');
do
xset +fp ${fontpath}
done
xset fp rehash
Some of the solutions are not elegant i have to admit, but the ends justify the means. These allowed us to have a fully functional window manager session from within Xnest. Next time we will explain a bit about how things are controlled by X, how to add different keyboard layouts, add fonts etc.
I hope you enjoyed the reading. Till the next time have fun.
Comments
That was one article. You
Geia sou Panteli :) Nice
Hey, long time no see. I'm
Hey,
long time no see. I'm glad you liked the blog.
Hope to see you around again soon.
____
Don't prohibit what you can prevent.
Post new comment