Skip to content
Snippets Groups Projects
Commit c37b0bb7 authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

add DISPLAY variable, do not launch 66-all

parent 641c476c
No related branches found
No related tags found
No related merge requests found
......@@ -58,19 +58,24 @@ Service:
Runtime:
- It mount /run/user/<uid> of user if doesn't exist.
- It define well-know variable and write it at
${HOME}/.66/conf/boot-user-<user>.conf (see below).
- It create a scandir as <user> as owner merging the environment of
${HOME}/.66/conf/boot-user-<user>.conf and start it.
${HOME}/.66/conf/boot-user/boot-user-<user>.conf (see below).
This file is created at every start of the setenv-<user> service.
- It create a scandir as <user> as owner merging the environment from
the directory ${HOME}/.66/conf/boot-user/ and start it.
Example of ${HOME}/.66/conf/boot-user-<user>.conf file:
Example of ${HOME}/.66/conf/boot-user/boot-user-<user>.conf file:
HOME=/home/obarun
LOGNAME=obarun
PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin
SHELL=/usr/bin/zsh
DISPLAY=:0
XDG_RUNTIME_DIR=/run/user/1000
XDG_CACHE_HOME=/home/obarun/.cache
XDG_CONFIG_HOME=/home/obarun/.config
XDG_DATA_HOME=/home/obarun/.local/share
XDG_DATA_DIRS=/home/obarun/.local/share:/usr/local/share:/usr/share
XDG_SESSION_CLASS=user
Note: you can set any new variables creating a new file containing one or
multiple key=value pair into the directory ${HOME}/.66/conf/boot-user/
......@@ -12,7 +12,12 @@
execl-subuidgid
backtick -n HOME { homeof @MOD@ }
importas -u HOME HOME
redirfd -w 1 ${HOME}/.66/conf/boot-user-@MOD@.conf
foreground
{
if -nt { test -d ${HOME}/.66/conf/boot-user }
mkdir -p ${HOME}/.66/conf/boot-user
}
redirfd -w 1 ${HOME}/.66/conf/boot-user/boot-user-@MOD@.conf
## GENERAL VARIABLES
......@@ -22,7 +27,7 @@
foreground {
importas PATH PATH
66-echo PATH=${PATH}
66-echo -- PATH=${PATH}
}
foreground {
backtick -D /usr/bin/sh -n shell {
......@@ -30,20 +35,34 @@
cut -d: -f7
}
importas -u shell shell
if { 66-echo SHELL=${shell} }
66-echo -- SHELL=${shell}
}
foreground
{
backtick -n x
{
sh -c "d=0 ; while true ; do \
if [ ! -e "/tmp/.X$d-lock" -o -S "/tmp/.X11-unix/X$d" ]; then \
66-echo -- $d ; \
break ; \
fi ; \
d=$(($d + 1)) ; \
done ;"
}
importas -u x x
66-echo -- DISPLAY=:${x}
}
## DBUS
if { 66-echo DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${UID}/dbus }
if { 66-echo -- DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${UID}/dbus }
## XDG variables
if { 66-echo XDG_RUNTIME_DIR=/run/user/${UID} }
if { 66-echo XDG_CACHE_HOME=${HOME}/.cache }
if { 66-echo XDG_CONFIG_HOME=${HOME}/.config }
if { 66-echo XDG_DATA_HOME=${HOME}/.local/share }
if { 66-echo XDG_DATA_DIRS=${HOME}/.local/share:/usr/local/share:/usr/share }
66-echo XDG_SESSION_CLASS=user
if { 66-echo -- XDG_RUNTIME_DIR=/run/user/${UID} }
if { 66-echo -- XDG_CACHE_HOME=${HOME}/.cache }
if { 66-echo -- XDG_CONFIG_HOME=${HOME}/.config }
if { 66-echo -- XDG_DATA_HOME=${HOME}/.local/share }
if { 66-echo -- XDG_DATA_DIRS=${HOME}/.local/share:/usr/local/share:/usr/share }
66-echo -- XDG_SESSION_CLASS=user
)
[main]
@type = oneshot
@name = runtime-@MOD@
@description = "Launch all tree enabled of @MOD@"
@user = ( root )
@depends = ( scandir-@MOD@ )
[start]
@build = auto
@execute = (
s6-setuidgid @MOD@
66-all up
)
[stop]
@build = auto
@execute = (
s6-setuidgid @MOD@
66-all down
)
......@@ -15,5 +15,5 @@
(
s6-setsid -qb --
umask 022
66-scandir -v3 -d3 -cu -e /home/@MOD@/.66/conf/boot-user-@MOD@.conf
66-scandir -v3 -d3 -cu -e /home/@MOD@/.66/conf/boot-user
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment