Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
startDM debugging - SOLVED
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 322
Location: USA

PostPosted: Fri Feb 03, 2023 9:30 pm    Post subject: startDM debugging - SOLVED Reply with quote

02/21/2023 edit by jankom: marked SOLVED, see p 2, last post.

I have customized my gentoo desktop installation (profile 5) to boot with slim login display manager with twm session. It has been working for awhile, but recently I notice an error message at the "default" stage of setting up services: ... yourXDM value is invalid... This comes from /etc/init.d/display-manager script which is basically a collection of functions. So I try to understand the boot process, what calls what, step-by-step. Despite the error message everything is fine, twm works, and exiting twm I can "halt" or "reboot" from slim with root pw.

It looks like the startDM defines tbe service name as "display-manager". My simple question: where is the "get-options" function or command that sets up the X environment for startDM or the display-manager service?

part of the startDM script is here:
Quote:
export RC_SVCNAME=display-manager
EXEC="$(get_options service)"
NAME="$(get_options name)"
PIDFILE="$(get_options pidfile)"

The ultimate question is: how can I eliminate the error message?

Respectfully submitted
jankom/janos


Last edited by jankom on Mon Feb 20, 2023 3:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1660

PostPosted: Fri Feb 03, 2023 9:38 pm    Post subject: Reply with quote

"get_options" is an OpenRC built-in command, which lives in /lib/rc/bin, to retrieve items set by "save_options" or "service_set_value"

Technically, it can be used outside of an OpenRC service by using the RC_SVCNAME environment variable to query any service's saved settings.
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 322
Location: USA

PostPosted: Fri Feb 03, 2023 10:43 pm    Post subject: Reply with quote

Thanks - understood. I continue my debugging to eliminate the error message, or as how to configure my system cleanly.

jankom/janos :?
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1530
Location: South America

PostPosted: Sat Feb 04, 2023 1:09 pm    Post subject: Re: startDM debugging Reply with quote

jankom wrote:
I have customized my gentoo desktop installation (profile 5) to boot with slim login display manager [...] I notice an error message at the "default" stage of setting up services: ... yourXDM value is invalid...

What is the name of the executable that you must call to start SLiM for your setup, and what did you set DISPLAYMANAGER to in /etc/conf.d/display-manager?
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 322
Location: USA

PostPosted: Sat Feb 04, 2023 2:58 pm    Post subject: Reply with quote

Quote:
What is the name of the executable that you must call to start SLiM
- this is what I don't know, trying to find out the procass, what calls what. The SLIM executable is
Code:
janos@andraslinux ~ $ which slim
/usr/bin/slim
but I don't know what calls it and at what point of the start up process.
As far as the DISPLAYMANAGER variable is concerned: I modified the /etc/conf.d/displaymanager file from distribution, changing "xdm" to "slim":
Quote:
# What display manager do you use ?
# [ xdm | greetd | gdm | sddm | gpe | lightdm | entrance ]
# NOTE: If this is set in /etc/rc.conf, that setting will override this one.
DISPLAYMANAGER="slim"
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1530
Location: South America

PostPosted: Sat Feb 04, 2023 7:16 pm    Post subject: Reply with quote

That looks correct. The message you see comes from the execution of this case ... esac branch:

/etc/init.d/display-manager
Code:
setup_dm() {
   local MY_XDM

   MY_XDM=$(echo "${DISPLAYMANAGER}" | tr '[:upper:]' '[:lower:]')
   case "${MY_XDM}" in
      # ...
      *)
         # first find out if there is such executable
         command="$(command -v ${MY_XDM} 2>/dev/null)"
         pidfile="/run/${MY_XDM}.pid"

         # warn user that they are doing sick things if the exe was not found
         if [ -z "${command}" ]; then
            eerror "ERROR: Your XDM value is invalid."
            eerror "  No ${MY_XDM} executable could be found on your system."
         fi
         ;;
   esac

   # ...

}

What's the output of command -v slim?
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 322
Location: USA

PostPosted: Sat Feb 04, 2023 8:22 pm    Post subject: Reply with quote

Yes, /etc/init.d/display-manager is a collection of functions that /usr/bin/startDM calls while startDM sets up the start-stop-daemon

Also, when I halt or reboot the shutting down process produces another error message on the console that "No matching service found" or something close while stopping various services for shut down.

As far as the output of that command is concerned:
Code:
janos@andraslinux ~ $ command -v slim
/usr/bin/slim
janos@andraslinux ~ $ su -c "command -v slim"
Password:
/usr/bin/slim
janos@andraslinux ~ $
and it is the same in X environment or if I open a console with CtrAltF1

Since I'm just a retired mechanical engineer and not a professional bash programmer I have to work hard to follow and understand all these bash script steps that lead to a working customized X environment.

Thank you for your interest in this subject.

When the machine boots up it finally presents a slim login screen (instead of a console to login). After I enter my login name and pw I'm in my gui twm environment. Exiting twm I'm back to the slim login screen where I can login as someboty else, haltt or reboot. This is simple enough for me and I'm in full cntrol.

jankom/janos
Back to top
View user's profile Send private message
colo-des
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2011
Posts: 97

PostPosted: Sun Feb 05, 2023 8:44 pm    Post subject: Reply with quote

If you look at the differences between the ebuilds xinit-1.4.1-r1.ebuild and xinit-1.4.1.ebuild, using diff or meld.
Code:

$ meld xinit-1.4.1.ebuild xinit-1.4.1-r1.ebuild

One realizes that the only difference is line 42:

Code:
xinit-1.4.1-r1.ebuild
41   exeinto /etc/X11
42   doexe "${FILESDIR}"/chooser.sh "${FILESDIR}"/startDM.sh
43   exeinto /etc/X11/Sessions

xinit-1.4.1.ebuild
41   exeinto /etc/X11
42   doexe "${FILESDIR}"/chooser.sh
43   exeinto /etc/X11/Sessions


I have the habit of making a compressed copy of /usr/portage/ before and after emerge --sync
then I can make comparisons to know the changes in behavior that I detect and undo them at will.
The only problem is that my local tree is already beginning to be its own distro away from the paths and decisions that are being taken in gentoo.

Between having to maintain a terrible local tree, to having to create my own ports to the crux with their Pkgfiles in bash, compared to
the .ebuild files and their EAPI eclass changes...I preferred to get away to the nearby lands of lfs/blfs via the crux ports of the
which I am already enjoying widely, I still have gentoo but I have not updated for a while.

But the world keeps turning and we must not get stuck in only what is known, above all we must remove the false feeling of flexibility of choice
...end up choosing one of the options that are offered to you on the tray ...no more people in the middle choosing the options that the tray will have.

Greetings.
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 322
Location: USA

PostPosted: Sun Feb 05, 2023 10:36 pm    Post subject: update - 02/05/2024 Reply with quote

@colo-des: interesting and thank you. If I understand correctly the emerge --sync created the otherwise innocent error messages on the console.

As far as debugging is concerned here is an update how far I got.

(1) display-manager
I put some printf statements in it, and yes, the MY_XDM value is correctly defined as "slim" (probably from /etc/confd). However, because "slim" is not one of the case stanza in the display-manager script the variable EXE is blank, leading to the innocent error message, True, the comment section of /etc/conf.d/display-manager file does not include slim as a legitimate choice - and I understand why: because slim has not been maintained for awhile. Btw, this script is run from openrc-run executable.

(2) startDM
I tried the same method of debugging to see what is happening, but neither printf nor eerror produced anything. The startDM in /usr/bin is mentioned in the last line of inittab. Actually, /usr/bin/startDM is a simple script using info provided by item (1) above: display-manager, and it initiates the start-stop-daemon for starting the specified MY_XDM, prepared by the process in (1) above. Since it could not populate the start-stop-daemon no daemon is started, and that explains the other innocent shotdown error message of "no mathing service...".

So my question: how come slim is still working including my twm?

Additional info:
Code:
rc-status default
does show display-manage, but probably as a dummy daemon due to the problems in items (1) and (2).
However dbus-launch ksysguard shows that slim is running, X is running, etc.

What starts slim? what starts X?

I do have an ~/.xsession file decorating the initial X window and activating the twm menu system (right click, left click menus) Exiting twm takes me briefly to console and then showing the slim login screen where I can login again or reboot or halt.

I realize this may be an academic question, but the resolution could also lead to further comment lines (enhancements) in the /etc/conf.d/display-manager file by explaining what is the correct way of adding a "non-standard" MY_XDM value. In fact , it should even be called MY-XDM, just MY-DM. But this is nit-picking.

jankom/janos
Back to top
View user's profile Send private message
colo-des
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2011
Posts: 97

PostPosted: Mon Feb 06, 2023 12:55 am    Post subject: Reply with quote

The display-manager-init package is a non-standard creation by gentoo developers.

https://gitweb.gentoo.org/repo/gentoo.git/tree/gui-libs/display-manager-init/display-manager-init-1.1.2.ebuild

The problem is for those who want the standard method of a lifetime.

https://forums.gentoo.org/viewtopic-p-8767736.html#8767736

Greetings.
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1530
Location: South America

PostPosted: Mon Feb 06, 2023 4:24 pm    Post subject: Re: update - 02/05/2024 Reply with quote

jankom wrote:
As far as debugging is concerned here is an update how far I got.

(1) display-manager
I put some printf statements in it, and yes, the MY_XDM value is correctly defined as "slim" (probably from /etc/confd).
Yes.

jankom wrote:
However, because "slim" is not one of the case stanza in the display-manager script the variable EXE is blank, [...]
Yes, "slim" is not explicitly listed in a case ... esac branch... so the "match anything" branch is taken. Which assumes that the value of DISPLAYMANAGER is the name of the display manager's executable. Variable command holds the result of command -v ${MY_XDM}. Which should be /usr/bin/slim according to your previous post. That's what should be debugged.

jankom wrote:
(2) startDM
I tried the same method of debugging to see what is happening, but neither printf nor eerror produced anything. The startDM in /usr/bin is mentioned in the last line of inittab.
... specifying a special "runlevel", A, which is used to mark on demand services. These are only executed with a specific telinit command.

startDM is only executed under special circumstances, when the /dev/ttyn special file opened by Xorg (usually 7) is referenced in /etc/inittab. Try:
Code:
grep -Eq '^[^#]+.*\<tty7\>' /etc/inittab || echo "Not referenced"

jankom wrote:
Actually, /usr/bin/startDM is a simple script using info provided by item (1) above: display-manager, and it initiates the start-stop-daemon for starting the specified MY_XDM, [...]
Nope, in normal cases /etc/init.d/display-manager directly calls start-stop-daemon (in an invisible default start() function) with ${MY_XDM}.

jankom wrote:
So my question: how come slim is still working including my twm?
Good question. Maybe the OpenRC script's start_pre() function's early exit does not prevent start() from running anyway.

jankom wrote:
What starts slim?
Supposedly, /etc/init.d/display-manager. What's the ouput of rc-service status display-manager once you log in?

jankom wrote:
what starts X?
SLiM.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 322
Location: USA

PostPosted: Mon Feb 06, 2023 5:37 pm    Post subject: Reply with quote

Thank you, thank you. This forum is the best (best people posting)f

Quote:
Variable command holds the result of command -v ${MY_XDM}. Which should be /usr/bin/slim according to your previous post. That's what should be debugged.
Yes, my printf shows /usr/bin/slim as the value of variable command after match anything. SLiM works fine. Instead of "debugging" I should've used the term "understanding". I'd like to understand how do I get to a working SLiM despite the innocent error message during boot.

I also understand from your post that "StartDM" is really activated by line "l0u:0:wait:/sbin/telinit u" in inittab file, and the output of your requested command is
Code:

andraslinux /home/janos # grep -Eq '^[^#]+.*\<tty7\>' /etc/inittab || echo "Not referenced"
Not referenced
andraslinux /home/janos #

Apparently
Quote:
Good question. Maybe the OpenRC script's start_pre() function's early exit does not prevent start() from running anyway.
Yes, this "Good question" is the missing link in my understanding of how do we get to a working SLiM.

As far as the service display-manager:
Code:
andraslinux /home/janos # rc-service status display-manager
 * rc-service: service `status' does not exist
andraslinux /home/janos # rc-service -e display-manager
andraslinux /home/janos # rc-service -e cupsd
andraslinux /home/janos #
I included cupsd just to see what the command output means. cupsd is active and working fine. According to this dispyay-manager is also OK. In fact rc-status defaul shows among all cupsd and display-manager [ started ].
However, maybe the stop_pre() or stop_post() functions produce the other innocent error message at shutdown.
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1530
Location: South America

PostPosted: Mon Feb 06, 2023 7:04 pm    Post subject: Reply with quote

jankom wrote:
I also understand from your post that "StartDM" is really activated by line "l0u:0:wait:/sbin/telinit u" in inittab file, [...]
No, the relevant line is:

Code:
# Used by /etc/init.d/display-manager to control DM startup.
# Read the comments in /etc/init.d/display-manager for more
# info. Do NOT remove, as this will start nothing
# extra at boot if /etc/init.d/display-manager is not added
# to the "default" runlevel.
x:a:once:/usr/bin/startDM

And the special telinit command that runs this is telinit a, which is used here:

/etc/init.d/display-manager
Code:
start_pre() {
   # ...
   if vtstatic "${CHECKVT:-7}" ; then
      if [ -x /sbin/telinit ] && [ "${SOFTLEVEL}" != "BOOT" ] && [ "${RC_SOFTLEVEL}" != "BOOT" ]; then
         ewarn "Something is already defined on VT ${CHECKVT:-7}, will start X later"
         telinit a >/dev/null 2>&1
         return 0
      else
         eerror "Something is already defined on VT ${CHECKVT:-7}, not starting"
         return 1
      fi
   fi
   return 0
}

jankom wrote:
[...] and the output of your requested command is
Code:

andraslinux /home/janos # grep -Eq '^[^#]+.*\<tty7\>' /etc/inittab || echo "Not referenced"
Not referenced

Note that the telinit invocation happens only if vtstatic "${CHECKVT:-7}" is true. Function vtstatic() si defined as:
Code:
# Check to see if something is defined on our VT
vtstatic() {
   if [ -e /etc/inittab ] ; then
      grep -Eq "^[^#]+.*\<tty$1\>" /etc/inittab
   elif [ -e /etc/ttys ] ; then
      grep -q "^ttyv$(($1 - 1))" /etc/ttys
   else
      return 1
   fi
   return
}

And that is the condition that you tested. It evaluates to false, so startDM is not executed. Which is consistent with the behaviour that you observed ("neither printf nor eerror produced anything").

jankom wrote:
Code:
andraslinux /home/janos # rc-service status display-manager
 * rc-service: service `status' does not exist
Sorry, my brains systemd'ed for a couple of seconds (systemctl inverts the arguments). The correct command is rc-service display-manager status.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 322
Location: USA

PostPosted: Mon Feb 06, 2023 10:08 pm    Post subject: Reply with quote

OK, I'm a slow leaner but getting there.
Code:
andraslinux /home/janos # rc-service display-manager status
 * status: started

What I understand now is:
(a) inittab starts services sysinit, boot and finally default - my case 3 is initdefault - see next point.

(b) All services defined by the distro and added by user with "rc-update <service> default" will be started after sysinit and boot. This includes display-manager which is executed by openrc as in first line of the script: "#!/sbin/openrc-run". During the process of display-manager functions in it are executed by openrc-run.
(b.1) function depend() is OK
(b.2) function setup-DM() produces the innocent error message, variable MY_XDM is unchanged as defined in /etc/conf.d/display-manager file. In my case it is "slim".
(b.3) function vtstatic() does nothing.
finally
(b4) function start_pre() calls the setup_DM function again, makes other checks but results in no change.

(b-c) so when (b) gets to starting display-manager it simply executes the slim command as defined in the match anything branch of start_DM function.

I'll try to modify the display-manager script adding "slim" as another branch to match. That should eliminate both innocent mesages.

Btw: looking at syslog files in /var/log I found that these error messages appeared after 2022 December 27 sync and update/grade. Prior to that there was a message: "No matching process found". OK - same difference.
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1530
Location: South America

PostPosted: Tue Feb 07, 2023 12:04 am    Post subject: Reply with quote

jankom wrote:
What I understand now is:
(a) inittab starts services sysinit, boot and finally default - my case 3 is initdefault - see next point.
Strictly speaking, it's the init program that starts services marked with sysinit and boot in inittab, but yes.

jankom wrote:
(b) All services defined by the distro and added by user with "rc-update <service> default" will be started after sysinit and boot.
Strictly speaking, unless init is told otherwise via the kernel command line, it's all services that inttab specifies that should be started in the runlevel named by the initdefault line, but yes.

On Gentoo, that runlevel is 3, and the runlevel 3 services are the agetty processes and the openrc default command, which starts all OpenRC services that belong to runlevel "default". These are services defined by the distribution, and those added with rc-update service default. Yes, there are both numeric sysvinit runlevels, and named OpenRC runlevels.

jankom wrote:
This includes display-manager [...]
Yes.

jankom wrote:
During the process of display-manager functions in it are executed by openrc-run.

(b.1) function depend() is OK
Yes.

jankom wrote:
(b.2) function setup-DM() produces the innocent error message, variable MY_XDM is unchanged as defined in /etc/conf.d/display-manager file. In my case it is "slim".
Not exactly. Next, function start_pre() is called, if it is defined, which, in display-manager's case, calls function setup_dm(). Now here's the thing. The message is only displayed if the condition in the enclosing if ... fi evaluates to true:

Code:
         if [ -z "${command}" ]; then
            eerror "ERROR: Your XDM value is invalid."
            eerror "  No ${MY_XDM} executable could be found on your system."
         fi

The condition would be [ -z "${command}" ], which means "the value of variable command is the empty string". Which would only be true if command -v ${MY_XDM} does not return anything. It's not clear for me if you continue to see those messages, or if they are old.

jankom wrote:
(b.3) function vtstatic() does nothing.
More specifically, function vtstatic() is called, and returns the result of evaluating grep -Eq "^[^#]+.*\<tty$1\>" /etc/inittab, which for you evaluates to false. And because the call to vtstatic() is the condition of an if ... fi block, and the condition is false, the enclosed telinit a command is not executed, and the /usr/bin/startDM script is never run. This part is expected behaviour in the most common setups. Then, display-manager's start_pre() function returns.

jankom wrote:
finally
(b4) function start_pre() calls the setup_DM function again, makes other checks but results in no change.

No. After start_pre() returns, if the OpenRC script does not have a start() function, it is as if an implicitly defined, default start() function was called. This default function calls start-stop-daemon for the program that is the value of the command variable (set by setup_dm() in display-manager's case), which should be /usr/bin/slim for you.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 322
Location: USA

PostPosted: Tue Feb 07, 2023 10:42 pm    Post subject: Reply with quote

I've studied all posts in this thread, and modified the display-manager script:
Code:
...
      sddm)
         command="/usr/bin/sddm"
         command_background=yes
         pidfile=/run/sddm.pid
         ;;
## JGK - 02/07/2023: added non-standard slim
      slim)
         command="/usr/bin/slim"
         pidfile=/run/slim.pid
         ;;
## end addition
      *)
         # first find out if there is such executable
         command="$(command -v ${MY_XDM} 2>/dev/null)"
         pidfile="/run/${MY_XDM}.pid"

         # warn user that they are doing sick things if the exe was not found
         if [ -z "${EXE}" ]; then
            eerror "ERROR: Your XDM value is invalid."
            eerror "  No ${MY_XDM} executable could be found on your system."
         fi
         ;;
   esac
First I only added the "command=..." part and the error message of Your XDM value is invalid disappeared, but the other while shutting down the system with slim, console: stopping display-manager: "No matching process found" remained. So I added the second line defining "pidfile=..." to no avail. Shutting down the display-manager service still could not find the matching service. Could it be because slim not only starts X but also stops it when executing the "/sbin/shutdown -h now" defined in slim.conf. OK, no big deal, I could be care less about an error while the system turns itself off anyway.

I have just one final question: where and what defines variable ${EXE} in the "sick things" section above that no longer produces the error message using the edited display-manager script?



.
Back to top
View user's profile Send private message
colo-des
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2011
Posts: 97

PostPosted: Thu Feb 09, 2023 7:06 pm    Post subject: Reply with quote

What is the reason to forcefully replace xdm with display-manager-init ?

Why would I stop using the xdm standard for something new that brings me complications ?

The solution is to stick with xdm by putting it in the local tree, but soon you'll have to do the same with slim
because if they don't find a way to make people stop using it, they will remove it from the official tree.

This is the game of cat and mouse and forgive me but what is at stake here is freedom of choice
what to use and how to use, the options on the tray are chosen by few people and the rest to obey ?.

This is shocking and it's a break, that's why I've told that I'm migrating from gentoo to lfs/blfs with package creation
binaries with their own crux-type ports where updating is no longer an obligation imposed by the distro
but because of the dependencies that one regulates by creating one's own ports.
I have already created 227 ports and many are missing but very happy for the total control I have now.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1660

PostPosted: Thu Feb 09, 2023 7:30 pm    Post subject: Reply with quote

colo-des wrote:
What is the reason to forcefully replace xdm with display-manager-init ?

Why would I stop using the xdm standard for something new that brings me complications ?


display-manager-init *is* xdm renamed.

The xdm script was passed around in different packages.
But, when it was suggested to be its own, wayland happened so they wanted to make it generic named.

Over time, it was updated by various authors but this might have been the same even if it wasn't renamed
Back to top
View user's profile Send private message
colo-des
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2011
Posts: 97

PostPosted: Thu Feb 09, 2023 8:05 pm    Post subject: Reply with quote

If it were just the name change, its operation should be the same and even in its MD5, but this is not the case.
I do not want to leave the standard of a lifetime but they forced in this way to accept the game or to abandon the game.

My local tree is a mess of EAPI changes with their eclass...all to create incompatibilities and make the install no longer work.

I do not criticize... I only expose, but for my part... I have abandoned the game.
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1530
Location: South America

PostPosted: Thu Feb 09, 2023 9:47 pm    Post subject: Reply with quote

jankom wrote:
Code:
...
      *)
         # first find out if there is such executable
         command="$(command -v ${MY_XDM} 2>/dev/null)"
         pidfile="/run/${MY_XDM}.pid"

         # warn user that they are doing sick things if the exe was not found
         if [ -z "${EXE}" ]; then
            eerror "ERROR: Your XDM value is invalid."
            eerror "  No ${MY_XDM} executable could be found on your system."
         fi
         ;;
   esac

I have just one final question: where and what defines variable ${EXE} in the "sick things" section above that no longer produces the error message using the edited display-manager script?

Why do you have "${EXE}" there? Gentoo's service script has "${command}" there... That's likely the real reason why the "your XDM value is invalid" message appears despite having DISPLAYMANAGER correctly set in /etc/conf.d/display-manager.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 322
Location: USA

PostPosted: Thu Feb 09, 2023 10:50 pm    Post subject: Exe Reply with quote

Interesting discussion about freedom of choice. Yes, and I prefer simplicity. I'd rather be in the driver's seat than sitting in the bus.

* When I boot the first thing is the slim login screen. I can login as user with pw or halt / reboot with root pw.

* After login as user my gui environment screen is presented, and the right click / left click menus of twm are active. This is my favorite gui environment, totally customized to my liking.

* While in my gui environment command top indicates that only X and slim are running (besides ini and some services set up for default run level). The interesting part is that according to top display-manager is nut running while "rc-service display-manager status" says it started. This explains the shutdown error message that the service was not found.

* My gui environment is defined and customized with my own decoration and twm menu system in the ~/.xsession file. This comes from /etc/X11/Sessions/Xsession.

If ~/.xsession file is not there I can create an ~/.Xclients file with a different X window decoration (programs started, running, background, etc.).

If ~/ has neither .xsession nor .Xclients file then $failsafe X window opens up with just an xterm in the top left corner and no decoration. The variable failsafe is defined by /etc/X11/Sessions/Xsession.

In the failsafe gui environment I can issue a "twm &" command in xterm which will make the twm right click / left click menu system available. Exiting twm stops the menu system.

If I issue the exit command in xterm it looks like X shuts down (briefly showing console) and the gui slim login screeen is presented.

Conclusion: display-manager starts slim based on the display-manager variable defined in /etc/confd, slim starts X.

I still don't understand how and when EXE is defined.
(a) if slim is not in the case-esac part of display-manager script XDM error is displayed because there is no EXE variable, yet slim starts.
(b) if slim is edited into case-esac then EXE is non-zero and no more XDM error.
What makes EXE non-zero?

jankom/janos
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1530
Location: South America

PostPosted: Fri Feb 10, 2023 2:30 pm    Post subject: Re: Exe Reply with quote

jankom wrote:
I still don't understand how and when EXE is defined.

The service script installed by gui-libs/display-manager-init-1.1.2 does not have EXE, see my previous post. I don't know why your script does.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Fri Feb 10, 2023 2:58 pm    Post subject: Reply with quote

Since this file is in /etc/init.d, it would be subject to CONFIG_PROTECT. Perhaps at some point that file on this system was modified in a way that Portage ceased to automatically replace it on updates, and a subsequent etc-update was either missed or executed incorrectly, such that /etc/init.d/display-manager on this system now is not what would be installed there on a clean system. If so, forcing Portage to reinstall the clean copy, and merging in any intentional local modifications, might fix this.
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 322
Location: USA

PostPosted: Fri Feb 10, 2023 3:38 pm    Post subject: clean system Reply with quote

Thank you both.
I definitely would like a clean system, especially because I manage two Gentoo installations: one at my home on a fitlet2 core and the other, a virtual server having its own public IP. That latter is my vpn host.
Please, help me to issue the proper commands. Yes, I may have inadvertently messed up something. On fitlet, my home machine, "eix-test-obsolete" complains:
Code:
Installed packages with a version not in the database (or masked):
[?] sys-apps/file (5.44-r3@02/07/23 -> 5.43-r1): Identify a file's format by scanning binary data for patterns
[?] sys-apps/portage (3.0.43-r1@02/07/23 -> 3.0.41-r1^t): The package management and distribution system for Gentoo
Found 2 matches
No message about display-manager, but problem with portage.

As a side note: The virtuel server has no X or gui, but the same profile as the fitlet2 home machine. That mechine has a much longer list of complaints for the eix-test-obsole command and the list does include portage(3.0.43...).

jankom/janos
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1530
Location: South America

PostPosted: Fri Feb 10, 2023 3:51 pm    Post subject: Reply with quote

For starters, I would emerge --oneshot gui-libs/display-manager-init, and see if this overwrites /etc/init.d/display-manager with a clean copy. You might have to do an etc-update after that, Portage will tell you if you must.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum