Start fvwm on remote machine??

I have just installed Cygwin on winXP and there I was able to start the Xserver and ssh into another machine that is also running fvwm and in a xterm just type fvwm2. Then I would have the whole fvwm desktop from this remote machine in a seperate window while have WinXP in the background.

Now I have just tried the same in Ubuntu Linux but I get this error:

app-2 ~ > fvwm2
[FVWM][SetupICCCM2]: <> another ICCCM 2.0 compliant WM is running, try -replace
app-2 ~ >

Is it only through Cygwin that it is possible to run a WM from another system while running the own OS at the same time?

[color=red]Edited by theBlackDragon:
–> Moved from Basic questions, this is not really an Fvwm question as the same goes for every window manager in existence…[/color]

You canb only run one wm per X-display. With cygwin you don’t really have any wm on the display, and when you run fvwm on the remote machine it will take over the control of the cygwin X-server.

To acive what you want on linux/unix you would want to use vnc and tunnel it over ssh.

Do youknow of a place with more detailed info. I currently don’t have VNC installed and when I look in synaptic there are quite many programs called VNC

I have now installed the programs that should be needed, I have then tried:

ssh -Y -L 5902::5901 -l

I then get a shell from the remotehost and I try to run the window manager on this host

brok ~ > fvwm2
[FVWM][SetupICCCM2]: <> another ICCCM 2.0 compliant WM is running,
try -replace
brok ~ >

Any ideas?

Whilst this is technically correct, Xnest gets around this problem. :slight_smile:

– Thomas Adam

I have tried Xnest but I often experience that it suddenly just crashes (Xnest window containing remote window manager suddenly disappears). I think its a bug in Xnest because when I do the same thing from winXP with Cygwin I never experience crashes.

Here is what I do.

I ssh in to the remote host and get a remote shell. In that shell I type:

Xnest :1 -geometry 1280x1024 &

followed by:

fvwm2 -s -display :1

If I drag the Xnest window to much around the other virtual desktops it suddenly just disappears.

I encountered a similar problem with Xnest a
few years ago :
when I resized Xnest window to a bigger size,
it often crashed. Here is the turnaround I found
at that time : launch a BIG Xnest, as big as the
screen (and perhaps a little more) :exclamation:

something like Xnest -geometry 1600x1200

Then resize it to your need. Xnest never crashed
again after move/resize. Weird isn’t it ?

Hope this helps.

If your client system is an Ubunut box, and you don’t want to replace the current running window manager, you could start a second Xsession on vt8 and run fvwm from your other system there.

Hit ctrl+alt+f2, log in, type startx – :1
That will load your default window manager on vt8 with display set to :1
Open up an xterm, ssh -X -Y whomever@whatever_host
Then, in that ssh session, run fvwm -replace

Then you can switch between your two X sessions by hitting ctrl+alt+f7 and ctrl+alt+f8.

I can’t make it work and now I have an x running on ctr-alt-F8 that I cannot shut down.

How do I get that x closed that is on F8?

I got it fixed.

When I have another X running on F8 i opens as gnome. In that X I have tried as you said to open a xterm an type fvwm2 -replace (just trying to do it on my own system before I make the ssh session).

Then I get the virtual desktops and my FvwmDock, but gnomes menu is still at the top and the background is still gnome.

When I log out I see my fvwm wallpaper just for a short seconf.

Why do I get this wierd mix of fvwm and gnome when I type:

fvwm2 -replace?

Probably because Fvwm then only replaces the windowmanager, so all the other Gnome desktop components keep on running happily. So nautilus keeps on setting the wallpaper etc.

ok then there are no way to effeciently change the window manager in linux?

It works flawless in winxp with cygwin, a shame that it is not possible to download/install cygwin for linux when its superior to linux regarding multiple X sessions.

There is – but it depends on the mechanism used to start X11 in the first instance. If you use XDM or startx, then they both honour ~/.xsession by default (startx historically will use ~/.xinitrc, although if that does not exist, it will use ~/.xsession).

Other display managers use other mechanisms – indeed, if you use GDM and KDM, I believe their ‘failsafe’ option will default to reading ~/.xsession as well.

As for graphical means – XDM and a program called ‘selectwm’ are quite nice together.

You’re suffering from a severe misunderstanding if you believe that – it doesn’t even make any sense.

– Thomas Adam

Yeah, you’re not exactly attempting to do a typical operation. Switching window managers is usually done locally, but you want to be able to run fvwm back to your system from some remote host and I’m not sure any graphical tools have such an option (actually, gdm may…). If you wanted a single command to do it for you, you’d need to set up a script that would do the following, and then invoke that script.

Because I don’t know enough about X authentication, you’ll have to run this script from a console, otherwise it wont be able to connect to the server it’s starting on :1. So hit ctlr+alt+f1 and login and execute it there.

REMOTE_COMMAND=fvwm -replace

if [ $# -eq 0 ]; then
   #When the script is called with no args, this block executes:
   X -nolisten tcp -noreset $DISPLAY &
   sleep 2
   xterm -e $0 okay
   #When called with any args, this block executes:
   echo Attempting to connect to $REMOTE_HOST via ssh...

Copy and paste this script to a file, edit the REMOTE_HOST and REMOTE_USER, then chmod 755 it, switch to a vt, and invoke it.

Note: If ssh needs a username and password, it should prompt you. I couldn’t test this aspect because I haven’t access to a remote system that doesn’t already have my keys.