You are not logged in.

#1 2017-03-25 18:34:18

DrTarncape
Member
Registered: 2017-03-25
Posts: 9

Console Display Manager: Problems with DBus

Dear Reader,
I currently have a problem with the Console Display Manager v0.6:
When I try to login as a normal user, following error message appears after I selected any Desktop Environment:


dbus-monitor: unable to enable new-style monitoring: org.freedesktop.DBus.Error.AccessDenied: "Rejected send message, 1 matched rules: type="method_call", sender=":1.126" (uid=1000 pid=16629 comm="dbus-monitor --system type=signal, interface=org.fr") interface="org.freedesktop.DBus.Monitoring" member="BecomeMonitor" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)". Falling back to eavesdropping.

The ".cdmxlog" file contains the following error:

/usr/lib/xorg-server/Xorg.wrap: Only console users are allowed to run the X server
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
Couldn't get a file descriptor referring to the console

However, login as root works perfectly fine.
I assume that is has something to do with the permissions of normal users.

Has anyone seen this problem or does anyone know how to fix this?

Thanks for your attention.

Last edited by DrTarncape (2017-03-26 10:12:00)

Offline

#2 2017-03-27 13:18:18

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Console Display Manager: Problems with DBus

please post /etc/cdmrc .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2017-03-27 18:04:28

DrTarncape
Member
Registered: 2017-03-25
Posts: 9

Re: Console Display Manager: Problems with DBus

cdmrc:

#!/bin/bash
#
# Example config file for cdm(1).
# Values set here is the default as in cdm(1).

# List of programs, commands with whitespaces should be quoted or escaped.
# If unset, all sessions in /etc/X11/Sessions or /usr/share/xsessions are
# offered as choices.
#
# (An example:)
# binlist=(
#   '~/.xsession'                    # Launch your X session,
#   '/bin/bash --login'              # or just execute your shell,
#   '/usr/bin/fbterm'                # or start a frame buffer console,
#   '/usr/bin/cdm ~/.submenu.cdmrc'  # or go to a submenu :)
# )

# List all program display names, one-by-one matched with $binlist.
# Names with whitespaces should be quoted or escaped.
#
# (Continued example:)
# namelist=('X session' Console FBTerm 'Sub menu')

# Type of the programs, one-by-one matched with $binlist.
# `C' for *C*onsole programs, which would be `exec'ed.
# `X' for *X* programs, which would be run with cdm-xlaunch(1).
#
# (Continued example:)
# flaglist=(X C C C)

# Style for the cdm dialog, which is printed with dialog(1).
# Default to unset, causing dialog(1) to use the system wide default.
# See /usr/share/doc/cdm/themes for some nice choices.
dialogrc=

# Index of the first item in the menu.
countfrom=0

# Set default display.
display=0

# Where should the first X tty be spawned?
# special value `keep' causes to run X in current tty.
xtty=7

# Should cdm(1) stick to the specified display?
locktty=no

# Use ConsoleKit for X session?
consolekit=yes

# Timeout for waiting for X session to register with ConsoleKit.
cktimeout=30

# Additional arguments to pass to X server, which is usually called as:
#   /usr/bin/X :$display "${serverargs[@]}" vt$((xtty+display))
# Arguments with whitespaces should be quoted or escaped.
serverargs=(-nolisten tcp)

# Alternative method of calling startx(/setsid). Should only be set if cdm
# does not start X as expected (bash -x shows call to setsid startx, but for
# no apparent reason does not start X).
# Only provided in the hope it may be useful, not a guaranteed fix.
altstartx=no

# Destination for stdout and stderr output from startx.
startxlog=~/.cdmxlog

(You can see, that I didn't modify cdmrc (I tried to modify it in various ways, attempting to fix the problem, but because it didn't work I reset it))

Last edited by DrTarncape (2017-03-27 18:12:05)

Offline

#4 2017-03-28 12:18:28

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Console Display Manager: Problems with DBus

Looked a bit deeper into cdm and i do have a hunch the problem may be related to X trying to run rootless and failing.

Some questions for clarification :

Has CDM ever worked on this system ?

output of pacman -Q cdm-git

do you have a /etc/X11/Xwrapper.config file ?
if so, post the content.

output of ls -l /etc/systemd/system/default.target


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2017-03-28 18:46:36

DrTarncape
Member
Registered: 2017-03-25
Posts: 9

Re: Console Display Manager: Problems with DBus

Ok,
-CDM never worked on this system: I installed this system recently, it's relatively new.

-pacman -Q cdm-git:

 cdm-git 1:r144.719b4a5-2

-No Xwrapper.config file in /etc/X11

Offline

#6 2017-03-28 19:32:03

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Console Display Manager: Problems with DBus

Have you tried using "keep" here:

# Where should the first X tty be spawned?
# special value `keep' causes to run X in current tty.
xtty=7

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2017-03-29 15:43:03

DrTarncape
Member
Registered: 2017-03-25
Posts: 9

Re: Console Display Manager: Problems with DBus

jasonwryan wrote:

Have you tried using "keep" here:

# Where should the first X tty be spawned?
# special value `keep' causes to run X in current tty.
xtty=7

I tried using "keep" as a temporary solution, but I didn't work.
Same error as always.

Offline

#8 2017-03-29 22:39:35

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Console Display Manager: Problems with DBus

What i think is happening is that CDM was written before running X rootless was possible.

try creating a /etc/X11/Xwrapper.config file with this content :

# Xorg.wrap configuation file
needs_root_rights = yes

If that solves the permission error but not the timeout, set consolekit=no in cdmrc .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#9 2017-03-30 18:35:57

DrTarncape
Member
Registered: 2017-03-25
Posts: 9

Re: Console Display Manager: Problems with DBus

Lone_Wolf wrote:

What i think is happening is that CDM was written before running X rootless was possible.

Is that likely, when CDM v0.6-source code was submitted to AUR in 2016?

Anyway, creating this file didn't help (same error as always) and "consolekit=no" just closes CDM immediately after selecting the WM/DE.

Offline

#10 2017-03-31 15:16:47

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Console Display Manager: Problems with DBus

Check the upstream url and when commits were made, https://github.com/ghost1227/cdm/commits/master

2017: 0
2016: 4 commits
2015: 0
2014: 4
2013: 20
2012 and earlier : 100+

The bulk of the code is pre-2014 .
I'm out of ideas, good luck.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#11 2017-03-31 17:40:37

DrTarncape
Member
Registered: 2017-03-25
Posts: 9

Re: Console Display Manager: Problems with DBus

Thanks for your help!
I think, I will continue trying to troubleshoot the problem until I found a solution (maybe need to rewrite some script code).

Offline

#12 2017-04-02 06:01:03

DrTarncape
Member
Registered: 2017-03-25
Posts: 9

Re: Console Display Manager: Problems with DBus

Quick update on the situation,
I found a second version of CDM: https://github.com/pale3/cdm
However this version has it's own problems:
Original CDM:
-Works perfectly fine, unless you are not root.
  -if you are not root, this version has problems with the permissions of the consolekit.

Pale3 CDM:
-Works for every user, but only starts standard X11, even if a different WM/DE is selected.

Offline

#13 2017-04-03 13:06:19

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Console Display Manager: Problems with DBus

pale3 fork is 2 commits ahead of cdm master and 4 behind.

Maybe pale3 preferred a selection mechanism in xintirc to start a certain WM or DE and removed the session choosing system in cdm ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#14 2017-04-03 17:48:22

DrTarncape
Member
Registered: 2017-03-25
Posts: 9

Re: Console Display Manager: Problems with DBus

Well,
in the changelog is written:

consolekit - is removed as it's obsolte and replaced by systemd logind 
thus not needed. (Line 14-15) 

The script launches it with:

if exec startx -- "${serverargs[@]}" > "$startxlog" 2>&1

Which would be in my case:

startx -- -display 7 -nolisten tcp tty7 > "$startxlog" 2>&1

(The Lines I checked are: 168-188 (Display code); 189-198 (tty code); 200-208 (startx code)

I don't see any launch arguments for a WM or DE and maybe need to add them.
I will look where the script defines the chosen WM/DE and try to add it!

Last edited by DrTarncape (2017-04-03 18:33:04)

Offline

#15 2017-04-05 13:19:43

DrTarncape
Member
Registered: 2017-03-25
Posts: 9

Re: Console Display Manager: Problems with DBus

Update:
I found a temporary solution: A simple bash script with a "read" line and a "if" line with preset "startx" commands.
(Only until I found a way to fix CDM)

Offline

Board footer

Powered by FluxBB