Xephyr – Nested X Server

Nested X-Server is running a X server root window within your running X-windows session like Gnome or KDE. This could be useful if you want to keep all you ssh windows in one window or maybe run all you IRC, firefox, chat and others inside one window, or maybe run another window manager itself.

Lets first install ::

sudo yum install xorg-x11-server-Xephyr

Once done, you can define an alias to do the magic with your nested server. So, lets define an alias:

alias xlxc='Xephyr -title -resizeable -host-cursor -screen 1024x768 +extension randr +xinerama -ac :11.0& DISPLAY=:11.0 xterm &'

This will open a new x-server window with Xephyr and then open a terminal inside it. Once in, make sure to set your DISPAY variable in the xterm so that all other apps started from the terminal start in the Xephyr window only.

Check out all the colors on you X window system.

If you ever wondered what combination of some colors would look like but did not really feel like setting them in your xterm just to check them out. Or if you wanted to know about all the colors on you X window system then you can install this utility called xcolorsel.

xcolorsel
xcolorsel

You will need to setup the rpm-shere repo for this.

Using this tool is very intuitive, just select the color and then press set as foreground/background to check how the color combination would look.

Enhanced by Zemanta

Try all colors in xterm with script before setting the color

If you are looking for testing the colors on how they would look like in the xterm before you set the color then here is a small script for you.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash -
#===============================================================================
#
#          FILE:  xterm_colors-test.sh
#
#         USAGE:  ./xterm_colors-test.sh
#
#   DESCRIPTION:  Test all the colors for xterm bg
#
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR:   Amit Agarwal ([email protected]), aka
#       COMPANY:  Individual
#       VERSION:  1.0
#       CREATED:  02/18/2011 01:02:51 PM IST
#      REVISION:  1.0
#===============================================================================

cat /usr/share/X11/rgb.txt |sed 's/\([0-9]\{1,3\}[ \t]*\)\{3\}//'|sed 's/^ *//' >~/rgb.txt
while read line
do
bg=$(echo $line)
echo $line
echo "Trying $bg color"
xterm -bg "$bg"&
sleep 5
kill -9 $!
done < ~/rgb.txt

This can be used in various ways but I will leave the choice to you. One option that I should probably still tell is :

Execute a command like ls to see how the settings for dircolors would look like in the terminal. To do this change the line where we are invoking xterm to the below line:

1
xterm -bg "$bg" -e "ls && sleep 5"

Do remember the sleep to some suitable time according to your needs.

Hope this helps you choose the color you want for your xterm background.

Enhanced by Zemanta