]> git.plutz.net Git - blast/commitdiff
various config options, documentation, xfce config
authorPaul Hänsch <paul@plutz.net>
Tue, 16 Jul 2019 23:42:43 +0000 (01:42 +0200)
committerPaul Hänsch <paul@plutz.net>
Tue, 16 Jul 2019 23:42:43 +0000 (01:42 +0200)
19 files changed:
Makefile
config.example
modules/default.mk
modules/nodm.mk [new file with mode: 0644]
modules/xfce.mk [new file with mode: 0644]
modules/xfce/etc/X11/Xresources/xscreensaver [new file with mode: 0644]
modules/xfce/etc/X11/Xresources/xvkbd [new file with mode: 0644]
modules/xfce/etc/X11/Xsession.d/10qtstyle [new file with mode: 0755]
modules/xfce/etc/gtk-2.0/gtkrc [new file with mode: 0644]
modules/xfce/etc/xdg/marblerc [new file with mode: 0644]
modules/xfce/etc/xdg/mimeapps.list [new file with mode: 0644]
modules/xfce/etc/xdg/xfce4/panel/launcher-xvkbd/xvkbd.desktop [new file with mode: 0644]
modules/xfce/etc/xdg/xfce4/panel/whiskermenu-1.rc [new file with mode: 0644]
modules/xfce/etc/xdg/xfce4/terminal/terminalrc [new file with mode: 0644]
modules/xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/thunar.xml [new file with mode: 0644]
modules/xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml [new file with mode: 0644]
modules/xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml [new file with mode: 0644]
modules/xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml [new file with mode: 0644]
modules/xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml [new file with mode: 0644]

index 78b065af0e7d47ed322839070bcde042a99158e1..03fd52b38bfc8c23846ed89a43f94464b3c92667 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,7 @@ define SOURCES =
 deb    http://cdn.debian.net/debian stretch main
 endef
 
-PACKAGES := ${PACKAGES} apt btrfs-tools busybox-static bzip2 ca-certificates cron debian-archive-keyring deborphan firmware-linux-free gzip htop ifupdown init iputils-ping irqbalance isc-dhcp-client less make net-tools nmap ntpdate openssh-client psmisc rsync sshfs sudo systemd traceroute unzip vim wget wireless-tools wpasupplicant xz-utils zip
+PACKAGES := ${PACKAGES} apt busybox-static debian-archive-keyring init systemd
 
 config.mk:
        cp "config.example" "$@"
@@ -97,6 +97,7 @@ define SOURCES =
 deb    http://raspbian.raspberrypi.org/raspbian stretch main non-free firmware rpi
 deb    http://archive.raspberrypi.org/debian stretch main
 endef
+
 PACKAGES := ${PACKAGES} firmware-brcm80211 libraspberrypi-bin libraspberrypi0 pi-bluetooth raspberrypi-bootloader raspberrypi-kernel
 
 _target: _umount _partcopy _config _install
@@ -213,6 +214,7 @@ ${VOLUME}: .FORCE
        ! printf '%s\n' "$${VOLUME}" |grep -q '^/dev/'  # abort if volume should be real device
        dd count=0 of="$${VOLUME}"  # truncate
        dd bs=1M count=0 seek=$$((3 + ${BOOT_MB} + ${ROOT_MB})) of="$${VOLUME}"
+       chmod g+w "$${VOLUME}"
 
 ${PBOOT}: .FORCE
        ! printf '%s\n' "$${PBOOT}" |grep -q '^/dev/'  # abort if volume should be real device
index bcb984aa72573c9d17d3ff26428a26480abbe36b..33c962e8edd833d743d686da7d9db34c81795a83 100644 (file)
@@ -1,7 +1,40 @@
-# image=disk.img squash=rootfs.squash raspi=raspi.img
-# modules=
+## Choose only on of the possible target types
+# image=disk.img
+# squash=rootfs.squash
+# raspi=raspi.img
 
+## Image size in MB. Needs to be able to hold all software.
+# imagesize=2048
+
+## Additional packages
 # packages=chromium,gimp
+
+## Comma separated list of config modules from modules/ directory
+# modules=nodm,xfce
+
+## Root password will be salted and encrypted in image
 # rootpass=topsecret
+
+## Comma separated list of users to be set up.
+## User logins will start out with an empty password
+# users=adam,steve
+
+## Wifi configuration, if a Wifi password is given, WPA encryption will be used
+## without the password, the system will try to connect to an open wifi
 # wifi=MyWiFi
 # wifipass=P4ssW0rD
+
+## Timezone as offered by Debians tzdata selection
+# timezone=Europe/Berlin
+
+## Comma separated list of locales, first one will become default locale
+# locales=de_DE.UTF-8,en_US.UTF-8
+
+## If nodm is installed, you can choose a user to login automatically
+## If no user is given here, then nodm will default to root
+# nodm_user=adam
+
+## If the approxmodule is enabled, then one (and only one) apt-source
+## can be choosen to install packages from
+## See modules/approx.mk if you need more flexibility
+# approx=http://localhost:9000/debian
index 71ec8640e5374537fe331a3e18dc762a4aa28b35..4cbc7eaa1d0a8f36bf6f14d28694089452e6f5c6 100644 (file)
@@ -1,27 +1,87 @@
+ifdef imagesize
+ROOT_MB := $(shell printf '%i\n' "$$(( ${imagesize} - ${BOOT_MB} - 3 ))")
+endif
+
+PACKAGES := ${PACKAGES} btrfs-tools bzip2 ca-certificates cron deborphan firmware-linux-free gzip htop ifupdown iputils-ping irqbalance isc-dhcp-client less make net-tools nmap ntpdate openssh-client psmisc rsync sshfs sudo traceroute unzip vim wget wireless-tools wpasupplicant xz-utils zip
+
 ifdef packages
-PACKAGES := ${PACKAGES} $(subst ${comma_},${space},${packages})
+PACKAGES := ${PACKAGES} $(subst ${comma_},${space_},${packages})
 endif
 
+export DEBCONF
+
+define DEBCONF :=
+keyboard-configuration keyboard-configuration/model    select  Generic 105-key (Intl) PC
+keyboard-configuration keyboard-configuration/variant  select  English (US) - English (Macintosh)
+endef
+
+.PHONY: _debconf_selections
+_install: _debconf_selections
+_debconf_selections: ${SYSROOT}
+       printf '%s\n' "$${DEBCONF}" |chroot "$${SYSROOT}" debconf-set-selections
+
+.PHONY: _timezone _locales
+
+ifdef timezone
+define DEBCONF :=
+${DEBCONF}
+tzdata tzdata/Areas    select  $(firstword $(subst /,${space_},${timezone}))
+tzdata tzdata/Zones/Europe     select  $(lastword $(subst /,${space_},${timezone}))
+endef
+PACKAGES := ${PACKAGES} tzdata
+_config: _timezone
+endif
+
+ifdef locales
+define DEBCONF :=
+${DEBCONF}
+locales        locales/locales_to_be_generated multiselect     ${locales}
+locales        locales/default_environment_locale      select  $(firstword $(subst ${comma_},${space_},${locales}))
+endef
+#$(addsuffix ${space_}UTF-8,$(subst ${comma_},${space_}${comma},${locales}))
+PACKAGES := ${PACKAGES} locales
+_config: _locales
+endif
+
+_timezone: ${CFGROOT}
+       rm "$${CFGROOT}/etc/timezone"
+       chroot "$${CFGROOT}" dpkg-reconfigure --default-priority -u tzdata
+
+_locales: ${CFGROOT}
+       rm "$${CFGROOT}/etc/default/locale" "$${CFGROOT}/etc/locale.gen"
+       chroot "$${CFGROOT}" dpkg-reconfigure --default-priority -u locales
+
+.PHONY: _rootpass _users
+
 ifdef rootpass
 export rootpass
-.PHONY: _rootpass
 _config: _rootpass
-_rootpass: ${CFGROOT}
-       chroot "$${CFGROOT}" usermod -p "$$(openssl passwd -salt "$$(($${RANDOM-0} + 10))" "$${rootpass}")" root
 endif
 
-ifdef wifi
-export wifi
-_config: ${CFGROOT}/etc/network/interfaces.d/wifi
+ifdef users
+_config: _users
+endif
 
+_rootpass: ${CFGROOT}
+       chroot "$${CFGROOT}" usermod -p "$$(openssl passwd "$${rootpass}")" root
+
+_users: ${CFGROOT}
+       #sed -Ei 's;^SHELL=/bin/sh$$;SHELL=/bin/bash;;' "${CFGROOT}/etc/default/useradd"
+       for u in $(subst ${comma_},${space_},${users}); do \
+               chroot "$${CFGROOT}" useradd -m -s /bin/bash -p "$$(openssl passwd "")" "$$u"; \
+       done
+
+ifdef wifi
 ifdef wifipass
-export wifipass
+export wifi wifipass
 ${CFGROOT}/etc/network/interfaces.d/wifi: ${CFGROOT}
        printf 'auto wlan0\nallow-hotplug wlan0\n\niface wlan0 inet dhcp\n' >$@
        printf '  wpa-ssid "%s"\n  wpa-psk "%s"\n' "$$wifi" "$$wifipass" >>$@
 else
+export wifi
 ${CFGROOT}/etc/network/interfaces.d/wifi: ${CFGROOT}
        printf 'auto wlan0\nallow-hotplug wlan0\n\niface wlan0 inet dhcp\n' >$@
        printf '  wireless-ssid "%s"\n' "$$wifi" >>$@
 endif
+_config: ${CFGROOT}/etc/network/interfaces.d/wifi
 endif
diff --git a/modules/nodm.mk b/modules/nodm.mk
new file mode 100644 (file)
index 0000000..17b3556
--- /dev/null
@@ -0,0 +1,26 @@
+ifdef raspi
+PACKAGES := ${PACKAGES} nodm xserver-xorg-video-fbturbo xserver-xorg-input-evdev
+else
+PACKAGES := ${PACKAGES} nodm xserver-xorg-video-all xserver-xorg-input-all
+endif
+
+
+define DEBCONF :=
+${DEBCONF}
+nodm   nodm/enabled    boolean true
+endef
+
+ifdef nodm_user
+_config: _nodm_user
+define DEBCONF :=
+${DEBCONF}
+nodm   nodm/user       string  ${nodm_user}
+endef
+
+endif
+
+.PHONY: _nodm_user
+_nodm_user: ${CFGROOT}
+       rm "$${CFGROOT}/etc/default/nodm"
+       chroot "${CFGROOT}" dpkg-reconfigure --default-priority -u nodm
+       chroot "${CFGROOT}" adduser "${nodm_user}" video
diff --git a/modules/xfce.mk b/modules/xfce.mk
new file mode 100644 (file)
index 0000000..f16581a
--- /dev/null
@@ -0,0 +1,6 @@
+PACKAGES := ${PACKAGES} xfce4 xauth x11-xserver-utils x2x xvkbd blueman xfce4-terminal xfce4-clipman-plugin xfce4-whiskermenu-plugin thunar gvfs gvfs-backends gvfs-fuse xscreensaver
+
+.PHONY: _xfce
+_config: _xfce
+_xfce: ${CFGROOT}
+       cp -a modules/xfce/. "$${CFGROOT}"
diff --git a/modules/xfce/etc/X11/Xresources/xscreensaver b/modules/xfce/etc/X11/Xresources/xscreensaver
new file mode 100644 (file)
index 0000000..6c4d7e8
--- /dev/null
@@ -0,0 +1,4 @@
+xscreensaver.mode: one
+xscreensaver.selected: 151
+xscreensaver.newLoginCommand: /usr/sbin/lxdm -c USER_SWITCH
+
diff --git a/modules/xfce/etc/X11/Xresources/xvkbd b/modules/xfce/etc/X11/Xresources/xvkbd
new file mode 100644 (file)
index 0000000..3124803
--- /dev/null
@@ -0,0 +1,6 @@
+xvkbd.modalKeytop: true
+xvkbd.compact: true
+xvkbd.secure: true
+xvkbd.alwaysOnTop: true
+xvkbd.wmToolbar: true
+
diff --git a/modules/xfce/etc/X11/Xsession.d/10qtstyle b/modules/xfce/etc/X11/Xsession.d/10qtstyle
new file mode 100755 (executable)
index 0000000..b44089a
--- /dev/null
@@ -0,0 +1 @@
+export QT_STYLE_OVERRIDE=Breeze
diff --git a/modules/xfce/etc/gtk-2.0/gtkrc b/modules/xfce/etc/gtk-2.0/gtkrc
new file mode 100644 (file)
index 0000000..5109227
--- /dev/null
@@ -0,0 +1 @@
+include "/usr/share/themes/Breeze/gtk-2.0/gtkrc"
diff --git a/modules/xfce/etc/xdg/marblerc b/modules/xfce/etc/xdg/marblerc
new file mode 100644 (file)
index 0000000..890f49d
--- /dev/null
@@ -0,0 +1,9 @@
+[MainWindow]
+Height 900=640
+Width 1440=1024
+
+[MarbleWidget]
+homeLatitude=52.5011
+homeLongitude=13.4658
+homeZoom=3050
+mapTheme=earth/openstreetmap/openstreetmap.dgml
diff --git a/modules/xfce/etc/xdg/mimeapps.list b/modules/xfce/etc/xdg/mimeapps.list
new file mode 100644 (file)
index 0000000..74bf88b
--- /dev/null
@@ -0,0 +1,18 @@
+[Added Associations]
+application/ogg=vlc.desktop;audacity.desktop;
+application/pdf=kde4-okularApplication_pdf.desktop;
+audio/flac=vlc.desktop;audacity.desktop;
+audio/mp4=vlc.desktop;audacity.desktop;
+audio/mpeg=vlc.desktop;audacity.desktop;
+audio/ogg=vlc.desktop;audacity.desktop;
+audio/x-flac+ogg=vlc.desktop;audacity.desktop;
+audio/x-m4b=vlc.desktop;audacity.desktop;
+audio/x-ms-wma=vlc.desktop;audacity.desktop;
+audio/x-opus+ogg=vlc.desktop;audacity.desktop;
+audio/x-speex+ogg=vlc.desktop;audacity.desktop;
+audio/x-vorbis+ogg=vlc.desktop;audacity.desktop;
+text/html=firefox-esr.desktop;chromium.desktop;kde4-kfmclient_html.desktop;kde4-kate.desktop;kde4-kwrite.desktop;libreoffice-writer.desktop;kde4-okularApplication_txt.desktop;vim.desktop;
+video/mpeg=vlc.desktop;audacity.desktop;
+video/ogg=vlc.desktop;audacity.desktop;
+video/x-ogm+ogg=vlc.desktop;audacity.desktop;
+video/x-theora+ogg=vlc.desktop;audacity.desktop;
diff --git a/modules/xfce/etc/xdg/xfce4/panel/launcher-xvkbd/xvkbd.desktop b/modules/xfce/etc/xdg/xfce4/panel/launcher-xvkbd/xvkbd.desktop
new file mode 100644 (file)
index 0000000..094cfcc
--- /dev/null
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Version=1.0
+Name=Keyboard
+Exec=/bin/sh -c "killall xvkbd || xvkbd"
+Icon=blueman-keyboard
diff --git a/modules/xfce/etc/xdg/xfce4/panel/whiskermenu-1.rc b/modules/xfce/etc/xdg/xfce4/panel/whiskermenu-1.rc
new file mode 100644 (file)
index 0000000..864b771
--- /dev/null
@@ -0,0 +1 @@
+favorites=libreoffice-startcenter.desktop,firefox-esr.desktop,clementine.desktop,marble.desktop,audacity.desktop,org.kde.kdenlive.desktop,blender.desktop,inkscape.desktop,org.kde.krita.desktop,xfce4-terminal.desktop
diff --git a/modules/xfce/etc/xdg/xfce4/terminal/terminalrc b/modules/xfce/etc/xdg/xfce4/terminal/terminalrc
new file mode 100644 (file)
index 0000000..a2256b7
--- /dev/null
@@ -0,0 +1,3 @@
+[Configuration]
+BackgroundMode=TERMINAL_BACKGROUND_TRANSPARENT
+BackgroundDarkness=0.850000
diff --git a/modules/xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/thunar.xml b/modules/xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/thunar.xml
new file mode 100644 (file)
index 0000000..d601abf
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml varsion="1.0" encoding="UTF-8"?>
+
+<channel name="thunar" version="1.0">
+  <property name="misc-single-click" type="bool" value="true"/>
+</channel>
diff --git a/modules/xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml b/modules/xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
new file mode 100644 (file)
index 0000000..6b96eb4
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml varsion="1.0" encoding="UTF-8"?>
+
+<channel name="xfce4-desktop" version="1.0">
+  <property name="desktop-icons" type="empty">
+    <property name="single-click" type="bool" value="true"/>
+    <property name="file-icons" type="empty">
+      <property name="show-trash" type="bool" value="false"/>
+      <property name="show-filesystem" type="bool" value="false"/>
+      <property name="show-home" type="bool" value="false"/>
+    </property>
+  </property>
+</channel>
diff --git a/modules/xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml b/modules/xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
new file mode 100644 (file)
index 0000000..19907e6
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<channel name="xfce4-panel" version="1.0">
+  <property name="configver" type="int" value="2"/>
+  <property name="panels" type="array">
+    <value type="int" value="1"/>
+    <property name="panel-1" type="empty">
+      <property name="position" type="string" value="p=12;x=662;y=997"/>
+      <property name="size" type="uint" value="32"/>
+      <property name="position-locked" type="bool" value="true"/>
+      <property name="length" type="uint" value="100"/>
+      <property name="background-style" type="uint" value="0"/>
+      <property name="plugin-ids" type="array">
+        <value type="int" value="1"/>
+        <value type="int" value="11"/>
+        <value type="int" value="8"/>
+        <value type="int" value="10"/>
+        <value type="int" value="9"/>
+        <value type="int" value="12"/>
+        <value type="int" value="5"/>
+        <value type="int" value="7"/>
+        <value type="int" value="4"/>
+        <value type="int" value="3"/>
+        <value type="int" value="2"/>
+      </property>
+    </property>
+  </property>
+  <property name="plugins" type="empty">
+    <property name="plugin-1" type="string" value="whiskermenu"/>
+    <property name="plugin-2" type="string" value="clock"/>
+    <property name="plugin-3" type="string" value="systray">
+      <property name="show-frame" type="bool" value="false"/>
+    </property>
+    <property name="plugin-4" type="string" value="pulseaudio">
+      <property name="enable-keyboard-shortcuts" type="bool" value="true"/>
+    </property>
+    <property name="plugin-5" type="string" value="tasklist">
+      <property name="show-handle" type="bool" value="false"/>
+    </property>
+    <property name="plugin-7" type="string" value="separator">
+      <property name="expand" type="bool" value="true"/>
+      <property name="style" type="uint" value="0"/>
+    </property>
+    <property name="plugin-8" type="string" value="launcher">
+      <property name="items" type="array">
+        <value type="string" value="/usr/share/applications/exo-file-manager.desktop"/>
+      </property>
+    </property>
+    <property name="plugin-9" type="string" value="launcher">
+      <property name="items" type="array">
+       <value type="string" value="/etc/xdg/xfce4/panel/launcher-xvkbd/xvkbd.desktop"/>
+      </property>
+    </property>
+    <property name="plugin-10" type="string" value="launcher">
+      <property name="items" type="array">
+        <value type="string" value="/usr/share/applications/exo-terminal-emulator.desktop"/>
+      </property>
+    </property>
+    <property name="plugin-11" type="string" value="separator">
+      <property name="style" type="uint" value="1"/>
+    </property>
+    <property name="plugin-12" type="string" value="separator"/>
+  </property>
+</channel>
diff --git a/modules/xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml b/modules/xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
new file mode 100644 (file)
index 0000000..e1206fd
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<channel name="xfwm4" version="1.0">
+  <property name="general" type="empty">
+    <property name="workspace_count" type="int" value="1" />
+  </property>
+</channel>
diff --git a/modules/xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml b/modules/xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
new file mode 100644 (file)
index 0000000..5b74cf3
--- /dev/null
@@ -0,0 +1,46 @@
+<!--
+  Default values for the X settings registry as described in
+  http://www.freedesktop.org/wiki/Specifications/XSettingsRegistry
+-->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<channel name="xsettings" version="1.0">
+  <property name="Net" type="empty">
+    <property name="ThemeName" type="string" value="Breeze"/>
+    <property name="IconThemeName" type="string" value="oxygen"/>
+    <property name="DoubleClickTime" type="int" value="400"/>
+    <property name="DoubleClickDistance" type="int" value="5"/>
+    <property name="DndDragThreshold" type="int" value="8"/>
+    <property name="CursorBlink" type="bool" value="true"/>
+    <property name="CursorBlinkTime" type="int" value="1200"/>
+    <property name="SoundThemeName" type="string" value="default"/>
+    <property name="EnableEventSounds" type="bool" value="false"/>
+    <property name="EnableInputFeedbackSounds" type="bool" value="false"/>
+  </property>
+  <property name="Xft" type="empty">
+    <property name="DPI" type="empty"/>
+    <property name="Antialias" type="int" value="-1"/>
+    <property name="Hinting" type="int" value="-1"/>
+    <property name="HintStyle" type="string" value="hintnone"/>
+    <property name="RGBA" type="string" value="none"/>
+    <!-- <property name="Lcdfilter" type="string" value="none"/> -->
+  </property>
+  <property name="Gtk" type="empty">
+    <property name="CanChangeAccels" type="bool" value="false"/>
+    <property name="ColorPalette" type="string" value="black:white:gray50:red:purple:blue:light blue:green:yellow:orange:lavender:brown:goldenrod4:dodger blue:pink:light green:gray10:gray30:gray75:gray90"/>
+    <property name="FontName" type="string" value="Sans 10"/>
+    <property name="IconSizes" type="string" value=""/>
+    <property name="KeyThemeName" type="string" value=""/>
+    <property name="ToolbarStyle" type="string" value="icons"/>
+    <property name="ToolbarIconSize" type="int" value="3"/>
+    <!-- <property name="IMPreeditStyle" type="string" value=""/> -->
+    <!-- <property name="IMStatusStyle" type="string" value=""/> -->
+    <!-- <property name="IMModule" type="string" value=""/> -->
+    <property name="MenuImages" type="bool" value="true"/>
+    <property name="ButtonImages" type="bool" value="true"/>
+    <property name="MenuBarAccel" type="string" value="F10"/>
+    <property name="CursorThemeName" type="string" value=""/>
+    <property name="CursorThemeSize" type="int" value="0"/>
+    <property name="DecorationLayout" type="string" value="menu:minimize,maximize,close"/>
+  </property>
+</channel>