Compare commits

...

16 commits

Author SHA1 Message Date
0bda550e3b add LICENSE 2024-09-27 18:51:20 +02:00
adee0c95d9 add ifstat pkg to install_base no-recommends 2024-01-03 00:47:36 +01:00
ad42d8eb2a add imagemagick pkg to install_base no-recommends 2024-01-03 00:41:28 +01:00
a4ed8568fe update README 2023-12-12 03:04:31 +01:00
0aace9c02c updated screenshots 2023-12-12 02:56:08 +01:00
b1500796e0 nanodesk-menumaker is far away from being usable. its just an experiment 2023-10-26 18:30:33 +02:00
DeltaLima
d3c5faf205 first try of own menumaker to get rid of the xdgmenumaker package 2023-10-24 17:40:36 +02:00
9179806421 remove generating hardcoded iconlist for jwm config 2023-10-24 01:46:37 +02:00
92e76f1a94 use nanodesk-gen-iconlist in jwm config 2023-10-24 01:42:14 +02:00
e676582a1e nanodesk-gen-iconlist helperscript
to create iconlist dynamic at start and not hardcoded when building the iso
2023-10-24 01:39:45 +02:00
1e1c9dedac typo fixed 2023-10-23 16:17:43 +02:00
b0b8f6d793 typo fixed 2023-10-23 16:01:34 +02:00
4524ebf944 replace connman-gtk with nm-applet 2023-10-23 15:11:14 +02:00
1eb344ffd3 ask if root password should be changed 2023-10-23 12:23:32 +02:00
f92e632b0a keep ifupdown package 2023-10-23 12:14:29 +02:00
9e48937e3c use network-manager instead of connman
connman does not work probably and i havent found out why yet (havent searched that much).
a short test and comparison shows up, that the memory consumption of both is close to identical.

So I choose now network-manager, which is much more common and comes with a much better support and feature set.
2023-10-23 12:13:24 +02:00
10 changed files with 135 additions and 20 deletions

9
LICENSE Normal file
View file

@ -0,0 +1,9 @@
MIT License
Copyright (c) 2024 DeltaLima
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -47,6 +47,8 @@ Here you go!
![nanodesk_6](screenshots/nanodesk_6.png) ![nanodesk_6](screenshots/nanodesk_6.png)
![nanodesk_7-n-i-gxm](screenshots/nanodesk_7-n-i-gxm.png)
![nanodesk_7](screenshots/nanodesk_7.png) ![nanodesk_7](screenshots/nanodesk_7.png)
![nanodesk_7](screenshots/nanodesk_8.png) ![nanodesk_7](screenshots/nanodesk_8.png)
@ -199,3 +201,4 @@ Download: [http://pub.la10cy.net/nanodesk/](http://pub.la10cy.net/nanodesk/)
- xdgmenumaker deb package: https://bgstack15.wordpress.com/2020/03/03/package-for-devuan-xdgmenumaker/ - xdgmenumaker deb package: https://bgstack15.wordpress.com/2020/03/03/package-for-devuan-xdgmenumaker/
- How To debootstrap a small desktop system: https://git.la10cy.net/DeltaLima/devnull/src/branch/main/debootstrap_minimal_dekstop_from_scratch.md - How To debootstrap a small desktop system: https://git.la10cy.net/DeltaLima/devnull/src/branch/main/debootstrap_minimal_dekstop_from_scratch.md
- How To create a linux live cd: https://www.willhaley.com/blog/custom-debian-live-environment/ - How To create a linux live cd: https://www.willhaley.com/blog/custom-debian-live-environment/
- Tux: https://archive.org/details/linuxmandrake7.2chipedition

View file

@ -128,15 +128,15 @@ apt install -y --no-install-recommends \
tango-icon-theme \ tango-icon-theme \
squashfs-tools \ squashfs-tools \
synaptic \ synaptic \
imagemagick \
ifstat \
/tmp/xdgmenumaker*.deb || error /tmp/xdgmenumaker*.deb || error
message "install nanodesk base packages with recommends" message "install nanodesk base packages with recommends"
apt install -y \ apt install -y \
grub-pc \ grub-pc \
connman \ network-manager \
connman-ui \ network-manager-gnome \
connman-gtk \
connman-vpn \
net-tools \ net-tools \
isc-dhcp-client \ isc-dhcp-client \
host \ host \
@ -144,9 +144,6 @@ apt install -y \
gvfs-common \ gvfs-common \
pcmanfm \ pcmanfm \
message "remove package ifupdown because it would conflict with connman"
apt purge -y ifupdown
#message "install linux-kernel from backports" #message "install linux-kernel from backports"
#apt install -t bullseye-backports -y linux-image-amd64 #apt install -t bullseye-backports -y linux-image-amd64

View file

@ -114,20 +114,13 @@ done
message "copy build/nanodesk-files/ to build/chroot/" message "copy build/nanodesk-files/ to build/chroot/"
sudo cp -r build/nanodesk-files/* build/chroot/ sudo cp -r build/nanodesk-files/* build/chroot/
message "generate icon path list for jwm config"
find build/chroot/usr/share/icons/ -type d | sed 's/build\/chroot//g' > build/tmp/jwm.iconlist
sed -i -e 's/^/\ \ \ \ <IconPath>/g' -e 's/$/<\/IconPath>/g' build/tmp/jwm.iconlist
sudo cp build/tmp/jwm.iconlist build/chroot/tmp/ || error
message "putting generated icon path list to /etc/jwm/system.nanodesk.jwmrc"
$CHROOTCMD sed -i '/<\!-- GENERATED ICONLIST -->/r /tmp/jwm.iconlist' /etc/jwm/system.nanodesk.jwmrc || error
message "correct file permissions" message "correct file permissions"
#$CHROOTCMD /usr/bin/chmod 440 /etc/sudoers || error #$CHROOTCMD /usr/bin/chmod 440 /etc/sudoers || error
$CHROOTCMD /usr/bin/chmod 755 /usr/sbin/nanodesk-installer || error $CHROOTCMD /usr/bin/chmod 755 /usr/sbin/nanodesk-installer || error
$CHROOTCMD /usr/bin/chmod 755 /usr/bin/nanodesk-installer-gxm || error $CHROOTCMD /usr/bin/chmod 755 /usr/bin/nanodesk-installer-gxm || error
$CHROOTCMD /usr/bin/chmod 755 /usr/bin/nanodesk || error $CHROOTCMD /usr/bin/chmod 755 /usr/bin/nanodesk || error
$CHROOTCMD /usr/bin/chmod 755 /usr/bin/nanodesk-first-start || error $CHROOTCMD /usr/bin/chmod 755 /usr/bin/nanodesk-first-start || error
$CHROOTCMD /usr/bin/chmod 755 /usr/bin/nanodesk-gen-iconlist || error
message "set x-terminal-emulator to lxterminal" message "set x-terminal-emulator to lxterminal"
$CHROOTCMD /usr/bin/update-alternatives --set x-terminal-emulator /usr/bin/lxterminal $CHROOTCMD /usr/bin/update-alternatives --set x-terminal-emulator /usr/bin/lxterminal

View file

@ -136,8 +136,8 @@
<IconPath> <IconPath>
/usr/local/share/jwm /usr/local/share/jwm
</IconPath> </IconPath>
<!-- the comment below is important for nanodesk to put in the actual IconPaths of the system generated by makeanything.sh --> <!-- List of IconPath gets generated by nanodesk-gen-iconlist helperscript -->
<!-- GENERATED ICONLIST --> <Include>exec:nanodesk-gen-iconlist</Include>
<!-- Virtual Desktops --> <!-- Virtual Desktops -->
@ -197,7 +197,7 @@
<StartupCommand>pcmanfm --desktop -p nanodesk</StartupCommand> <StartupCommand>pcmanfm --desktop -p nanodesk</StartupCommand>
<StartupCommand>xscreensaver -no-splash</StartupCommand> <StartupCommand>xscreensaver -no-splash</StartupCommand>
<StartupCommand>volumeicon</StartupCommand> <StartupCommand>volumeicon</StartupCommand>
<StartupCommand>connman-gtk</StartupCommand> <StartupCommand>nm-applet</StartupCommand>
</JWM> </JWM>

View file

@ -0,0 +1,4 @@
#!/bin/sh
echo "<JWM>"
find /usr/share/icons/ -type d | sed -e 's/^/\ \ \ \ <IconPath>/g' -e 's/$/<\/IconPath>/g'
echo "</JWM>"

View file

@ -0,0 +1,89 @@
#!/bin/bash
#
# nanodesk-menumaker - generate menu from .desktop files for jwm
#
# WORK IN PROGRESS
#
# DOES NOT WORK ATM
declare -A APPS_NAME
declare -A APPS_ICON
declare -A APPS_EXEC
declare -A CATEGORIES_APPS
# excluding 'Audio' and 'Video' because they are kind of redundant with 'AudioVideo'
FREEDESKTOP_CATEGORIES="AudioVideo Development Education Game Graphics Network Office Science Settings System Utility"
get_desktop_entry() {
# only get [Desktop Entry] section
# explanation https://stackoverflow.com/a/52957039
sed -n '/\[Desktop Entry\]/,/.*:\[.*\]/ {//!p}'
}
# Main freedesktop categories we iterate through later
# https://specifications.freedesktop.org/menu-spec/latest/apa.html
# put filename in front of its content with awk
# https://www.unix.com/302929136-post4.html?s=5d91d8bbc9c7a884772b0b84b3ca6c3f
#
# dumping all files into a variable is much faster then grepping each file by file
# sed for remove path from filename: sed 's/^\/.*\/\(.*\.desktop:\)/\1/'
# awk remove path from filename: https://stackoverflow.com/a/55149591
DESKTOPFILES="$(awk '{n=split(FILENAME,array,"/"); split(array[n],arraym,"."); print arraym[1]":" $0 }' /usr/share/applications/*.desktop $HOME/.local/share/applications/*.desktop | get_desktop_entry |grep -E ':Name=|:Icon=|:Categories=|:NoDisplay=|:Exec=' )"
APPS_NODISPLAY="$(echo "$DESKTOPFILES" | grep "NoDisplay=true" | cut -d : -f1 | xargs | tr ' ' '|')"
APPS="$(echo "$DESKTOPFILES" | grep -vE "$APPS_NODISPLAY" | cut -d : -f1 | uniq)"
# put the apps into the freedesktop categories
for category in $FREEDESKTOP_CATEGORIES
do
# echo === CATEGORY $category ===
CATEGORIES_APPS[$category]="$(echo "$DESKTOPFILES" | grep -i $category | cut -d : -f1 | uniq | xargs)"
# echo ${CATEGORIES_APPS[$category]}
done
for appname in $APPS
do
APPS_NAME[$appname]="$(echo "$DESKTOPFILES" | grep -E "^$appname.*Name=" | cut -d = -f2)"
APPS_ICON[$appname]="$(echo "$DESKTOPFILES" | grep -E "^$appname.*Icon=" | cut -d = -f2)"
APPS_EXEC[$appname]="$(echo "$DESKTOPFILES" | grep -E "^$appname.*Exec=" | cut -d = -f2)"
done
#
#echo "$APPS"
#echo ${!APPS_NAME[@]}
#echo ${APPS_NAME[xfce4-web-browser]}
#echo ${APPS_ICON[xfce4-web-browser]}
#echo ${APPS_EXEC[xfce4-web-browser]}
#echo ${APPS_CAT[xfce4-web-browser]}
#echo "$DESKTOPFILES"
# jwm config output
cat <<EOF
<?xml version="1.0"?>
<JWM>
EOF
for category in $FREEDESKTOP_CATEGORIES
do
# test "$category" == "AudioVideo" && category="Multimedia"
#echo -e "appname: $appname \nName: ${APPS_NAME[$appname]}\nIcon: ${APPS_ICON[$appname]}\nExec: ${APPS_EXEC[$appname]}\nCategories: ${APPS_CAT[$appname]}\n---"
test -n "${CATEGORIES_APPS[$category]}" && cat <<EOF
<Menu icon="applications-${category,,}" label="${category}">
EOF
for app in ${CATEGORIES_APPS[$category]}
do
echo " <Program icon=\""${APPS_ICON[$app]}"\" label=\""${APPS_NAME[$app]}"\">"${APPS_EXEC[$app]}"</Program>"
done
test -n "${CATEGORIES_APPS[$category]}" && echo "</Menu>"
done
echo "</JWM>"

View file

@ -177,9 +177,29 @@ while [ $STEPFINISH != 1 ]
do do
case $USERSTEP in case $USERSTEP in
u|U) u|U)
message "please change root pw"
$CHROOTCMD /usr/bin/passwd root || error CONTINUESTEP=false
while [ $CONTINUESTEP != true ]
do
message "Do you want to set a password for '${RED}root${ENDCOLOR}'?"
read -p "[y/n] > " ROOTPASSCHANGE
case ${ROOTPASSCHANGE,,} in
y|yes)
message "please change root pw"
$CHROOTCMD /usr/bin/passwd root || error
CONTINUESTEP=true
;;
n|no)
message "leaving root password empty"
CONTINUESTEP=true
;;
*)
message warn "Unrecognized answers, please try again..."
;;
esac
done
message "deleting user 'debian'" message "deleting user 'debian'"
$CHROOTCMD /usr/bin/id -u debian && $CHROOTCMD /usr/sbin/userdel -f debian || error $CHROOTCMD /usr/bin/id -u debian && $CHROOTCMD /usr/sbin/userdel -f debian || error

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB