Cooking with Linux - Can't Get Enough Desktops!

Explore new user interface ideas without leaving your regular desktop. Our chef shows you how to nest X sessions.

From that command line, start your window manager or desktop simply by typing its command name, such as xfce4-session for XFCE, amiwm for AmiWM and so on.

After you've played with several window managers in this manner, you may find yourself faced with a bit of a roadblock. Sometimes, in doing this, I ran into a message (particularly from GNOME) that it could not start, specifically gnome-session: you're already running a session manager. As I knew this wasn't the case, I checked to see what the SESSION_MANAGER pointed to:

$ echo $SESSION_MANAGER
local/ultraman:/tmp/.ICE-unix/3132

As you can see, I had leftover session information from a prior run with a nested window manager. One option is to unset the SESSION_MANAGER variable. Another is simply to remove the troubling files, assuming, of course, that you are no longer running your window manager:

$ rm /tmp/.ICE-unix/3132
rm: remove socket `/tmp/.ICE-unix/3132'? y

It would appear, mes amis, that closing time is approaching rapidly, so it's time for la pièce de résistance—your desktop dessert, if you will. Some of you may be asking, “if I can run one nested server, why not two or three?” Starting a second nested server is simply a matter of assigning a different display number. For the second, type Xnest -ac :2 or Xnest -ac :3 for the third and so on. In fact, you can run an Xnest inside of another Xnest. Figure 3 shows an IceWM session running inside a GNOME session, running inside a KDE session.

Figure 3. IceWM Nested inside of GNOME, Nested inside of KDE

As you can see, mes amis, there is enough here to satisfy the greatest desktop gourmand among you, non? As Robert Heinlein might have said, “to enjoy the full flavor of life, take big bites” or in this case, run many different window managers and many desktops.

And now, closing time truly is upon us, but spend a little more time exploring. François will refill your glasses one final time before you go. Until next time, mes amis, let us all drink to one another's health. A vôtre santé! Bon appétit!

Marcel Gagné (mggagne@salmar.com) lives in Mississauga, Ontario. He is the author of the newly published Moving to Linux: Kiss the Blue Screen of Death Goodbye! (ISBN 0-321-15998-5) from Addison Wesley. His first book is the highly acclaimed Linux System Administration: A User's Guide (ISBN 0-201-71934-7). In real life, he is president of Salmar Consulting, Inc., a systems integration and network consulting firm.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Amazing!

Al Phi's picture

This is the first truly exciting article about the X Window System that I have read.

I'm relatively new to Linux, and I've been experimenting with different window managers. But I had been starting each in its own display, which was a bit limiting to me.

I haven't encountered any talk about replacing X (except for the fact that Mac OS X uses its own GUI system), if someone could point me in the general direction, it would be greatly appreciated.

Very good

Pranith's picture

thank you, thank you. thank you...........this was fantabulous....really
out of bounds...thnx for letting me into this.

Excelent!

WilsonGC's picture

Excellent article.
Simple and very very useful.
Just what I had looking for to
display my DECwindows session over IP in
my desktop without leaving my current KDE session.

Thanks.

starting default window manager

abcollier's picture

it is also possible to just start your default window manager in the xnest window:

$ startx -- /usr/X11R6/bin/Xnest :1

the -scrns option

abcollier's picture

and the -scrns option allows multiple windows to be opened:

$ Xnest -scrns 3 :1 -ac &
$ xclock -display :1.0 &

Re: Can't Get Enough Desktops!

aru's picture

Hi,

You say, in the article:

> In some cases, you won't be able to start a window manager
> using some kind of display redirect switch. This is true with
> KDE, AmiWM, XFCE and some others. To run these window
> managers, begin with a simple X terminal in your nested X
> server:

How about this?

DISPLAY=:1 startkde

Isn't this easier than the method you suggest?

Arvind

Re: Can't Get Enough Desktops!

Anonymous's picture

The thing is to start another wm inside another one and not just run another wm inside another display

Re: Can't Get Enough Desktops!

Anonymous's picture

Xnest won't run for me on Fedora Core 1.
I get:

#Xnest :1 -ac &

Fatal server error:
Unable to open display "".

Re: Can't Get Enough Desktops!

Anonymous's picture

export DISPLAY="0:1"
Xnest blah blah blah

Re: Can't Get Enough Desktops!

Anonymous's picture

Excellent article... Somehow I knew this must be possible, but I just didn't know how to do it!

Re: Can't Get Enough Desktops!

Anonymous's picture

Xnest won't run for me on Fedora Core 1.
I get:

#Xnest :1 -ac &

Fatal server error:
Unable to open display "".

Re: Can't Get Enough Desktops!

Anonymous's picture

It would appear that the author never heard of the command

gdmflexiserver

Try it. Beats the -- :1 stuff hands down in most cases.

This requires that you have

Anonymous's picture

This requires that you have Gnome installed, though, right?

Re: Can't Get Enough Desktops!

Anonymous's picture

Sweet! Thanks.

Re: Can't Get Enough Desktops!

Anonymous's picture

>> Issue 119: Can't Get Enough Desktops! <<
>> Posted on Monday, March 01, 2004 by Marcel Gagn

Re: Can't Get Enough Desktops!

Anonymous's picture

qoute:
unfortunately XP vs Win9x and SMB athentication has always been a mistery to me, I like to setup a printer under linux using CUPS and share it to Windows using the internet printing protocol (IPP), which bypasses the SMB/SAMBA authentication stuff completely and most every OS uses. But I don't even know if RH9 still uses the (now obsolete) crappy LPD printing system or the much better CUPSD printing stuff.([L=here is a little overview for the terms with CUPS]http://www.hlug.org/presentations/cups/printing.html[/L])

To see if you are using cups, cups has a web-based configuration setup you can access thru [L=https://127.0.0.1:631/]https://127.0.0.1:631[/L]. If you can access that from your linux machine then check out [L=here]http://mumford1.dyndns.org/~bs7452/linuxhelp/cups.html[/L] and skip down to the section "add a printer" in step 4 and follow the steps that follow that. See if that makes sense, hopefully that will bypass the RH9's "helpfull" printer setup application and configure the printer for you.

Then for specific applications you may still have to specify in their printing configs to use the command "lpr" or "lpr -P printernameyouchoosed"

/qoute

Your a idiot.

Thanks for a good X Window System article

Anonymous's picture

We need more of these. X is powerful. It is multi-user at the GUI level as Linux / UNIX is at the command line level.

With all the current noise about replacing X, articles like this go a long way toward educating people as to what X is really about. It is my belief, that once they actually understand what it is they would be giving up, some of this noise may go away for a while.

Good Stuff, thanks again!

lj@opengeek.org

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState