fix guest addition installation, fixes wallpaper that doesn't work before user creation, and add brand new buildozer.desktop
This commit is contained in:
parent
b522bf9c49
commit
70995b1989
5 changed files with 44 additions and 15 deletions
1
buildozer/tools/packer/.gitignore
vendored
Normal file
1
buildozer/tools/packer/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
packer_cache
|
7
buildozer/tools/packer/http/buildozer.desktop
Normal file
7
buildozer/tools/packer/http/buildozer.desktop
Normal file
|
@ -0,0 +1,7 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=Buildozer
|
||||
Exec=firefox -url "file:///usr/share/applications/buildozer-welcome/index.html" -width 600 -height 800
|
||||
Icon=/usr/share/applications/buildozer-welcome/icon.png
|
||||
Categories=Application;Development;favourite;
|
|
@ -3,11 +3,10 @@
|
|||
# Mount the disk image
|
||||
cd /tmp
|
||||
mkdir /tmp/isomount
|
||||
mount -t iso9660 -o loop /root/VBoxGuestAdditions.iso /tmp/isomount
|
||||
mount -t iso9660 /dev/sr1 /tmp/isomount
|
||||
|
||||
# Install the drivers
|
||||
/tmp/isomount/VBoxLinuxAdditions.run
|
||||
|
||||
# Cleanup
|
||||
umount isomount
|
||||
rm -rf isomount /root/VBoxGuestAdditions.iso
|
||||
|
|
|
@ -1,5 +1,22 @@
|
|||
#!/bin/bash
|
||||
export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"
|
||||
# xfconf doesn't work with sudo, even with XAUTHORITY + DISPLAY
|
||||
# seems that the user need to log to be able to use them.
|
||||
|
||||
# keep them for reference for now.
|
||||
# change theme (works better for this wallpaper)
|
||||
# xfconf-query -c xfce4-desktop \
|
||||
# --property /backdrop/screen0/monitor0/workspace0/last-image \
|
||||
# --set /usr/share/backgrounds/kivy-wallpaper.png
|
||||
# xfconf-query -c xsettings \
|
||||
# --property /Net/ThemeName \
|
||||
# --set Adwaita
|
||||
# xfconf-query -c xsettings \
|
||||
# --property /Net/IconThemeName \
|
||||
# --set elementary-xfce-darker
|
||||
|
||||
|
||||
|
||||
set -x
|
||||
|
||||
# ensure the kivy user can mount shared folders
|
||||
adduser kivy vboxsf
|
||||
|
@ -16,22 +33,27 @@ chown kivy.kivy /home/kivy/.face
|
|||
# set wallpaper
|
||||
wget $PACKER_HTTP_ADDR/wallpaper.png
|
||||
mv wallpaper.png /usr/share/backgrounds/kivy-wallpaper.png
|
||||
xfconf-query -c xfce4-desktop \
|
||||
--property /backdrop/screen0/monitor0/workspace0/last-image \
|
||||
--set /usr/share/backgrounds/kivy-wallpaper.png
|
||||
sed -i "s:/usr/share/xfce4/backdrops/xubuntu-wallpaper.png:/usr/share/backgrounds/kivy-wallpaper.png:g" /etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
|
||||
sed -i "s:Greybird:Adwaita:g" /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
|
||||
sed -i "s:Greybird:Adwaita:g" /etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
|
||||
sed -i "s:Greybird:Adwaita:g" /etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
|
||||
sed -i "s:Greybird:Adwaita:g" /etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml
|
||||
sed -i "s:elementary-xfce-dark:elementary-xfce-darkest:g" /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
|
||||
|
||||
# change theme (works better for this wallpaper)
|
||||
xfconf-query -c xsettings \
|
||||
--property /Net/ThemeName \
|
||||
--set Adwaita
|
||||
xfconf-query -c xsettings \
|
||||
--property /Net/IconThemeName \
|
||||
--set elementary-xfce-darker
|
||||
# add desktop icon
|
||||
wget $PACKER_HTTP_ADDR/buildozer.desktop
|
||||
mkdir -p /home/kivy/Desktop
|
||||
cp buildozer.desktop /home/kivy/Desktop/
|
||||
chown kivy.kivy /home/kivy/Desktop
|
||||
mv buildozer.desktop /usr/share/applications/
|
||||
sed -i "s:^favorites=.*$:favorites=buildozer.desktop,exo-terminal-emulator.desktop,exo-web-browser.desktop,exo-file-manager.desktop,org.gnome.Software.desktop,xfhelp4.desktop:g" /etc/xdg/xdg-xubuntu/xfce4/whiskermenu/defaults.rc
|
||||
|
||||
# copy welcome directory
|
||||
mkdir -p /usr/share/applications/buildozer-welcome
|
||||
cd /usr/share/applications/buildozer-welcome
|
||||
wget $PACKER_HTTP_ADDR/welcome/milligram.min.css
|
||||
wget $PACKER_HTTP_ADDR/welcome/buildozer.css
|
||||
wget $PACKER_HTTP_ADDR/welcome/index.css
|
||||
wget $PACKER_HTTP_ADDR/welcome/index.html
|
||||
wget $PACKER_HTTP_ADDR/kivy-icon-96.png
|
||||
mv kivy-icon-96.png icon.png
|
||||
cd -
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
"shutdown_command": "echo {{user `ssh_password`}} | sudo -S shutdown -P now",
|
||||
"vm_name": "Kivy/Buildozer VM",
|
||||
"guest_os_type": "Ubuntu_64",
|
||||
"guest_additions_path": "/root",
|
||||
"guest_additions_mode": "attach",
|
||||
"ssh_wait_timeout": "120m"
|
||||
}],
|
||||
"provisioners": [{
|
||||
|
|
Loading…
Reference in a new issue