Autostart tox UI on mesh client

This commit is contained in:
Bob Mottram 2016-06-24 18:45:52 +01:00
parent a57c207750
commit 447db8b10b
1 changed files with 22 additions and 0 deletions

View File

@ -1083,6 +1083,26 @@ function install_syncthing {
echo 'install_syncthing' echo 'install_syncthing'
} }
function mesh_client_startup_applications {
if [ ! -d $rootdir/home/$MY_USERNAME/.config/autostart ]; then
mkdir -p $rootdir/home/$MY_USERNAME/.config/autostart
fi
echo '[Desktop Entry]' > $rootdir/home/$MY_USERNAME/.config/autostart/tox.desktop
echo 'Version=1.0' >> $rootdir/home/$MY_USERNAME/.config/autostart/tox.desktop
echo 'Type=Application' >> $rootdir/home/$MY_USERNAME/.config/autostart/tox.desktop
echo 'Exec=qtox %u' >> $rootdir/home/$MY_USERNAME/.config/autostart/tox.desktop
echo 'TryExec=qtox' >> $rootdir/home/$MY_USERNAME/.config/autostart/tox.desktop
echo 'Icon=qtox' >> $rootdir/home/$MY_USERNAME/.config/autostart/tox.desktop
echo 'Terminal=false' >> $rootdir/home/$MY_USERNAME/.config/autostart/tox.desktop
echo 'Hidden=false' >> $rootdir/home/$MY_USERNAME/.config/autostart/tox.desktop
echo 'NoDisplay=false' >> $rootdir/home/$MY_USERNAME/.config/autostart/tox.desktop
echo 'X-GNOME-Autostart-enabled=true' >> $rootdir/home/$MY_USERNAME/.config/autostart/tox.desktop
echo 'Name=Tox Chat' >> $rootdir/home/$MY_USERNAME/.config/autostart/tox.desktop
echo 'Comment=Peer to peer encrypted communications' >> $rootdir/home/$MY_USERNAME/.config/autostart/tox.desktop
chroot "$rootdir" ln -s ~/.config/autostart/tox.desktop ~/Desktop/tox.desktop
chroot "$rootdir" chown -R $MY_USERNAME:$MY_USERNAME ~/.config
}
function configure_user_interface { function configure_user_interface {
if [[ $VARIANT != "meshclient" && $VARIANT != "meshusb" && $VARIANT != "usb" ]]; then if [[ $VARIANT != "meshclient" && $VARIANT != "meshusb" && $VARIANT != "usb" ]]; then
return return
@ -1106,6 +1126,8 @@ function configure_user_interface {
chroot "$rootdir" systemctl set-default multi-user.target chroot "$rootdir" systemctl set-default multi-user.target
mesh_client_startup_applications
# change the desktop background # change the desktop background
if [ $MESH_DESKTOP_BACKGROUND_IMAGE ]; then if [ $MESH_DESKTOP_BACKGROUND_IMAGE ]; then
if [ -f $MESH_DESKTOP_BACKGROUND_IMAGE ]; then if [ -f $MESH_DESKTOP_BACKGROUND_IMAGE ]; then