----------------
To: The CTWM Mailing List ([email protected]);
Subject: CTWM and XDM;
15.04.2025, 18:14, "Greg A. Woods" <[email protected]>:

At Tue, 15 Apr 2025 11:20:02 +0100, BC HABS <[email protected]> wrote:
Subject: CTWM and XDM


 XDM is started (no session manager/management) on boot . Once logged
 in, ctwm is loaded as the last command in xsession.

 when using f.restart, ctwm is closed down and not restarted with XDM
 login taking over ... unlike that which happened under twm, where
 f.restart simply restarted (e.g. for reflecting config file updates) .


Very odd behaviour!

I wonder if you might be able to find a clue either in the logs. The
code for doing a restart has printfs on both sides of the execvp(), so
you should always see the message "ctwm: restarting: ctwm ...", and if
you see the second message "ctwm: unable to restart: ctwm ..." then the
problem is that Ctwm is unable to exec itself.

        // Re-run ourself
        fprintf(stderr, "%s: restarting: %s\n", ProgramName, *Argv);
        execvp(*Argv, Argv);

        // Uh oh, we shouldn't get here...
        fprintf(stderr, "%s: unable to restart: %s\n", ProgramName, *Argv);

Unfortunately nothing about the cause of the error is printed, but just
knowing that's where the failure is should allow for further debugging.

Most X11 systems using XDM will have a system Xsesssion script that will
create an output file in $HOME, usually ~/.xsession-errors. It should
contain all the stdout and stderr from both itself and your ~/.xsession
script.
 

--
                                        Greg A. Woods <[email protected]>

Kelowna, BC +1 250 762-7675 RoboHack <[email protected]>
Planix, Inc. <[email protected]> Avoncote Farms <[email protected]>
 
Thank you for the reply.
 
Attached is a few errors taken from .xsession-errors
 
I was calling ctwm -f config as the last line in .xsession, but without an 'exec' upfront of it. Adding the 'exec' seems to have got rid of the 'segmentation fault' error (i've no idea why).
 
Removed the MenuBorderWidth (until I sort what its replacement is in ctwm).
 
The rest I dont follow. Is there anything in there that might be 'it' please ?
 
The problem of calling f.restart still dumps everything back to XDM login even so.
 
Regards
 
 
 
Good day ctwm@
 
Just to add to this 'old' post  after some time of experimenting and trying various things ...  re: ctwm not being able to be restarted (without it crashing out) or not starting from XDM etc.
 
I think...    only think...
 
That the issue with the CTWM problems experienced as reported (and a few other things)  are  as a result of not having any sort of     workspace definitions  in the  .ctwmrc   file
 
such as,
...
WorkSpaces
{

  "ws1" {"black"}
}
...
 
What I noticed was that  without such,  CTWM would sometimes fail to start up   after logging in using XDM .  CTWM would try and then just fail and so XDM would kick back in.   After a few login attempts, for whatever reason,  ctwm would eventually start.   It also would not 'restart' when it was running.
 
This caused a further 'test' to try just starting without XDM  and just using  e.g. xinit ::1  from a tty prompt   (which calls the xsession which calls ctwm as its last instruction).
 
The same behaviour presented ... ctwm would not start and X11 would terminate. After a few attempts it would.
 
Then came a period of looking at the ctwm source and other resources on the 'Net and  looking at the/my .twmrc file that had been converted to the .ctwmrc file and so on.
 
The main difference between ctwmrc examples and the one I use, was the inclusion of the 'workspaces' section.  I couldnt see anything else.
 
I didn't need/want 'workspaces', so first I looked to see if there was a build/compile flag to remove that fucntionality, but I didnt see one.
 
Therefore I added just one workspace definition and  lo and behold,  ctwm starts everytime,  as does using 'restart' which always dumped out as originally reported.
 
It seems that this at least has helped on the machine i was having problems with (I will try others as time moves on).
 
If it is possible to build *without* workspaces, then I haven found it,  or to not have that section in the .ctwmrc file and not have issues, but having just one  workspace defined is no hardship and it seems to have fixed the issues being experienced .... why I dont know.
 
regards
Habs
 
 

Reply via email to