Libervis Network - For a Free WorldLibervis Projects | Nuxified Projects
Welcome guest. Register | Login | Show what's new
Inatux.com

launching a different window manager in a window

If you ever tried a window manager that doesn't use overlapping windows, you will have found that some programs create too many windows to work well with it. You can let these programs use an X server that displays in a window of your first X server.

The easiest way to do that is as follows:

Xnest -ac :1 &
export DISPLAY=:1
your-other-windowmanager &
program-you-want-to-run &

(If you already have more than one X server running, try :2 , :3 , and so on)

This has one downside: anyone can now display things in that window, using export DISPLAY=yourIPaddress:1. If your X and/or firewall configuration is good, the damage is limited to other users on your computer displaying things in your window, which is okay if the only person with an account on your computer is you. If not, we shouldn't disable access control (-ac option), but then we need to make sure the access control doesn't lock us out either. I use the following scripts:

launchxnest:

#!/bin/sh

startx /path/to/session -- /path/to/myX $@

session:

#!/bin/sh

your-other-windowmanager &
program-you-want-to-run

myX:

#!/bin/sh

Xnest -geometry 1000x700 $@

The whole thing is started with launchxnest :1 .

This way, startx gives Xnest, your windowmanager and your program all the information they need to connect to each other without allowing others to do the same.

There are instructions on the web that use mcookie and xauth directly instead of through startx, but those don't work for me. YMMV.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><br><p><img><br><b><i>
  • You may quote other posts using [quote] tags.
  • You can use BBCode tags in the text. URLs will automatically be converted to links.
  • Textual smileys will be replaced with graphical ones.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Lines and paragraphs break automatically.
  • Glossary terms will be automatically marked with links to their descriptions. If there are certain phrases or sections of text that should be excluded from glossary marking and linking, use the special markup, [no-glossary] ... [/no-glossary]. Additionally, these HTML elements will not be scanned: a, abbr, acronym, code, pre.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
2 + 3 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

We have 7827 members who wrote 2145 articles and 12193 comments. Welcome to our newest member, SharmelWaicky!

Who's online

There are currently 0 users and 14 guests online.
Nuxified RSS feed