Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
transient service directory: XDG_RUNTIME_DIR "var/run/user/1
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Sun Feb 11, 2018 11:10 pm    Post subject: transient service directory: XDG_RUNTIME_DIR "var/run/u Reply with quote

For the last few months, I've been getting this every time I su from user to root.
Code:
dbus[19550]: Unable to set up transient service directory: XDG_RUNTIME_DIR "var/run/user/1000" is owned by uid 1000, not our uid 0
I get root OK, and while the message seems serious, nothing seems amiss, and my systems work normally. I suspected an update caused this at some recent point, and have looked around for references trying to understand what's going on, and get rid of this message.

Looked at "/var/run/user/1000" and it's owned by my main user "wrc" in the group root. Only user can view and modify content, and group and others are forbidden.

Doing a search for "Unable to set up transient service directory XDG" turns up lots of stuff, but mostly systemd related. Apparently, since my systems work perfectly notwithstanding the message, I'm not even sure I need to set up transient service directory "XDG_RUNTIME_DIR:. :?
I know this should be pretty basic stuff to understand, but can someone please enlighten me as to what's going on, and how to rid myself of this pestering message?
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11


Last edited by wrc1944 on Sat Feb 17, 2018 6:52 am; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Mon Feb 12, 2018 1:09 am    Post subject: Reply with quote

Consolekit / logind(systemd) should be setting $XDG_RUNTIME_DIR up, are you actually setting this manually? I also wonder why it's missing the first slash - this should be an absolute path to a temporary directory, usually in /run (ramdisk).

XDG = X Desktop Group - not a systemd thing, though related. It tries to make the individual desktop environments share similar setup so that if you change desktop environments, things still show up similarly from apps to desktop clutter, so to speak.

Do you have anything else in your login/rc scripts when su'ing that use dbus? When I su to root, XDG_RUNTIME_DIR still points to my user's XDG_RUNTIME_DIR but dbus does not emit that error.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21593

PostPosted: Mon Feb 12, 2018 1:20 am    Post subject: Reply with quote

When you su to root, exactly what command do you run? Specifically, do you use the form that resets the environment or the form that inherits parts of the original environment? If the latter, this could be as simple as that dbus assumes $XDG_RUNTIME_DIR will be owned by self and reacts badly when $XDG_RUNTIME_DIR is inherited from the old user. If so, the fix is to use /bin/su - so that the environment is reset.
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Mon Feb 12, 2018 5:16 pm    Post subject: Reply with quote

@eccerr0r & Hu,
Thanks very much for the replies. :)
The missing slash was a typo, sorry. The full command I always use is just su.
Code:
wrc@amd64 ~ $ su
Password:
dbus[17923]: Unable to set up transient service directory: XDG_RUNTIME_DIR "/var/run/user/1000" is owned by uid 1000, not our uid 0

/bin/su still gives the same type message, but I still get root, as always.:
Code:
wrc@amd64 ~ $ /bin/su
Password:
dbus[19545]: Unable to set up transient service directory: XDG_RUNTIME_DIR "/var/run/user/1000" is owned by uid 1000, not our uid 0
I can't find an XDG_RUNTIME_DIR, anywhere. My systems are running normally, with no problems. I do have an old user (kdetest) which I created years ago to trouble shoot some kde4 problems I was having, but as mentioned, this message only started a few months ago.

Not sure which login/rc scripts I'm supposed to be looking for. or where they would be. I looked in pam.d, & init.d, /var/logs, conf.d, etc., but can find nothing I though relevant about dbus and su logins.
In short, I'm still confused. :? What can I be missing missing?

Would it help if I logged into the "kdetest" user (after not doing so for many years) and see if the su message is also there? Or even just remove user kdetest entirely?
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Mon Feb 12, 2018 6:10 pm    Post subject: Reply with quote

Maybe this might help figuring out what's going on?:

Code:
wrc@amd64 ~ $ su
Password:
dbus[24155]: Unable to set up transient service directory: XDG_RUNTIME_DIR "/var/run/user/1000" is owned by uid 1000, not our uid 0
amd64 /home/wrc #
amd64 /home/wrc # tail /var/log/messages
Feb 12 12:56:18 amd64 su[23941]: pam_unix(su:session): session opened for user root by wrc(uid=1000)
Feb 12 12:56:24 amd64 su[23941]: pam_unix(su:session): session closed for user root
Feb 12 12:58:14 amd64 su[24012]: Successful su for root by wrc
Feb 12 12:58:14 amd64 su[24012]: + /dev/pts/2 wrc:root
Feb 12 12:58:14 amd64 su[24012]: pam_unix(su:session): session opened for user root by wrc(uid=1000)
Feb 12 12:59:01 amd64 cron[24052]: (root) CMD (rm -f /var/spool/cron/lastrun/cron.hourly)
Feb 12 13:00:01 amd64 cron[24083]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons)
Feb 12 13:01:20 amd64 su[24140]: Successful su for root by wrc
Feb 12 13:01:20 amd64 su[24140]: + /dev/pts/3 wrc:root
Feb 12 13:01:20 amd64 su[24140]: pam_unix(su:session): session opened for user root by wrc(uid=1000)
amd64 /home/wrc #

Since wrc can actually successfully su into root, and the system runs perfectly in all respects, is the dbus message in reality not relevant? It has become quite annoying. :roll:

After a reboot, it's different:
Code:
wrc@amd64 ~ $ su
Password:
dbus[3038]: Unable to set up transient service directory: XDG_RUNTIME_DIR "/var/run/user/1000" is owned by uid 1000, not our uid 0
amd64 /home/wrc #
amd64 /home/wrc # tail /var/log/messages
Feb 12 13:33:46 amd64 pulseaudio[2867]: [pulseaudio] pid.c: Daemon already running.
Feb 12 13:33:54 amd64 dbus-daemon[2578]: [session uid=1000 pid=2576] Activating service name='org.kde.kuiserver' requested by ':1.21' (uid=1000 pid=2697 comm="/usr/bin/plasmashell ")
Feb 12 13:33:54 amd64 dbus-daemon[2578]: [session uid=1000 pid=2576] Successfully activated service 'org.kde.kuiserver'
Feb 12 13:34:08 amd64 dbus-daemon[2578]: [session uid=1000 pid=2576] Activating service name='org.gtk.vfs.Daemon' requested by ':1.37' (uid=1000 pid=2907 comm="/home/wrc/Desktop/palemoon ")
Feb 12 13:34:08 amd64 dbus-daemon[2578]: [session uid=1000 pid=2576] Successfully activated service 'org.gtk.vfs.Daemon'
Feb 12 13:34:10 amd64 dbus-daemon[2578]: [session uid=1000 pid=2576] Activating service name='org.gnome.GConf' requested by ':1.39' (uid=1000 pid=2907 comm="/home/wrc/Desktop/palemoon ")
Feb 12 13:34:10 amd64 dbus-daemon[2578]: [session uid=1000 pid=2576] Successfully activated service 'org.gnome.GConf'
Feb 12 13:34:56 amd64 su[3025]: Successful su for root by wrc
Feb 12 13:34:56 amd64 su[3025]: + /dev/pts/1 wrc:root
Feb 12 13:34:56 amd64 su[3025]: pam_unix(su:session): session opened for user root by wrc(uid=1000)
amd64 /home/wrc # 

_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21593

PostPosted: Tue Feb 13, 2018 3:09 am    Post subject: Reply with quote

wrc1944 wrote:
The full command I always use is just su.
I was taught to always use /bin/su - so that $PATH was not needed and user environment did not leak through. Please try running /bin/su -l instead of plain /bin/su with no arguments.
wrc1944 wrote:
/bin/su still gives the same type message, but I still get root, as always.:
Right. I think you missed the explicit trailing dash in my prior message. Using /bin/su instead of su rules out any weirdness with su being an alias or matching some shadow program elsewhere in $PATH, but it still runs down the same paths inside the called tool. In particular, it still does not run the path that discards most of the user environment.
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Tue Feb 13, 2018 7:34 am    Post subject: Reply with quote

Thanks Hu,
I did figure that out earlier today after reading up on su, but you are correct, I did miss the trailing "-" after /bin/su you posted before. :oops:
I forgot I had known about the su - option, but having just used su for 15 years, it just skipped my mind.

While su - works great and there's no longer any message, I still haven't got an XDG_RUNTIME_DIR I can find. Where is it supposed to show up?

I'm still not understanding that if I do really need it, how can my kde DE or LXDE and xfce4 still run normally? I also changed the permissions on /var/run/user/1000, changing the group root from forbidden to Can view and modify content in hopes it would be able to generate XDG_RUNTIME_DIR. Didn't help any, and I doubt doing that is a good idea, or it wouldn't be forbidden by default.

One other minor thing- su - gets me to a root konsole, but all my gentoo command aliases in /root/.bash.rc no longer worked. Had to create /root/.bash.profile, and move them there, then they all worked. again.

Here's the output now:
Code:
wrc@gentoo-audio ~ $ su -
Password:
gentoo-audio ~ # tail /var/log/messages
Feb 13 01:58:11 gentoo-audio su[24361]: pam_unix(su:session): session opened for user root by (uid=1000)
Feb 13 01:58:20 gentoo-audio dbus-daemon[24371]: [session uid=0 pid=24369] Activating service name='org.kde.kded5' requested by ':1.0' (uid=0 pid=24367 comm="dolphin " label="kernel")
Feb 13 01:58:20 gentoo-audio dbus-daemon[24371]: [session uid=0 pid=24369] Activating service name='org.kde.ActivityManager' requested by ':1.0' (uid=0 pid=24367 comm="dolphin " label="kernel")
Feb 13 01:58:20 gentoo-audio dbus-daemon[24371]: [session uid=0 pid=24369] Successfully activated service 'org.kde.ActivityManager'
Feb 13 01:58:20 gentoo-audio dbus-daemon[24371]: [session uid=0 pid=24369] Successfully activated service 'org.kde.kded5'
Feb 13 01:58:25 gentoo-audio dbus-daemon[24371]: [session uid=0 pid=24369] Activating service name='org.kde.kuiserver' requested by ':1.0' (uid=0 pid=24367 comm="dolphin " label="kernel")
Feb 13 01:58:25 gentoo-audio dbus-daemon[24371]: [session uid=0 pid=24369] Successfully activated service 'org.kde.kuiserver'
Feb 13 02:12:41 gentoo-audio su[27520]: Successful su for root by wrc
Feb 13 02:12:41 gentoo-audio su[27520]: + /dev/pts/6 wrc:root
Feb 13 02:12:41 gentoo-audio su[27520]: pam_unix(su:session): session opened for user root by wrc(uid=1000)
gentoo-audio ~ #

_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21593

PostPosted: Wed Feb 14, 2018 3:31 am    Post subject: Reply with quote

/bin/su - causes the new shell to be a login shell. Per info bash, it is expected (if somewhat counterintuitive and of questionable value) that login shells read profile and do not read bashrc, while non-login shells (such as produced by /bin/su without the dash) read bashrc and do not read profile. I usually have my profile startup source bashrc to compensate for this.

Sorry, I cannot answer your questions about XDG_RUNTIME_DIR, other than to say that its permissions were likely correct before you changed them.
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Sat Feb 17, 2018 12:55 am    Post subject: Reply with quote

I finally found some relevant info on the Arch Linux Wiki page at https://wiki.archlinux.org/index.php/XDG_Base_Directory_support
Quote:
Only XDG_RUNTIME_DIR is set by default through pam_systemd. It is up to the user to explicitly define the other variables, using absolute paths that point to existing directories.
User directories

XDG_CONFIG_HOME
Where user-specific configurations should be written (analogous to /etc).
Should default to $HOME/.config.

XDG_CACHE_HOME
Where user-specific non-essential (cached) data should be written (analogous to /var/cache).
Should default to $HOME/.cache.

XDG_DATA_HOME
Where user-specific data files should be written (analogous to /usr/share).
Should default to $HOME/.local/share.

XDG_RUNTIME_DIR
Used for non-essential, user-specific data files such as sockets, named pipes, etc.
Not required to have a default value; warnings should be issued if not set or equivalents provided.
Must be owned by the user with an access mode of 0700.
Filesystem fully featured by standards of OS.
Must be on the local filesystem.
May be subject to periodic cleanup.
Modified every 6 hours or set sticky bit if persistence is desired.
Can only exist for the duration of the user's login.
Should not store large files as it may be mounted as a tmpfs.

To my mind, the statement "Only XDG_RUNTIME_DIR is set by default through pam_systemd" seems to mean that on open-rc init systems it would (or might not?) be set by default.
On my three Gentoo installs, I'm using open-rc, which might explain no XDG_RUNTIME_DIR being present by default.

However, on my testing box with Arch linux based Kaos using systemd, and several others like Mint, Ubuntu, and Mageia, all of which are systemd, but none have XDG_RUNTIME_DIR set by default. Makes me think most distros consider the XDG_RUNTIME_DIR doesn't need to be set by default for most users, and leave it to the user if they need it.

As all my system are running normally, the above statement "Used for non-essential, user-specific data files such as sockets, named pipes, etc" somewhat alleviates my concern about not having such a directory, even though the su command generates a message. Just a warning?

I'd be interested in knowing if any Gentoo users (systemd or open-rc) find it useful to have the XDG_RUNTIME_DIR set.
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Sat Feb 17, 2018 2:14 am    Post subject: Reply with quote

As I said above, consolekit (via a PAM plugin) will set it for you on openrc boxes - you do not and should not need to set it manually ... If it's not being automatically set, make sure your consolekit is installed properly and ensure your pam config files are up to date (etc-update/dispatch-conf).

If you're not using consolekit, chalk this one up to weird configurations that Gentoo has to deal with and you'll need to deal with it somehow...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Sat Feb 17, 2018 6:44 am    Post subject: Reply with quote

Thanks for all the advice, and it's much appreciated, but I'm not getting anywhere figuring out why this isn't working (getting an XDG_RUNTIME_DIR set).
As mentioned, all my Gentoo installs work fine, there are no outstanding etc-update config files (always keep current), I assume consolekit is properly installed (for years).
Pam, dbus, and consolekit are global USE flags.

What PAM plugin is needed? /etc/pam.d contains 41 config files, but I have no idea of how they should be correctly configured (.i.e. which control directives are correct for each line in every file).

I've read the Gentoo Pam wiki page, and many other pam, consolekit, and dbus pages for many distros, etc., etc.

I still must be missing something very basic, but at this point I'm stuck. :roll:
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Sat Feb 17, 2018 9:43 am    Post subject: Reply with quote

Apologies for getting a bit irate when the wrong things are being blamed. Systemd has sucked up too much crap, but this was NOT systemd's fault for the way things are - consolekit was the initial "solution" that systemd sucked up. Consolekit was even the second incarnation that Linux went through to deal with to get a unified desktop environment.

In any case, when you login with pam, the pam config /etc/pam/system-login is loaded.

There should be a line:
Code:
session            optional        pam_ck_connector.so nox11

This will tell any logins that use pam to go ahead and set up a consolekit session, which should set up your XDG_* directories and environment variables.

However now I'm confused and not sure what the state of your machine is. Were you setting XDG_* manually? You shouldn't - these should be set automatically by pam/consolekit. The directory should also be set up automatically. If you're manually creating these, something is wrong. Not having pam_ck_connector set up is one way to not get these set up.

How are you logging in? In the past, you had to run a consolekit-aware desktop manager to get a consolekit session, but now with the ck-connector, pam will let you get a consolekit session without an X display manager.

This excerpt is from my openrc-consolekit box, logged in via ssh and slightly obfuscated:
Code:
me@doujima:~$ echo $XDG_RUNTIME_DIR
/var/run/user/666
me@doujima:~$ ls -dl $XDG_RUNTIME_DIR
drwx------ 2 me root 40 Feb 16 23:54 /var/run/user/666/
me@doujima:~$ su
Password:
root@doujima:/home/me# echo $XDG_RUNTIME_DIR
/var/run/user/666
root@doujima:/home/me# ls -ald $XDG_RUNTIME_DIR
drwx------ 2 me root 40 Feb 16 23:54 /var/run/user/666

Supposedly it doesn't need to be owned by root despite I switched to root. Su does use pam, but there's still confusion what's actually triggering dbus on your machine to emit the error you're seeing.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Sat Feb 17, 2018 2:41 pm    Post subject: Reply with quote

eccerr0r,
Thanks much for all the help.
I've always used a DM to login, currently sddm since kf5 was released. Previous DMs over the last 15 years were kdm, gdm, lightdm.

I've never set any XDG stuff manually- never had to, or actually never even thought about XDG, or pam/consolekit. Everything just worked normally, and still does, except for su now having that message in the last 2-3 months. su - doesn't have the message.

Here's my current /etc/pam.d/system-login file. I've never edited any of the pam.d config files, or even thought about them. Never had the occasion to do so.
Quote:
auth required pam_tally2.so onerr=succeed
auth required pam_shells.so
auth required pam_nologin.so
auth include system-auth
account required pam_access.so
account required pam_nologin.so
account include system-auth
account required pam_tally2.so onerr=succeed
password include system-auth
session optional pam_loginuid.so
session required pam_env.so
session optional pam_lastlog.so silent
session include system-auth
session optional pam_ck_connector.so nox11
session optional pam_motd.so motd=/etc/motd
session optional pam_mail.so
I do have the line you mentioned:
Quote:
session optional pam_ck_connector.so nox11

BTW, consolekit and dbus are at default run level, and after updates I always carefully depclean, and then make sure system is consistent with revdep-rebuild.

FWIW, my /etc/pam.d/su file is:
Quote:

auth sufficient pam_rootok.so
auth required pam_wheel.so use_uid
auth include system-auth
account include system-auth
password include system-auth
session include system-auth
session required pam_env.so
session optional pam_xauth.so


Would the output of "equery d dbus" be helpful in understanding what's actually triggering dbus, or is there a better command which might offer more to-the-point info?
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Sat Feb 17, 2018 11:05 pm    Post subject: Reply with quote

Could you post the versions of

dbus
consolekit
polkit/policykit
shadow
pam

that you are using? None of my systems appear to match your setup (I have all sorts of systemd, openrc, gnome, xfce4, fvwm mixtures and can't match your setup.)

Also you should scrutinize your ~root/.bash*, ~root/.profile, etc. files just to be sure you don't have anything inexplicable there.

Another thing I'm curious of:
What if you run
Code:
$ pkexec

Does this too give you the dbus error, and when does it give it to you? Pkexec is the polkit "su" that actually is supposed to use the whole dbus chain along with the GUI. I would only expect 'su' to use dbus when going through pam.

Ultimately, I suppose you could just ignore that warning, as long as you're not using that temp directory, it's probably fine. But my systems do not have that error :D
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Sun Feb 18, 2018 12:37 am    Post subject: Reply with quote

Running pkexec in a konsole user terminal a kde type dialog box informing "Authentication is needed to run '/bin/bash as the superuser" pops up. I type my root password in, enter, and it takes me to root in the next terminal line, just like su used to do. NO DBUS ERROR, no message. Thanks for the polkit su tip! Wasn't aware of that. :)

My versions currently are:
sys-apps/dbus-1.12.4:0
sys-auth/polkit-0.113-r4:0
sys-auth/consolekit-1.2.1:0
sys-apps/shadow-4.5:0
sys-libs/pam-1.3.0-r2:0

no policykit installed

I have created (years ago) /root/.bashrc, and .bash.profile. with all my current Gentoo command aliases, like:
Quote:
# /etc/skel/.bash_profile

# This file is sourced by bash for login shells. The following line
# runs your .bashrc and is recommended by the bash info pages.
if [[ -f ~/.bashrc ]] ; then
. ~/.bashrc
fi

alias upgb="grub-mkconfig -o /boot/grub/grub.cfg"

alias ems="emerge --sync"
alias emsd="emerge --sync && epdn"

alias epd="emerge -upDv @world"
alias epdn="emerge -upDNv @world"
alias eukg="emerge -uD @world --keep-going"
alias eukgn="emerge -uDNv @world --keep-going"

alias ufd="emerge -ufD @world"
alias ufdn="emerge -ufDN @world"

alias x11d="emerge -av1 $(qlist -IC /x11-drivers)"

alias edep="emerge --depclean -pv"
alias dep="emerge --depclean"

alias rtp="rm -rfv /var/tmp/portage/*"

alias mkx="export $(dbus-launch) && make xconfig"
alias kern="make bzImage && make modules && make modules_install"

alias esn="eselect news list"
alias esnr="eselect news read"

I used to have the aliases only in .bashrc, but if I use su - instead of just su, the aliases fail, hence i added the bash.profile and they now work again. Also, just tried after getting root with pkexec, and they still work.

Forgot to mention: with xfce4 or lxde terminals, su has the error and message, but su - doesn't.

Also, my alias kdol="kdesu dbus-launch dolphin" in my /home/wrc/.bashrc works fine. "kdol "in a user terminal opens the kde dialog box for typing in the root password, and I get a nice root dolphin GUI, for convenience.

In other words, kdesu works, but a simple su gives the dbus error/message. :roll:
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11


Last edited by wrc1944 on Sun Feb 18, 2018 2:16 am; edited 2 times in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Sun Feb 18, 2018 1:37 am    Post subject: Reply with quote

Okay there's some new behavior going on that I can't duplicate because my machines are a bit behind in updates. Since I haven't upgraded to the versions you have, no wonder why I couldn't find anything. Will let you know later once I update, or if someone else is up to date they could investigate further...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Tue Feb 20, 2018 1:35 am    Post subject: Reply with quote

Just ran this in a user konsole terminal, and got:
Code:
wrc@amd64 ~ $ ck-list-sessions
Session1:
        unix-user = '1000'
        realname = '(null)'
        seat = 'Seat1'
        session-type = 'unspecified'
        session-class = 'user'
        session-state = 'active'
        active = TRUE
        x11-display = ':0'
        x11-display-device = '/dev/tty7'
        display-device = ''
        remote-host-name = ''
        is-local = TRUE
        on-since = '2018-02-19T17:10:41.967023Z'
        login-session-id = '2'
        XDG_RUNTIME_DIR = '/var/run/user/1000'
        VTNr = '7'
wrc@amd64 ~ $
XDG_RUNTIME_DIR = '/var/run/user/1000' still does not exist. I'm wondering if realname = '(null)' should instead be '(wrc)', who owns '/var/run/user/1000' and in fact IS user 1000?

As I logged into user wrc in sddm, shouldn't that cause ck/pam/dbus (or whatever) to set XDG_RUNTIME_DIR in /var/run/user/1000, as I assume is supposed to be the case?
realname = '(null)'

Or, do I need to manually edit some config file and replace realname = '(null)' with realname = '(wrc)'?

[Moderator edit: changed [quote] tags to [code] tags to preserve output layout. -Hu]
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Tue Feb 20, 2018 1:46 am    Post subject: Reply with quote

Real Name is gotten from your /etc/passwd gecos field, so if you didn't specify one, this is normal.
So now you're saying that /var/run/user/1000 doesn't exist when you login?

How about /var/run/user or even /var/run ?

/var/run should -> /run

/run/user should be owned by root:root and mode 755 .

I'm not sure who creates /run/user however, since /run usually is tmpfs.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Tue Feb 20, 2018 4:15 pm    Post subject: Reply with quote

Sorry- I wasn't clear. :oops:
I meant to say that /var/run/user/1000/XDG_RUNTIME_DIR/ still doesn't exist, which as I understand it is supposed to be created by default (or not?).

/var/run/user/ exists and is root:root 755., and /var/run/user/1000/ exists (owned by user) and is user:root 777.

/etc/passwd is root:root 644

/var/run is -> /run

OK- read up on /etc/passwd, and now realize that "realname = '(null)'" is the 5th field, and refers to and is for the user's actual REAL NAME and other personal info, NOT the Linux user's name, in my case "wrc".

Ah well, another foolish misunderstanding and the consequence of not doing enough basic reading of Linux documentation.... will I ever learn? :roll:
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Mon Feb 26, 2018 5:57 pm    Post subject: Reply with quote

eccerr0r & Hu,
After reading much on the "XDG_RUNTIME_DIR" which I don't seem to have (in /var/run/user/1000/), I noticed I do have the following 5 files there:

dolphinos4952.6.slave-socket (0B) socket
kdeinit5_0 (0B) socket
kdesud_:0 (0B) socket
klauncherTj3583.1slave-socket (0B) socket
KSMserver_0 (69B) plain text file

Further, I've come to realize these files were apparently created at the time of my last system boot up, and are specifically the exact files that countless items I've read say are precisely the types of files mentioned as being the ones that would be contained in the "XDG_RUNTIME_DIR".

Ive concluded that apparently Gentoo and my other distros are no longer using "XDG_RUNTIME_DIR" for the locations for these files, and are now defaulting to placing them in /var/run/user/1000/. That would explain why even though I don't have an "XDG_RUNTIME_DIR" created, I still have those so-called "non-essential" empty files (sockets) created, (in case they are needed), and confirmed by the fact that all my linux systems run normally without the"XDG_RUNTIME_DIR" existing .

Further, the error message when using "su" only in GUI terminals is caused by dbus, pam, and/or consolekit not knowing the default is now NOT the "XDG_RUNTIME_DIR", but instead /var/run/user/1000/.

At least that's my latest theory, and as long as these files are found in /var/run/user/1000/ all is OK.

Am I on the right track, or off base?

UPDATE: Weird- Never seen this before after 15 years of compiling kernels with make xconfig.
(mkx is my alias for:) "export $(dbus-launch) && make xconfig"

Code:
gentoo-main /usr/src/linux-4.15.6-gentoo # mkx
  HOSTCC  scripts/basic/fixdep
  CHECK   qt
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  MOC     scripts/kconfig/qconf.moc
  HOSTCXX scripts/kconfig/qconf.o
  HOSTLD  scripts/kconfig/qconf
scripts/kconfig/qconf  Kconfig
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
#
# using defaults found in arch/x86/configs/x86_64_defconfig
#
    (This is where I do the kernel config process, and then save)

#
# configuration written to .config
#
gentoo-main /usr/src/linux-4.15.6-gentoo #


I of course looked in tmp/runtime-root, and sure enough I found two just created kdeint5_0 and klauncherTJ4165.1.slave-socket files. Both have 0 B.

I assume this is normal, but why would it be occurring in the mkx output now, and never before? Of course in the above I'm root, and the XDG_RUNTIME_DIR is not set (as when I "su" to root).

In both cases, the "socket" files are being created, but without an XDG_RUNTIME_DIR. I guess I should no longer worry about this apparently "non-problem," but it's still bewildering not to completely understand why or how this is going on. :? Any insight is greatly appreciated. I'd chalk this up to some sort of strange qt/kde quirk, but it also happens ( no XDG_RUNTIME_DIR) in LXDE , or xcfe4.
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1654

PostPosted: Fri Jun 28, 2019 1:44 am    Post subject: Reply with quote

Greetings did you ever figure this out?
I have the same issue
https://forums.gentoo.org/viewtopic-t-1098206-highlight-.html
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Wed Jul 03, 2019 4:09 pm    Post subject: Reply with quote

turtles,
I never really "figured it out", but after looking at this thread again I've decided it doesn't seem to matter in any relevant way to the normal functioning of my three Gentoo systems, and thus have essentially have lost interest.

Of course I'd look at any brief and concise explanations or conclusions posted.

In other words, I guess it's one of those "if it ain't really broke, stop worrying about fixing it" situations. :roll:
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
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