adding new build
This commit is contained in:
parent
7f6d04cb3d
commit
f9856c17fc
6 changed files with 108 additions and 90 deletions
24
debian-mate/root/defaults/startwm.sh
Executable file
24
debian-mate/root/defaults/startwm.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Combine env
|
||||
/usr/bin/with-contenv /usr/bin/env | sed 's/^/export /g' > /defaults/env.sh
|
||||
source /defaults/env.sh
|
||||
rm /defaults/env.sh
|
||||
|
||||
# Enable Nvidia GPU support if detected
|
||||
if which nvidia-smi; then
|
||||
export LIBGL_KOPPER_DRI2=1
|
||||
export MESA_LOADER_DRIVER_OVERRIDE=zink
|
||||
export GALLIUM_DRIVER=zink
|
||||
fi
|
||||
|
||||
# Start Pulseaudio
|
||||
/startpulse.sh &
|
||||
|
||||
# Disable compositing
|
||||
setterm blank 0
|
||||
setterm powerdown 0
|
||||
gsettings set org.mate.Marco.general compositing-manager false
|
||||
|
||||
# Launch DE
|
||||
/usr/bin/dbus-launch /usr/bin/mate-session > /dev/null 2>&1
|
||||
37
debian-mate/root/etc/cont-init.d/60-create-user
Executable file
37
debian-mate/root/etc/cont-init.d/60-create-user
Executable file
|
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
|
||||
echo "**** create ${USERNAME} user and make our folders ****" && \
|
||||
useradd -u 912 -U -d /home/${USERNAME} -s /bin/bash ${USERNAME}
|
||||
usermod -G users,sudo ${USERNAME}
|
||||
echo "${USERNAME}:${PASSWORD}" | chpasswd
|
||||
mkdir -p /home/${USERNAME}
|
||||
chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}
|
||||
|
||||
chmod 755 /etc
|
||||
chmod 755 /etc/xrdp
|
||||
chmod 755 /etc/xrdp/sesman.ini
|
||||
|
||||
touch /home/${USERNAME}/lock.file
|
||||
|
||||
# create .config dir
|
||||
[[ ! -d /home/${USERNAME}/.config ]] && \
|
||||
mkdir -p /home/${USERNAME}/.config
|
||||
|
||||
|
||||
cp /defaults/startwm.sh /home/${USERNAME}/startwm.sh
|
||||
chmod +x /home/${USERNAME}/startwm.sh
|
||||
chown -R ${USERNAME}:${USERAME} /home/${USERNAME}
|
||||
|
||||
# permissions
|
||||
PERM=$(stat -c '%U' /home/${USERNAME}/.config)
|
||||
[[ "${PERM}" != "${USERNAME}" ]] && \
|
||||
chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}
|
||||
|
||||
|
||||
# set random password for abc user to prevent it from connecting
|
||||
|
||||
RANDOM_PASS=`tr -dc A-Za-z0-9 </dev/urandom | head -c 13 ; echo ''`
|
||||
|
||||
echo abc:${RANDOM_PASS} | chpasswd
|
||||
usermod -s /bin/false abc
|
||||
Loading…
Add table
Add a link
Reference in a new issue