Bug 243549 - x11/cde: Can't start dtspc, dtcms or /usr/local/dt/bin/Xsession
Summary: x11/cde: Can't start dtspc, dtcms or /usr/local/dt/bin/Xsession
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Chris Rees
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-23 19:30 UTC by Mohamed Akram
Modified: 2021-02-10 20:26 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (crees)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mohamed Akram 2020-01-23 19:30:16 UTC
# service dtspc start
Starting dtspc.
usage: daemon [-cfrS] [-p child_pidfile] [-P supervisor_pidfile]
              [-u user] [-o output_file] [-t title]
              [-l syslog_facility] [-s syslog_priority]
              [-T syslog_tag] [-m output_mask] [-R restart_delay_secs]
command arguments ...
/usr/local/etc/rc.d/dtspc: WARNING: failed to start dtspc

# service dtcms start
Starting dtcms.
usage: daemon [-cfrS] [-p child_pidfile] [-P supervisor_pidfile]
              [-u user] [-o output_file] [-t title]
              [-l syslog_facility] [-s syslog_priority]
              [-T syslog_tag] [-m output_mask] [-R restart_delay_secs]
command arguments ...
/usr/local/etc/rc.d/dtcms: WARNING: failed to start dtcms

It seems the issue is that the `pidfile` variable in the rc.d script is used before it's defined. After solving that, dtcms starts but dtspc doesn't seem to:

# /usr/local/dt/bin/dtspcd; echo $?
1

Not sure what's the issue there.

--

$ /usr/local/dt/bin/Xsession
-sh: /usr/local/dt/bin/Xsession: not found

There is a missing runtime dependency on ksh93, and I had to manually install it via pkg for CDE to work.

Side note: The instructions are also off - it should be `ln -s %%PREFIX%%/dt/bin/Xsession ~/.xinitrc` for `startx` to work.
Comment 1 Chris Rees freebsd_committer freebsd_triage 2020-01-25 19:50:33 UTC
Thanks for the RC script investigation- I don't use them myself, which is why I hadn't seen the issue.  I don't understand why it didn't show up in testing, perhaps I hadn't built the package with them when trying them out.

Do you have rpcbind running?  You need it for dtspc.

Also, the dtspc rc script puts the link for /usr/dt in- I suspect that may be your issue with Xsession.
Comment 2 Mohamed Akram 2020-01-26 06:09:45 UTC
(In reply to Chris Rees from comment #1)

I do have rpcbind running. CDE works without dtspc so it's not a big issue. It also seems like some additional setup needs to be done - https://forums.freebsd.org/threads/installing-cde-on-freebsd.55125/page-3.

I don't think that's the issue with Xsession as it was fixed by installing ksh93. It seems ksh93 is only listed as a build dependency that's why there's an issue when using pkg to install CDE.

$ head -n 1 /usr/local/dt/bin/Xsession
#! /usr/local/bin/ksh93
Comment 3 commit-hook freebsd_committer freebsd_triage 2020-02-13 20:42:50 UTC
A commit references this bug:

Author: crees
Date: Thu Feb 13 20:42:46 UTC 2020
New revision: 526065
URL: https://svnweb.freebsd.org/changeset/ports/526065

Log:
  Mark BROKEN on head, and make a couple of rc script fixes

  PR:		ports/243549
  Submitted by:	Mohamed Akram

Changes:
  head/x11/cde/Makefile
  head/x11/cde/files/dtcms.in
  head/x11/cde/files/dtspc.in
Comment 4 Chris Rees freebsd_committer freebsd_triage 2020-02-13 20:43:42 UTC
I've rearranged the rc scripts now, thanks, but I think actually dtspc needs running from inetd.

I'll look at making inetd.conf.d to make this work better with ports.
Comment 5 Chris Rees freebsd_committer freebsd_triage 2021-02-10 20:26:47 UTC
OK, I'm not going to modify inetd just for this fossil :)

However, I've found the dtlogin issue.  You need to:

# echo allowed_users=anybody >> /usr/local/etc/X11/Xwrapper.config

https://sourceforge.net/p/cdesktopenv/tickets/88/