DEPENDS = "zenity dbus"
RDEPENDS = "zenity dbus"
-PR = "r2"
+PR = "r4"
SRC_URI = " \
file://op_bright.sh \
file://op_wifi.sh \
file://op_wifi.desktop \
file://op_bluetooth.sh \
- file://op_bluetooth.desktop \
+ file://op_bluetooth.desktop \
+ file://op_defaultgui.sh \
+ file://op_defaultgui.desktop \
"
do_install() {
INTERFACE=`hciconfig | grep "^hci" | cut -d ':' -f 1`
pgrep bluetoothd
if [ $? = 1 ]; then
- notify-send "Bluetooth" "The bluetooth interface is being set up..." -i /usr/share/icons/hicolor/32x32/apps/st_bluetooth.png
+ notify-send "Bluetooth" "The bluetooth interface is being set up..." -i /usr/share/icons/hicolor/32x32/apps/blueman.png
sudo /usr/sbin/hciconfig ${INTERFACE} down
sudo /usr/sbin/hciconfig ${INTERFACE} up pscan
sudo /usr/sbin/bluetoothd
--- /dev/null
+#!/bin/sh
+
+# Select the default interface.
+
+while ! launcher=$(zenity --list --title="Default User Interface" --text="Please choose your default application launcher." --column "return" --print-column=1 --hide-column=1 --column "Pick a launcher" "xfce" "Desktop environment (Xfce)" "pmenu" "Gaming-console like launcher (PMenu)") || [ "x$launcher" = "x" ]; do
+ zenity --title="Error" --error --text="Please select a default launcher." --timeout 6
+done
+
+if [ $launcher == "xfce" ]; then
+# sed -i 's/.*sessions .*/sessions xfce4,pmenu/g' /etc/slim.conf
+ sed -i 's/.*DEFAULT_SESSION=.*/DEFAULT_SESSION=startxfce4/g' ~/.xinitrc
+ echo Xfce selected as default interface
+else
+# sed -i 's/.*sessions .*/sessions pmenu,xfce4/g' /etc/slim.conf
+ sed -i 's/.*DEFAULT_SESSION=.*/DEFAULT_SESSION=pmenu/g' ~/.xinitrc
+ echo PMenu selected as default interface
+fi
+
+# Set the correct user for Autologin and enable / disable it.
+
+if zenity --question --title="Autologin" --text="Do you wish to automatically login at startup?\n\nSecurity warning: This skips the password check on startup" --ok-label="Yes" --cancel-label="No"; then
+ # echo "PREFERED_USER=$username" > /etc/default/autologin
+ sudo sed -i 's/.*auto_login.*/auto_login yes/g' /etc/slim.conf
+else
+ sudo sed -i 's/.*auto_login.*/auto_login no/g' /etc/slim.conf
+ fi
+fi
+
+# ----