2018-10-03 20:14:44 -03:00
|
|
|
#!/bin/bash
|
2017-12-05 11:08:51 -08:00
|
|
|
|
|
|
|
#
|
|
|
|
# This script configures the logged in users xsession to properly
|
|
|
|
# configure unity to launch
|
|
|
|
#
|
|
|
|
# Major thanks to: http://c-nergy.be/blog/?p=10752 for the tips.
|
|
|
|
#
|
|
|
|
|
2018-10-01 14:14:50 -03:00
|
|
|
if [ ! "$(id -u)" ]; then
|
2018-03-02 09:56:26 -08:00
|
|
|
echo 'This script must be run with root privileges' >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2018-10-03 20:11:31 -03:00
|
|
|
bash -c "cat > ~/.xsession <<EOF
|
2017-12-05 11:08:51 -08:00
|
|
|
|
|
|
|
/usr/lib/gnome-session/gnome-session-binary --session=ubuntu &
|
|
|
|
/usr/lib/x86_64-linux-gnu/unity/unity-panel-service &
|
|
|
|
/usr/lib/unity-settings-daemon/unity-settings-daemon &
|
|
|
|
|
|
|
|
for indicator in /usr/lib/x86_64-linux-gnu/indicator-*;
|
|
|
|
do
|
2018-02-14 10:55:09 -08:00
|
|
|
basename='basename \\\${indicator}'
|
|
|
|
dirname='dirname \\\${indicator}'
|
|
|
|
service=\\\${dirname}/\\\${basename}/\\\${basename}-service
|
|
|
|
\\\${service} &
|
2017-12-05 11:08:51 -08:00
|
|
|
done
|
|
|
|
unity
|
2018-10-03 20:11:31 -03:00
|
|
|
EOF"
|