Gentoo Wiki




Xnest is a client and a server. Xnest is a client of the real server which manages windows and graphics requests on its behalf.

Xnest is a server to its own clients.

Xnest manages windows and graphics requests on their behalf. To these clients Xnest appears to be a conventional server.

-Xnest man page

Running KDE inside a window using Xnest

For KDE you need a to make the file: .xinitrc-kde in your home directory that contains the following:

exec /usr/kde/3.4/bin/startkde

Note that you may need to change the location of startkde

To find the location of startkde you can simply:

slocate */bin/startkde

To start a new kde session inside of a 1024x768 window simply issue the following command:

xinit ~/.xinitrc-kde -- `which Xnest` :5 -geometry 1024x768

TIP: su to a different user before running the command to run KDE as that user, but remeber to copy the .xinitrc-kde file to the users home you wish to login as.

cp ~/.xinitrc-kde /home/USER
xinit ~/.xinitrc-kde -- `which Xnest` :5 -geometry 1024x768

Making an Alias

To make an alias add the following to ~/.bashrc (per user alias) or /etc/bashrc (Globaly):

alias nestkde="xinit ~/.xinitrc-kde -- `which Xnest` :5 -geometry 1024x768"

Then to make the alias active (with out restarting bash)

source ~/.bashrc OR source /etc/bashrc

now all you have to do is run nestkde and up will pop KDE in a 1024x768 window.

for full alias information visit: TIP_alias


The default X server ":0" will be in use and therefore you will not be able to use it, thus we must use a display higher than that (and that is not in use) Also, if you want to be able to launch more than one Xnest session, each of these will need to have a different display number.

The -geometry argument tells Xnest the size of window you want.

If you get an error try using a different display :6 and so on.

For more info:

man Xnest

Arguments for Xnest

use: X [:<display>] [option]

-a #  
mouse acceleration (pixels)
disable access control restrictions
-audit int  
set audit trail level
-auth file  
select authorization file
enable bug compatibility
create root window with black background
enable any backing store support
disable any backing store support
turns off key-click
c #  
key-click volume (0-100)
-cc int  
default color visual class
-co file  
color database file
generate core dump on fatal error
-dpi int  
screen resolution in dots per inch
enables VESA DPMS monitor control
disables VESA DPMS monitor control
[none|all|16] defer loading of [no|all|16-bit] glyphs
-f #  
bell base (0-100)
-fc string  
cursor font
-fn string  
default font name
-fp string  
default font path
prints message with these options
ignore all remaining arguments
-ld int  
limit data space to N Kb
-lf int  
limit number of open files to N
-ls int  
limit stack space to N Kb
disable the locking mechanism
enable logo in screen saver
disable logo in screen saver
-nolisten string  
don't listen on protocol
don't reset after last client exists
reset after last client exists
-p #  
screen-saver pattern duration (minutes)
accept failure to listen on all ports
reject failure to listen on all ports
turns off auto-repeat
turns on auto-repeat
[default|mono|gray|color] set render color alloc policy
-s #  
screen-saver timeout (minutes)
-sp file  
security policy file
disable any save under support
-t #  
mouse threshold (pixels)
terminate at server reset
-to #  
connection time out
disable testing extensions
server started from init on /dev/ttyxx
video blanking for screen-saver
screen-saver without video blanking
WhenMapped default backing-store
-x string  
loads named extension at init time
set maximal bigrequest size
Enable XINERAMA extension
Disable XINERAMA extension
Disable smart scheduling, enable old behavior
-schedInterval int  
Set scheduler interval in msec
+extension name  
Enable extension
-extension name  
Disable extension
-query host-name  
contact named host for XDMCP
broadcast for XDMCP
[addr [hops]] IPv6 multicast for XDMCP
-indirect host-name  
contact named host for indirect XDMCP
-port port-num  
UDP port number to send messages to
-from local-address  
specify the local address to connect from
Terminate server after one session
-class display-class  
specify display class to send in manage
-cookie xdm-auth-bits  
specify the magic cookie for XDMCP
-displayID display-id  
manufacturer display ID for request

The X Keyboard Extension adds the following arguments:

disable the X Keyboard Extension
enable the X Keyboard Extension
[+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ]
                      :enable/disable accessx key sequences
set XKB autorepeat delay
set XKB autorepeat interval
don't load XKB keymap description
file that contains default XKB keymaps
XKB keyboard description to load on startup
-display string  
display name of the real server
sinchronize with the real server
utilize full regeneration
-class string  
default visual class
-depth int  
default depth
use software screen saver
-geometry WxH+X+Y  
window size and position
-bw int  
window border width
-name string  
window name
-scrns int  
number of screens to generate
instal colormaps directly

Sizaint 00:39, 23 May 2006 (UTC)

Last modified: Thu, 04 Sep 2008 06:16:00 +0000 Hits: 8,812