Re: [systemd-devel] systemctl user start Xorg

2014-11-03 Thread arnaud gaboury
>
> Perhaps
> /etc/X11/Xwrapper.config
> needs_root_rights = auto
> allowed_users = anybody

I placed the Xwrapper.config, but the xorg.service still fails

My unit files :

$XDG_CONFIG_HOME/systemd/user/xorg.service

[Unit]
Description=Xorg server at display :0
Requires=xorg.socket
After=xorg.socket

[Service]
ExecStart=/usr/bin/Xorg.bin -nolisten tcp :0 vt1

[Install]
WantedBy=wm.target



$XDG_CONFIG_HOME/systemd/user/xorg.socket

[Unit]
Description=Xorg Server Socket

[Socket]
ListenStream=/tmp/.X11-unix/X0

[Install]
WantedBy=sockets.target


$ systemctl --user status xorg
● xorg.service - Xorg server at display :0
   Loaded: loaded (/home/gabx/.config/systemd/user/xorg.service; enabled)
   Active: failed (Result: start-limit) since Mon 2014-11-03 17:40:09
CET; 2min 0s ago
  Process: 825 ExecStart=/usr/bin/Xorg.bin -nolisten tcp :0 vt1
(code=exited, status=1/FAILURE)
 Main PID: 825 (code=exited, status=1/FAILURE)

Nov 03 17:40:09 hortensia Xorg.bin[825]: (EE)
Nov 03 17:40:09 hortensia Xorg.bin[825]: Please consult the The X.Org
Foundation support
Nov 03 17:40:09 hortensia Xorg.bin[825]: at http://wiki.x.org
Nov 03 17:40:09 hortensia Xorg.bin[825]: for help.
Nov 03 17:40:09 hortensia systemd[759]: xorg.service: main process
exited, code=exited, status=1/FAILURE
Nov 03 17:40:09 hortensia systemd[759]: Failed to start Xorg server at
display :0.
Nov 03 17:40:09 hortensia systemd[759]: Unit xorg.service entered failed state.
Nov 03 17:40:09 hortensia systemd[759]: Starting Xorg server at display :0...
Nov 03 17:40:09 hortensia systemd[759]: xorg.service start request
repeated too quickly, refusing to start.
Nov 03 17:40:09 hortensia systemd[759]: Failed to start Xorg server at
display :0.


Xorg.0.log
---
...
[ 5.471] (++) using VT number 1

[ 5.471] (WW) xf86OpenConsole: setpgid failed: Operation not permitted
[ 5.471] (WW) xf86OpenConsole: setsid failed: Operation not permitted
[ 5.471] (EE)
Fatal server error:
[ 5.471] (EE) xf86OpenConsole: Cannot open virtual console 1
(Permission denied)
[ 5.471] (EE)


Thank you for any suggestions
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemctl user start Xorg

2014-10-30 Thread poma
On 30.10.2014 12:20, arnaud gaboury wrote:
...
> Oct 30 10:42:02 hortensia systemd[850]: Started Xorg server at display :0.
> Oct 30 10:42:02 hortensia xinit[12191]: /usr/bin/Xorg.wrap: Only
> console users are allowed to run the X server
> Oct 30 10:42:17 hortensia systemd[850]: xorg.service: main process
> exited, code=exited, status=1/FAILURE
> Oct 30 10:42:17 hortensia systemd[850]: Unit xorg.service entered failed 
> state.
...


Perhaps 
/etc/X11/Xwrapper.config
needs_root_rights = auto
allowed_users = anybody

man 1 Xorg.wrap


poma


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] systemctl user start Xorg

2014-10-30 Thread arnaud gaboury
Archlinux 3.16.3
systemd 216-3
startx at login prompt. No DM


I am slowly trying to use systemctl --user facilities.
Until now, I am able to start few basic user services. Now it is time
to start Xorg as a user service, but I can't manage to do it. As
documentation is currently very sparse, I must admit I am a little
lost when it comes to write the unit files. I can't even know if it is
feasible.

I have tried all kinds of things in my xorg.service file. Below are
two ways among others.
---
[Unit]
Description=Xorg server at display :0
Requires=xorg.socket
After=xorg.socket

[Service]
# ExecStart=/usr/bin/Xorg.bin -nolisten tcp vt$XDG_VTNR
 ExecStart=/usr/bin/xinit -- :0 -nolisten tcp vt$XDG_VTNR
--

Results are usually failed status. Here are some logs:
---
● xorg.service - Xorg server at display :0
   Loaded: loaded (/home/gabx/.config/systemd/user/xorg.service; static)
   Active: failed (Result: exit-code) since Thu 2014-10-30 10:22:34 CET; 39s ago
  Process: 11792 ExecStart=/usr/bin/Xorg.bin -nolisten tcp vt$XDG_VTNR
(code=exited, status=1/FAILURE)
 Main PID: 11792 (code=exited, status=1/FAILURE)

Oct 30 10:22:34 hortensia systemd[850]: Started Xorg server at display :0.
Oct 30 10:22:34 hortensia Xorg.bin[11792]: use: X [:] [option]
Oct 30 10:22:34 hortensia Xorg.bin[11792]: -a #
default pointer acceleration (factor)
Oct 30 10:22:34 hortensia Xorg.bin[11792]: -ac
disable access control restrictions
Oct 30 10:22:34 hortensia systemd[850]: xorg.service: main process
exited, code=exited, status=1/FAILURE
Oct 30 10:22:34 hortensia systemd[850]: Unit xorg.service entered failed state.
---
● xorg.service - Xorg server at display :0
   Loaded: loaded (/home/gabx/.config/systemd/user/xorg.service; static)
   Active: failed (Result: exit-code) since Thu 2014-10-30 10:42:17
CET; 1min 8s ago
  Process: 12191 ExecStart=/usr/bin/xinit -- :0 -nolisten tcp
vt$XDG_VTNR (code=exited, status=1/FAILURE)
 Main PID: 12191 (code=exited, status=1/FAILURE)

Oct 30 10:42:02 hortensia systemd[850]: Started Xorg server at display :0.
Oct 30 10:42:02 hortensia xinit[12191]: /usr/bin/Xorg.wrap: Only
console users are allowed to run the X server
Oct 30 10:42:17 hortensia systemd[850]: xorg.service: main process
exited, code=exited, status=1/FAILURE
Oct 30 10:42:17 hortensia systemd[850]: Unit xorg.service entered failed state.
---

I even tried to set $XDG_VTNR variable this way:
$ systemctl --user set-environment XDG_VTNR=1



Some info about my system:

gabx@hortensia ➤➤ ~ % systemctl --user status
● hortensia
State: running
 Jobs: 0 queued
   Failed: 0 units
Since: Thu 2014-10-30 11:09:46 CET; 18min ago
   CGroup: /user.slice/user-1000.slice/user@1000.service
   ├─852 /usr/lib/systemd/systemd --user
   ├─853 (sd-pam)
   ├─dbus.service
   │ └─2238 /usr/bin/dbus-daemon --session --address=systemd:
--nofork --systemd-activation
   ├─tmux.service
   │ ├─900 /usr/bin/tmux new-session -d -n irc irssi && zsh
   │ ├─901 zsh -c irssi && zsh
   │ └─906 irssi
   ├─urxvtd.service
   │ └─1394 /usr/bin/urxvtd -o -q -f
   ├─gpg-agent.service
   │ └─898 /usr/bin/gpg-agent --homedir
/home/gabx/.config/gnupg --daemon --write-env-file
/home/gabx/.config/gnupg/gpg-agent.info
   └/home/g─ssh-agent.service
 └─892 /usr/bin/ssh-agent -d -a /run/user/1000/ssh_auth_sock
-
gabx@hortensia ➤➤ ~ % systemctl --user show-environment
DISPLAY=:0
HOME=/home/gabx
LANG=en_US.UTF-8
LC_COLLATE=C
LOGNAME=gabx
MAIL=/var/spool/mail/gabx
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
SHELL=/usr/bin/zsh
USER=gabx
XDG_RUNTIME_DIR=/run/user/1000
--
gabx@hortensia ➤➤ ~ % systemd-cgls
├─1 /usr/lib/systemd/systemd
├─system.slice
│ ├─dbus.service
│ │ └─608 /usr/bin/dbus-daemon --system --address=systemd: --nofork
--nopidfile --systemd-activation
│ ├─lvm2-lvmetad.service
│ │ └─365 /usr/bin/lvmetad -f
│ ├─systemd-machined.service
│ │ └─843 /usr/lib/systemd/systemd-machined
│ ├─mysqld.service
│ │ └─519 /usr/bin/mysqld --pid-file=/run/mysqld/mysqld.pid
│ ├─adb.service
│ │ └─583 adb -P 5037 fork-server server
│ ├─systemd-journald.service
│ │ └─200 /usr/lib/systemd/systemd-journald
│ ├─system-devmon.slice
│ │ └─devmon@gabx.service
│ │   ├─ 549 /bin/bash /usr/bin/devmon
│ │   └─1098 /usr/sbin/udevil --monitor
│ ├─udisks2.service
│ │ └─2202 /usr/lib/udisks2/udisksd --no-debug
│ ├─systemd-timesyncd.service
│ │ └─463 /usr/lib/systemd/systemd-timesyncd
│ ├─systemd-logind.service
│ │ └─590 /usr/lib/systemd/systemd-logind
│ ├─systemd-networkd.service
│ │ └─675 /usr/lib/systemd/systemd-networkd
│ ├─systemd-udevd.service
│ │