[systemd-devel] [help][227] Enabling a user service breaks a little my system!
Jorge Araya Navarro
elcorreo at deshackra.com
Thu Nov 26 10:43:11 PST 2015
Inside GNU Screen:
--8<---------------cut here---------------start------------->8---
$ echo $XDG_SESSION_ID
--8<---------------cut here---------------end--------------->8---
Outside:
--8<---------------cut here---------------start------------->8---
$ echo $XDG_SESSION_ID
--8<---------------cut here---------------end--------------->8---
This is bad, right?
`loginctl`:
--8<---------------cut here---------------start------------->8---
$ loginctl --all
SESSION UID USER SEAT
c2 1000 jorge seat0
1 sessions listed.
--8<---------------cut here---------------end--------------->8---
and finally:
--8<---------------cut here---------------start------------->8---
$ systemctl status user@$UID.service
● user at 1000.service - User Manager for UID 1000
Loaded: loaded (/usr/lib/systemd/system/user at .service; static; vendor preset: disabled)
Active: active (running) since jue 2015-11-26 12:28:54 CST; 11min ago
Main PID: 3458 (systemd)
Status: "Startup finished in 47.257s."
CGroup: /user.slice/user-1000.slice/user at 1000.service
├─gvfs-daemon.service
│ ├─3758 /usr/lib/gvfs/gvfsd
│ └─3763 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
├─dbus.service
│ ├─3652 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
│ ├─3896 /usr/lib/GConf/gconfd-2
│ └─3987 /usr/bin/gnome-keyring-daemon --start --foreground --components=secrets
├─screen.service
│ ├─3467 /usr/bin/SCREEN -dmS autoscreen
│ ├─3468 /usr/bin/zsh
│ ├─4631 systemctl status user at 1000.service
│ └─4632 xclip -selection clipboard
├─emacs.service
│ ├─3471 /usr/bin/emacs --daemon
│ ├─3556 /usr/sbin/idn --quiet --idna-to-ascii --usestd3asciirules
│ ├─3767 /usr/sbin/aspell -a -m -B --encoding=utf-8
│ ├─3898 /usr/bin/zsh --login
│ └─4054 /usr/sbin/mu server
└─init.scope
├─3458 /usr/lib/systemd/systemd --user
└─3459 (sd-pam)
--8<---------------cut here---------------end--------------->8---
>> [1]: This makes no sense, I know, I should put such service in
>> `/etc/systemd/system/` and enable it
>> as screen at myusername. I'll make this transition as soon as I solve my
>> problem with systemd and
>> environment variables.
>>
>
> On the contrary, it makes much more sense than abusing system services to
> run per-user stuff.
But that would mean that after login out from a SSH session GNU Screen will be killed if no other
sessions left for my account, right?
El jueves 26 de noviembre del 2015 a las 0607 horas, Mantas Mikulėnas escribió:
> On Thu, Nov 26, 2015 at 8:33 AM, Jorge Araya Navarro <elcorreo at deshackra.com
>> wrote:
>
>> Hello!
>>
>> I'm suffering a issue with systemd's user services that I fixed only with
>> a workaround, but today I
>> want to fix this issue completely.
>>
>> I have created a user service which starts GNU Emacs, and another user
>> service which starts GNU
>> Screen[1], and enabled both.
>>
>> After rebooting my machine and login into my account, I get a pop up
>> asking me to unlock my keyring,
>> when it should be unlocked automatically after I login.
>>
>> Also, opening a shell and entering `systemctl --user` outputs the error:
>>
>> --8<---------------cut here---------------start------------->8---
>> $ LC_ALL=C systemctl --user
>> Failed to connect to bus: No such file or directory
>> --8<---------------cut here---------------end--------------->8---
>>
>
> This sounds like a weird PAM problem... Do your regular login sessions show
> up in `loginctl`? What $XDG_SESSION_ID do you see inside screen and outside?
>
> Is the `user@$UID.service` system service running?
>
>
>> [1]: This makes no sense, I know, I should put such service in
>> `/etc/systemd/system/` and enable it
>> as screen at myusername. I'll make this transition as soon as I solve my
>> problem with systemd and
>> environment variables.
>>
>
> On the contrary, it makes much more sense than abusing system services to
> run per-user stuff.
--
👋 Pax et bonum.
Jorge Araya Navarro
https://es.gravatar.com/shackra
More information about the systemd-devel
mailing list