You are not logged in.

#51 2013-07-26 03:02:27

hobarrera
Member
From: The Netherlands
Registered: 2011-04-12
Posts: 355
Website

Re: systemd 206 systemd --user problem

Stebalien wrote:

Actually, I ended up downgrading. The fact that the DBus daemon didn't run under X broke gnome-keyring.

I kept systemd-206, but now don't manage X with systemd.
.bash_profile runs startx, and startx starts my stuff (instead of systemd) now. Dbus works fine, and systemd doesn't manage my X session.
I'll roll my own replacement for systemd --user at some point, but I don't have the time just yet.

Offline

#52 2013-07-26 03:04:02

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: systemd 206 systemd --user problem

hobarrera wrote:
Stebalien wrote:

Actually, I ended up downgrading. The fact that the DBus daemon didn't run under X broke gnome-keyring.

I kept systemd-206, but now don't manage X with systemd.
.bash_profile runs startx, and startx starts my stuff (instead of systemd) now. Dbus works fine, and systemd doesn't manage my X session.
I'll roll my own replacement for systemd --user at some point, but I don't have the time just yet.

How are you starting dbus?


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#53 2013-07-26 04:33:30

hobarrera
Member
From: The Netherlands
Registered: 2011-04-12
Posts: 355
Website

Re: systemd 206 systemd --user problem

Stebalien wrote:
hobarrera wrote:
Stebalien wrote:

Actually, I ended up downgrading. The fact that the DBus daemon didn't run under X broke gnome-keyring.

I kept systemd-206, but now don't manage X with systemd.
.bash_profile runs startx, and startx starts my stuff (instead of systemd) now. Dbus works fine, and systemd doesn't manage my X session.
I'll roll my own replacement for systemd --user at some point, but I don't have the time just yet.

How are you starting dbus?

Through .xinitrc, with dbus-launch.
I've basically moved back to what I used before systemd --user:

.xinitrc
.xstart
(Note: that's old stuff, but helps as a reference, and still works tongue)

Offline

#54 2013-07-26 06:12:32

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
Website

Re: systemd 206 systemd --user problem

Stebalien wrote:

Actually, I ended up downgrading. The fact that the DBus daemon didn't run under X broke gnome-keyring.

I don't use gnome-keyring, so your guidance was still helpful. Either way, I hope a more official way is discovered soon; I don't like not being up-to-date.

All the best,

-HG

Offline

#55 2013-07-26 12:42:49

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: systemd 206 systemd --user problem

hobarrera wrote:

Through .xinitrc, with dbus-launch.
I've basically moved back to what I used before systemd --user:

.xinitrc
.xstart
(Note: that's old stuff, but helps as a reference, and still works tongue)

Got it. I thought you were still using `systemd --user` to manage some services and was wondering how you got dbus to play nicely with both `systemd --user` and your X session.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#56 2013-07-26 19:11:49

hobarrera
Member
From: The Netherlands
Registered: 2011-04-12
Posts: 355
Website

Re: systemd 206 systemd --user problem

Stebalien wrote:
hobarrera wrote:

Through .xinitrc, with dbus-launch.
I've basically moved back to what I used before systemd --user:

.xinitrc
.xstart
(Note: that's old stuff, but helps as a reference, and still works tongue)

Got it. I thought you were still using `systemd --user` to manage some services and was wondering how you got dbus to play nicely with both `systemd --user` and your X session.

Nope, I dropped systemd for managaing X <b> and </b> my user-services. smile
I've actually started creating my own software for this (a bunch of hacked-up scripts for now; but they work pretty well).

Offline

#57 2013-07-26 20:24:23

teekay
Member
Registered: 2011-10-26
Posts: 271

Re: systemd 206 systemd --user problem

I never used systemd --user to manage my X session (I use a login manager), just for custom user services like XBMC

└» ps -ef|grep "systemd --user"
tom       3186     1  0 21:58 ?        00:00:00 /usr/lib/systemd/systemd --user
└» systemctl --user start xbmc
Failed to issue method call: Process /bin/false exited with status 1

Er.. what on earth is it trying to tell me? Is this about the same issue as you guys are seeing?
The service file in question is really simple

[Unit]
Description=XBMC Media Center

[Service]
ExecStart=/home/tom/bin/start-xbmc.sh

[Install]
WantedBy=default.target

Is this a bug, or did they kill off a great feature?

Offline

#58 2013-07-26 23:14:20

msthev
Member
Registered: 2012-04-05
Posts: 177

Re: systemd 206 systemd --user problem

Those messages can be really unhelpful… In this case, systemctl --user needs a valid address for d-bus socket, so you probably didn't add $XDG_RUNTIME_DIR to /etc/systemd/system/user@.service (as posted on the first page).


@topic
From what I see most issues come from the fact that now systemd doesn't inherit variables from .profile (so things like $DISPLAY and $SHELL are not set). I see two solutions here:

  • Add `Environment(File)` to the main target of the user session and set all the variables there, or

  • Make the default target empty, then (from .profile/.xinitrc) use `systemctl --user set-environment` to set all desired variables, and then start the "real" target.

Anyone knows if it's going to get better in 207? I really hope $XDG_RUNTIME_DIR would be set by default, since the whole unit is pretty useless without it.

Last edited by msthev (2013-07-26 23:15:37)

Offline

#59 2013-07-29 01:52:02

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
Website

Re: systemd 206 systemd --user problem

Alright folks, I finally have systemd/user sessions up and running perfectly. It doesn't work quite the same (only real noticeable difference is that it doesn't auto-start on-boot, but instead starts automagically on first-login to TTY), but I actually like the new setup better. Here's my /etc/systemd/system/user@.service:

[Service]

TTYPath=/dev/tty1

Environment=DISPLAY=:0
Environment=XDG_CACHE_HOME=%h/.cache
Environment=XDG_CONFIG_DIRS=/etc/xdg
Environment=XDG_CONFIG_HOME=%h/.config
Environment=XDG_DATA_DIRS=/usr/local/share/:/usr/share/
Environment=XDG_DATA_HOME=%h/.local/share
Environment=XDG_RUNTIME_DIR=/run/user/%U
Environment=SHELL=/usr/bin/zsh
Environment=LC_TIME=C
Environment=PATH=%h/.bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/core_perl
Environment=GTK_IM_MODULE=xim
Environment=QT_IM_MODULE=xim

And here's my /etc/systemd/system/user@1000.service.d/<myusername>.conf:

[Unit]
Description=User Manager for %I
After=systemd-user-sessions.service

[Service]
User=%I
PAMName=systemd-shared
Slice=user-%i.slice
Type=notify
ExecStart=-/usr/lib/systemd/systemd --user
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%U/dbus/user_bus_socket

[Install]
Alias=user@%i.service
WantedBy=multi-user.target

Hope this helps whoever is having issues with this.

All the best,

-HG

Offline

#60 2013-07-29 04:25:35

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: systemd 206 systemd --user problem

Thanks for that HalosGhost.  I tried it but, things were still a bit wonky for me.  I can't seem to figure out how to get my urxvtd.service, xrdb.service, or background.service to run.  I think the urxvtd.service is because it Requires=xrdb.service.  But it still does not explain why the other two don't run.  There is no mention of these things in the logs... but I can start them manually just fine.  Oh, and it is not that they fail... they just never even think about running. Odd...

Oh well, I'l okay with using startx for now.  I do like systemd --user, but it is not a deal breaker for me.

Offline

#61 2013-07-29 10:50:37

hobarrera
Member
From: The Netherlands
Registered: 2011-04-12
Posts: 355
Website

Re: systemd 206 systemd --user problem

WonderWoofy wrote:

Thanks for that HalosGhost.  I tried it but, things were still a bit wonky for me.  I can't seem to figure out how to get my urxvtd.service, xrdb.service, or background.service to run.  I think the urxvtd.service is because it Requires=xrdb.service.  But it still does not explain why the other two don't run.  There is no mention of these things in the logs... but I can start them manually just fine.  Oh, and it is not that they fail... they just never even think about running. Odd...

Oh well, I'l okay with using startx for now.  I do like systemd --user, but it is not a deal breaker for me.

Does xrdb.service have After=xorg.target and Requires=xorg.target? It should also be Type=oneshot

Offline

#62 2013-07-29 13:11:01

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: systemd 206 systemd --user problem

Yup... puzzling.

Offline

#63 2013-08-01 05:07:13

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
Website

Re: systemd 206 systemd --user problem

So, in related news, `systemd --user` automagically sources /etc/profile now, which, I believe, means we no longer have to hard-code our PATH variables in our .service files. Rejoice!

All the best,

-HG

Offline

#64 2013-08-05 14:10:22

Javafant
Member
Registered: 2012-04-02
Posts: 19

Re: systemd 206 systemd --user problem

HalosGhost wrote:

So, in related news, `systemd --user` automagically sources /etc/profile now, which, I believe, means we no longer have to hard-code our PATH variables in our .service files. Rejoice!

All the best,

-HG

Are you sure about this? PATH in the getty is different than the one in programs started by systemd user. The files in /etc/profile.d/ don’t seem to be sourced even though it’s specified in /etc/profile.

Offline

#65 2013-08-05 14:43:50

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
Website

Re: systemd 206 systemd --user problem

Javafant wrote:

Are you sure about this?

Not terribly, but it's certainly sourcing mine. I am absolutely certain it is sourcing my /etc/profile as I have completely removed my hard-coded PATHs and have only added things to the PATH in /etc/profile which are in my PATH now. I'm not sure if this is an upstream change or if something awesome and unexpected happened for me and me alone, but I can tell you with absolute certainty that /etc/profile is being sourced for me.

All the best,

-HG

Offline

#66 2013-08-05 15:14:30

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: systemd 206 systemd --user problem

I kind of remember reading not too long ago on [systemd-devel] that the systemd --system services try to keep an incredibly minimal (clean) environment form which to run.  But the systemd --user will actually inherit all of the environment of the user who is running it.  But I can't seem to find this email on gmane or in my mailbox... my search skill must be lacking today... I'l blame it on the fact that I just work up.

Offline

#67 2013-08-15 22:56:50

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: systemd 206 systemd --user problem

Besides this thread, is there anywhere discussing systemd --user? Seems to be a niche within a niche at the moment (systemd is still locked in at 204 here as I haven't found time to try to get it to work).


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#68 2013-08-15 23:15:47

hobarrera
Member
From: The Netherlands
Registered: 2011-04-12
Posts: 355
Website

Re: systemd 206 systemd --user problem

ngoonee wrote:

Besides this thread, is there anywhere discussing systemd --user? Seems to be a niche within a niche at the moment (systemd is still locked in at 204 here as I haven't found time to try to get it to work).

No, nothing.
As popular as it is, systemd still has no forum, or user mailing list (just the devel- one). There are no support channels, and asking for help in the list resulted in my email being moderated (and never made it through).
We're basically on our own, and no help from upstream.

Offline

#69 2013-08-15 23:51:47

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: systemd 206 systemd --user problem

That's probably because its meant to be integrated, not used. The main question is whether systemd --user is actually supported or whether its an oddity which is subject to change.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#70 2013-08-16 00:07:47

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: systemd 206 systemd --user problem

hobarrera wrote:
ngoonee wrote:

Besides this thread, is there anywhere discussing systemd --user? Seems to be a niche within a niche at the moment (systemd is still locked in at 204 here as I haven't found time to try to get it to work).

No, nothing.
As popular as it is, systemd still has no forum, or user mailing list (just the devel- one). There are no support channels, and asking for help in the list resulted in my email being moderated (and never made it through).
We're basically on our own, and no help from upstream.

Hilarious.

mailing list: systemd-devel@lists.freedesktop.org
IRC: #systemd

FWIW, systemd --user has never been declared stable by upstream (compared to the myriad of other things which have been). It was "discovered" by curious users who hacked around the various problems it had at the time to make it work. Now it's different. Sorry, but you aren't going to get an sympathy.

Offline

#71 2013-08-16 01:09:00

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: systemd 206 systemd --user problem

Thanks indy, time to unroll the systemd --user setup then. A pity, it was quite enjoyable being able to use systemctl on user apps.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#72 2013-08-16 01:11:08

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: systemd 206 systemd --user problem

No one's saying that you can't use it. And, in fact, people are using it with systemd 206 (I am not one of them, nor was I ever). The point is that if it breaks, you get to clean up the pieces.

Offline

#73 2013-08-16 01:13:48

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: systemd 206 systemd --user problem

falconindy wrote:

No one's saying that you can't use it. And, in fact, people are using it with systemd 206 (I am not one of them, nor was I ever). The point is that if it breaks, you get to clean up the pieces.

Yeah I get that, but each of us has to choose whether its worth the effort/time, and if it ain't upstream-supported (yet?) then I'm not married to it. Bigger fish to fry, and all that.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#74 2013-08-16 01:17:07

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: systemd 206 systemd --user problem

More or less the conclusion I came to. Proper user session support requires the cooperation of dbus (kdbus) and Xorg (socket relocation). There's probably other things, but right now the focus for systemd upstream is kdbus since it's highly relevant for solving a bunch of other problems.

Last edited by falconindy (2013-08-16 01:17:39)

Offline

#75 2013-08-16 01:48:48

hobarrera
Member
From: The Netherlands
Registered: 2011-04-12
Posts: 355
Website

Re: systemd 206 systemd --user problem

ngoonee wrote:

That's probably because its meant to be integrated, not used. The main question is whether systemd --user is actually supported or whether its an oddity which is subject to change.

Integrated into what? DEs won't use it because it's linux-specific, and even less if there's no documentation of upstream response on how to upgrade.

falconindy wrote:

Hilarious.

mailing list: systemd-devel@lists.freedesktop.org
IRC: #systemd

FWIW, systemd --user has never been declared stable by upstream (compared to the myriad of other things which have been). It was "discovered" by curious users who hacked around the various problems it had at the time to make it work. Now it's different. Sorry, but you aren't going to get an sympathy.

If you read properly, you'll notice I said there's a devel list, but not one for users, and my request for help regarding the changes never made it past moderation.

ngoonee wrote:

Yeah I get that, but each of us has to choose whether its worth the effort/time, and if it ain't upstream-supported (yet?) then I'm not married to it. Bigger fish to fry, and all that.

The problem is upstream doesn't seen to say if it's supported or not, and even though changes were announced, the announcement and documentation is insuficient to keep a similar environment.

I opted to move away from systemd --user to something rolled by me - at least I know it'll be backwards compatible, even if I loose some fancy features.

Offline

Board footer

Powered by FluxBB