Subject: FVWM: fvwm Restart re-arranges konsole sessions

From: stu <[email-masked]>
Date: Mon, 15 Dec 2003 16:58:10 +0200

I have three individual konsole sessions running. Whenever I restart
fvwm, the konsole sessions are re-arranged ie : 

Before Restart
--------------
DesktopPage 3  : konsole session 1
DesktopPage 4  : konsole session 2
DesktopPage 10 : konsole session 3

After Restart
-------------
DesktopPage 3  : konsole session 3
DesktopPage 4  : konsole session 1
DesktopPage 10 : konsole session 2

The re-arranging does not seem to follow any pattern, except that it
seems to happen after every restart (using fvwm's 'Restart' command). 

Why is this happening?
How would I prevent this from happening?

I have one desktop with a size of 10x2.

I am running Debian sid, fvwm 2.5.8, XFree86 version 4.3.0 .

Thanks!

-- 
Stuart Logie
Programmer

UNIVERSAL COMPUTER SERVICES (PTY) LTD
A member of South Africa's largest retail software vendor, the UCS Group

Tel : (011) 712 1371   Cell : 082 902 5632
Fax : (011) 339 3421
Internet : http://ucs.co.za

"I am the Unconquerable Spirit."
               -- Poet Unknown
   
Powered by Debian GNU/Linux - testing/unstable
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 15 Dec 2003 13:59:11 +0000

> fvwm, the konsole sessions are re-arranged ie : 

It seems like you run fvwm under some session manager, like ksmserver.

So either don't do this, i.e. put "fvwm" as the only program of your
~/.xinitrc, or ask konsole developers to add XSMP support that konsole
seems to lack (otherwise there would be the unique id for each konsole
window and no heuristical guess-by-name is needed).

Another solution is to use unique window name for your konsole
windows, but as I said, this is not needed if konsole supports
XSMP properly.

It is also possible that something just does not work well together
(fvwm, ksmserver, konsole etc). In this case you may debug the problem
if possible and report your results.

Note that if you indeed use a session manager than you should experience
the same problem (I think) when you exit your the session manager and
start it again, then the saved konsole windows may be randomly switched.
But I can only guess here, there is no enough information.

Regards,
Mikhael.

---

From: stu <[email-masked]>
Date: Mon, 15 Dec 2003 19:16:56 +0200

On Mon, 15 Dec 2003 13:59:11 +0000
Mikhael Goikhman <[email-masked]> wrote:

> > fvwm, the konsole sessions are re-arranged
> > 

No I don't. fvwm is all I need :)

> ~/.xinitrc,

My ~/.xinitrc contains only the following :

xsetroot -solid black
xset r rate 400 80
# This pointer is ugly
xsetroot -cursor_name diamond_cross
xscreensaver &
exec fvwm &>fvwm.out 2>&1

> or ask konsole developers to add XSMP support that konsole

xwininfo returns the following id's for my konsole windows :

xwininfo: Window id: 0x2400005 "Shell No. 2 - Konsole"
xwininfo: Window id: 0x1200005 "Shell No. 3 - Konsole"
xwininfo: Window id: 0x1400005 "root@c9906:/home/stu/meerrs - Shell No.
6 - Konsole" 

AFAICS they all have unique window id's (or am I looking in the wrong
place maybe?)

> windows, but as I said, this is not needed if konsole supports

Could I provide unique window names for konsole to fvwm by using 
unique window titles for my konsole sessions? 

> (fvwm, ksmserver, konsole etc).

Possibly. As I stated above, I don't use any kind of session manager
with fvwm, but loading konsole causes the following kde related
processes to run (output from 'ps afx'):

19720 ?        S      0:00 kdeinit: Running...
19723 ?        S      0:00 kdeinit: dcopserver --nosid --suicide
19726 ?        S      0:00 kdeinit: klauncher
 9572 ?        S      0:01 kdeinit: knotify

Could any one of these be causing this problem?

> In this case you may debug the problem if possible and report your
> results.

As a beginning I started up window-maker, started 3 konsole sessions on
3 different desktops, numbered each one and restarted window-maker a few
times. Each session was on the correct desktop after the restarts.

I will try closing down all apps except konsole (when work is over) and
then checking if the problem persists. Do you have any advice as to how
I may further debug this problem, if this route is required?

-- 
Stuart Logie
Programmer

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 15 Dec 2003 16:41:53 +0100

> AFAICS they all have unique window id's (or am I looking in the wrong

Of course all windows have a unique window id, but these are given
by the X server and can be used by a different application if the
window dies in the mean time.  Therefore, they need a special SM
id too.

> Could any one of these be causing this problem?

I'm really just guessing, but klauncher sounds as if it might do
session management.

> I may further debug this problem, if this route is required?

To verify whether it's a SM problem or not, ./configure fvwm with
the --disable-sm option.  If the problem goes away, it has
something to do with session menagement.

Ciao

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 15 Dec 2003 16:28:18 +0000

> > > fvwm, the konsole sessions are re-arranged

What exactly do you mean by "DesktopPage 3"?
Desk 1, Page 0, 2  or something else?

> No I don't. fvwm is all I need :)

It is easy to determine whether fvwm is run under a session manager.
Open any xterm or FvwmConsole and execute: echo $SESSION_MANAGER  # if set

> exec fvwm &>fvwm.out 2>&1

I hope this is a typo, because this first "&" is incorrect, you should
run the window manager in foreground, if you run it in background then
some other process holds the X running (usually a session manager).

Ok, I need more input to continue.

Regards,
Mikhael.

---

From: stu <[email-masked]>
Date: Wed, 17 Dec 2003 13:13:38 +0200

On Mon, 15 Dec 2003 16:41:53 +0100

> window dies in the mean time.  Therefore, they need a special SM

How would one get the SM id for a window, or determine whether or not
one exists? 

> > > It is also possible that something just does not work well
> > > together(fvwm, ksmserver, konsole etc).
> > 
> > loading konsole causes the following kde related

No, klauncher works with dcop for KDE's inter-process communication.

> something to do with session menagement.

Although I don't have any kind of session-manager running, I will
give this a try.
 
> Dominik ^_^  ^_^

Thanks
-- 
Stuart Logie
Programmer

---

From: stu <[email-masked]>
Date: Wed, 17 Dec 2003 12:10:18 +0200

On Mon, 15 Dec 2003 16:28:18 +0000
Mikhael Goikhman <[email-masked]> wrote:

> > > > I have three individual konsole sessions running. Whenever I
> > > > restart fvwm, the konsole sessions are re-arranged
> > > > 
> > > > Before Restart
> > > > --------------

I should have been more specific. I have one desktop with a size of 10x2
(as stated in my original post), so :

DesktopPage 3  = Page 2 0
DesktopPage 4  = Page 3 0
DesktopPage 10 = Page 9 0

> > > > The re-arranging does not seem to follow any pattern, except
> > > > that it seems to happen after every restart (using fvwm's
> > > > 'Restart' command). 
> > > > 
> > > > Why is this happening?

I checked - it's not set. My whole aim in running fvwm is to have as
light a 'window management system' as possible running on my machine
- my work machine, never fast enough :( 

> > > So either don't do this, i.e. put "fvwm" as the only program of
> > > your~/.xinitrc,
> > 

Yes, this is a typo, (temporary code to get some of fvwm's error
messages) although fvwm runs perfectly well this way. I definitely do
not have a session manager running. 

Regards 

-- 
Stuart Logie
Programmer

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 18 Dec 2003 09:54:37 +0100

> How would one get the SM id for a window, or determine whether or not

By putting a printf into the code (somewhere in session.c).

Ciao

Dominik ^_^  ^_^