Discussion:
[Dev] systemd: Failed at step STDIN spawing /usr/bin/weston-launch: Permission denied
Wu, Zhiwen
2014-01-07 10:28:02 UTC
Permalink
Hi All,
I have been trying to bring up a basic wayland image on Intel mobile device. I got blocked by running weston-launch in systemd user session. Actually, I copied what IVI does on systemd stuff for wayland, but it doesn't work for me. The error is:

"Jun 10 19:23:28 localhost systemd[217]: Failed at step STDIN spawning /usr/bin/weston-launch: Permission denied".

The related systemd setup for wayland is:
ln -s ../user-session-***@.service /usr/lib/systemd/system/graphical.target.wants/user-session-***@seat0-5000.service
ln -sf weston.target /usr/lib/systemd/user/default.target
ln -s ../weston.service /usr/lib/systemd/user/weston.target.wants

and the weston.service is:
============================================
[Unit]
Description=Weston
Requires=dbus.socket

[Service]
ExecStart=/usr/bin/weston-launch
StandardInput=tty
TTYPath=/dev/tty10

[Install]
WantedBy=weston.target
==============================================

Do I miss any points? Ps: I used kexec to boot the kernel.bak and add "security=none" to cmdline.bak to work around smack check.

Thanks
-----------
OTC PRC Visualization Team
Wu Zhiwen
Yang Chengwei
2014-01-07 12:46:25 UTC
Permalink
Post by Wu, Zhiwen
Hi All,
"Jun 10 19:23:28 localhost systemd[217]: Failed at step STDIN spawning /usr/bin/weston-launch: Permission denied".
ln -sf weston.target /usr/lib/systemd/user/default.target
ln -s ../weston.service /usr/lib/systemd/user/weston.target.wants
============================================
[Unit]
Description=Weston
Requires=dbus.socket
[Service]
ExecStart=/usr/bin/weston-launch
StandardInput=tty
TTYPath=/dev/tty10
Seems it failed to chown /dev/tty10 to the user but failed with
"Permission denied", what 'ls -l /dev/tty10' looks like.

It should be owned by the user and mode is 0620.

--
Thanks,
Chengwei
Post by Wu, Zhiwen
[Install]
WantedBy=weston.target
==============================================
Do I miss any points? Ps: I used kexec to boot the kernel.bak and add "security=none" to cmdline.bak to work around smack check.
Thanks
-----------
OTC PRC Visualization Team
Wu Zhiwen
_______________________________________________
Dev mailing list
https://lists.tizen.org/listinfo/dev
Kok, Auke-jan H
2014-01-07 18:21:17 UTC
Permalink
Post by Yang Chengwei
Post by Wu, Zhiwen
Hi All,
"Jun 10 19:23:28 localhost systemd[217]: Failed at step STDIN spawning /usr/bin/weston-launch: Permission denied".
ln -sf weston.target /usr/lib/systemd/user/default.target
ln -s ../weston.service /usr/lib/systemd/user/weston.target.wants
============================================
[Unit]
Description=Weston
Requires=dbus.socket
[Service]
ExecStart=/usr/bin/weston-launch
StandardInput=tty
TTYPath=/dev/tty10
Seems it failed to chown /dev/tty10 to the user but failed with
"Permission denied", what 'ls -l /dev/tty10' looks like.
It should be owned by the user and mode is 0620.
With user-session-launch you don't get to choose your tty number -
yet. Please try tty0 instead.

Auke
Yin Kangkai
2014-01-08 02:22:36 UTC
Permalink
Post by Kok, Auke-jan H
Post by Yang Chengwei
Post by Wu, Zhiwen
Hi All,
"Jun 10 19:23:28 localhost systemd[217]: Failed at step STDIN spawning /usr/bin/weston-launch: Permission denied".
ln -sf weston.target /usr/lib/systemd/user/default.target
ln -s ../weston.service /usr/lib/systemd/user/weston.target.wants
============================================
[Unit]
Description=Weston
Requires=dbus.socket
[Service]
ExecStart=/usr/bin/weston-launch
StandardInput=tty
TTYPath=/dev/tty10
Seems it failed to chown /dev/tty10 to the user but failed with
"Permission denied", what 'ls -l /dev/tty10' looks like.
It should be owned by the user and mode is 0620.
With user-session-launch you don't get to choose your tty number -
yet. Please try tty0 instead.
tty1? in user-session-launch currently PAM_TTY is hardcoded as tty1...

Kangkai
Wu, Zhiwen
2014-01-08 03:33:02 UTC
Permalink
I found that on IVI device, it defines TTYPath=/dev/tty1 and what "ls -l /dev/tty1" show it's user id is "app".
And thanks to Kangkai's help. He found that, on IVI image, there is a udev-rules-ivi package to set udev rules for tty1. Copy this file to my image, and for now, weston can be launched by user session correctly.
-----Original Message-----
From: Yang, Chengwei
Sent: Tuesday, January 07, 2014 8:46 PM
To: Wu, Zhiwen
Subject: Re: [Dev] systemd: Failed at step STDIN spawing
/usr/bin/weston-launch: Permission denied
Post by Wu, Zhiwen
Hi All,
I have been trying to bring up a basic wayland image on Intel mobile device. I
got blocked by running weston-launch in systemd user session. Actually, I copied
what IVI does on systemd stuff for wayland, but it doesn't work for me. The
Post by Wu, Zhiwen
"Jun 10 19:23:28 localhost systemd[217]: Failed at step STDIN spawning
/usr/bin/weston-launch: Permission denied".
Post by Wu, Zhiwen
t0-5000.service ln -sf weston.target
/usr/lib/systemd/user/default.target
ln -s ../weston.service /usr/lib/systemd/user/weston.target.wants
============================================
[Unit]
Description=Weston
Requires=dbus.socket
[Service]
ExecStart=/usr/bin/weston-launch
StandardInput=tty
TTYPath=/dev/tty10
Seems it failed to chown /dev/tty10 to the user but failed with "Permission
denied", what 'ls -l /dev/tty10' looks like.
It should be owned by the user and mode is 0620.
--
Thanks,
Chengwei
Post by Wu, Zhiwen
[Install]
WantedBy=weston.target
==============================================
Do I miss any points? Ps: I used kexec to boot the kernel.bak and add
"security=none" to cmdline.bak to work around smack check.
Post by Wu, Zhiwen
Thanks
-----------
OTC PRC Visualization Team
Wu Zhiwen
_______________________________________________
Dev mailing list
https://lists.tizen.org/listinfo/dev
Stéphane Desneux
2014-01-09 08:06:22 UTC
Permalink
Hi all,

We encountered the same problem on Tizen:Generic and fixed it by adding
this workaround in the kickstart file:

------------
cat >/usr/lib/udev/rules.d/99-tty.rules <<EOF
SUBSYSTEM=="tty", KERNEL=="tty1", GROUP="app", OWNER="app"
EOF
------------

The workaround is not specific to IVI: why not removing this rule from
udev-rules-ivi and adding it to weston package ?
--
Stéphane Desneux
Intel OTC - Vannes/FR
gpg:1CA35726/DFA9B0232EF80493AF2891FA24E3A2841CA35726
Post by Wu, Zhiwen
I found that on IVI device, it defines TTYPath=/dev/tty1 and what "ls -l /dev/tty1" show it's user id is "app".
And thanks to Kangkai's help. He found that, on IVI image, there is a udev-rules-ivi package to set udev rules for tty1. Copy this file to my image, and for now, weston can be launched by user session correctly.
-----Original Message-----
From: Yang, Chengwei
Sent: Tuesday, January 07, 2014 8:46 PM
To: Wu, Zhiwen
Subject: Re: [Dev] systemd: Failed at step STDIN spawing
/usr/bin/weston-launch: Permission denied
Post by Wu, Zhiwen
Hi All,
I have been trying to bring up a basic wayland image on Intel mobile device. I
got blocked by running weston-launch in systemd user session. Actually, I copied
what IVI does on systemd stuff for wayland, but it doesn't work for me. The
Post by Wu, Zhiwen
"Jun 10 19:23:28 localhost systemd[217]: Failed at step STDIN spawning
/usr/bin/weston-launch: Permission denied".
Post by Wu, Zhiwen
t0-5000.service ln -sf weston.target
/usr/lib/systemd/user/default.target
ln -s ../weston.service /usr/lib/systemd/user/weston.target.wants
============================================
[Unit]
Description=Weston
Requires=dbus.socket
[Service]
ExecStart=/usr/bin/weston-launch
StandardInput=tty
TTYPath=/dev/tty10
Seems it failed to chown /dev/tty10 to the user but failed with "Permission
denied", what 'ls -l /dev/tty10' looks like.
It should be owned by the user and mode is 0620.
--
Thanks,
Chengwei
Post by Wu, Zhiwen
[Install]
WantedBy=weston.target
==============================================
Do I miss any points? Ps: I used kexec to boot the kernel.bak and add
"security=none" to cmdline.bak to work around smack check.
Post by Wu, Zhiwen
Thanks
-----------
OTC PRC Visualization Team
Wu Zhiwen
_______________________________________________
Dev mailing list
https://lists.tizen.org/listinfo/dev
_______________________________________________
Dev mailing list
https://lists.tizen.org/listinfo/dev
Patrick McCarty
2014-01-09 19:55:03 UTC
Permalink
Post by Wu, Zhiwen
I found that on IVI device, it defines TTYPath=/dev/tty1 and what "ls
-l /dev/tty1" show it's user id is "app".
And thanks to Kangkai's help. He found that, on IVI image, there is a
udev-rules-ivi package to set udev rules for tty1. Copy this file to
my image, and for now, weston can be launched by user session
correctly.
The tty rule from udev-rules-ivi was added as a temporary workaround to
fix IVI bootup before we implemented user-session-launch to start a
proper systemd-logind session.

I neglected to remove this rule after integrating user-session-launch,
so I didn't see this problem surface until now. The udev rule should
eventually be removed, but only after the bug is fixed.

Since I'm currently unsure of the proper fix, I filed a JIRA ticket to
track the issue, at https://bugs.tizen.org/jira/browse/PTREL-592.

Regards,
Patrick

Loading...