View previous topic :: View next topic |
Author |
Message |
clin n00b
Joined: 31 Mar 2018 Posts: 6
|
Posted: Sat Mar 31, 2018 7:55 am Post subject: [Solved] Wayland - Start on boot? (OpenRC, Weston) |
|
|
I have a fairly basic setup - OpenRC, Alsa, Wayland and Weston - I wish to start wayland on boot but I'm not exactly sure how - I attempted to start with a basic init script (below), but it appears that it wont start with the error 'weston-launch: failed to open tty: No such file or directory'. I expect this is because Wayland appears to consume the executing TTY as opposed to the X11/XDM ecosystem which seems to create VT7.
Edit: I should mention that if I start wayland via an interactive shell it works, via SSH or setting to run on boot does not.
I'm fairly new to the wayland scene and I'm pretty confident I'm doing something wrong, but I can't find much support for openrc systems - can anybody assist ?
Code: |
~ # cat /etc/init.d/weston
#!/sbin/openrc-run
#
### BEGIN INIT INFO
# Provides: weston
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
killproc() {
pid=`/usr/bin/pidof $1`
[ "$pid" != "" ] && kill $pid
}
start(){
. /etc/profile
# This is all a nasty hack
if test -z "$XDG_RUNTIME_DIR"; then
export XDG_RUNTIME_DIR=/home/media
mkdir --parents $XDG_RUNTIME_DIR
chmod 0700 $XDG_RUNTIME_DIR
fi
weston-launch -u media --tty 1 -- -c /home/media/.config/weston.ini & disown
return 0;
}
stop(){
killproc weston;
return 0;
}
~ # /etc/init.d/weston restart
weston-launch: failed to open tty: No such file or directory
|
Last edited by clin on Sun Apr 01, 2018 2:22 am; edited 1 time in total |
|
Back to top |
|
|
clin n00b
Joined: 31 Mar 2018 Posts: 6
|
|
Back to top |
|
|
Mr. T. Guru
Joined: 26 Dec 2016 Posts: 477
|
Posted: Sun Apr 01, 2018 10:41 am Post subject: |
|
|
A compositor (here Weston) is analogous to the X display server in the "display" system. Wayland is a protocol that characterizes the new "display" system.
Edit
Gentoo can be characterized by modes of operation called runlevels. A runlevel notably allows to start and stop a set of services (see remark).
Gentoo init system (essentially OpenRC) facilitates management of runlevels. An administrator may define new services,
add or remove services in a runlevel and change the active runlevel of Gentoo.
Note: daemons (processes constantly running in the background) may manage system features: open a login shell, close a remote connection...
See also:
Last edited by Mr. T. on Sun Apr 01, 2018 1:21 pm; edited 1 time in total |
|
Back to top |
|
|
Mr. T. Guru
Joined: 26 Dec 2016 Posts: 477
|
Posted: Sun Apr 01, 2018 1:09 pm Post subject: |
|
|
clin, Gentoo sometimes provide configuration files for init services.
Handbook wrote: | Init scripts can be quite complex. It is therefore not really desirable to have the users edit the init script directly, as it would make it more error-prone. [...]
Gentoo provides an easy way to configure such a service: every init script that can be configured has a file in /etc/conf.d/ [...] |
Is it really essential to run Weston on boot?
Edit: There are several types of compositors and Wayland does not support remote rendering. I didn't find a lot of information about Weston.
Edit: fixed a mistake.
Edit: added the hyperlink.
See also:
Edit: clin: I believe that your configuration is unsuitable to launch Weston: D-Bus && dbus-session-run. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sun Apr 01, 2018 6:03 pm Post subject: |
|
|
Sauntering into a topic marked solved and snobsplaining to the OP while telling them they're doing it wrong is not constructive in the slightest. Changing your username won't hide that fact. Stop. |
|
Back to top |
|
|
Mr. T. Guru
Joined: 26 Dec 2016 Posts: 477
|
Posted: Mon Apr 02, 2018 6:22 am Post subject: |
|
|
@Ant P.: infamous censor, your grandiloquence goes beyond the borders without equivalence! |
|
Back to top |
|
|
|