Compare commits
16 commits
nanodesk-i
...
main
Author | SHA1 | Date | |
---|---|---|---|
0bda550e3b | |||
adee0c95d9 | |||
ad42d8eb2a | |||
a4ed8568fe | |||
0aace9c02c | |||
b1500796e0 | |||
|
d3c5faf205 | ||
9179806421 | |||
92e76f1a94 | |||
e676582a1e | |||
1e1c9dedac | |||
b0b8f6d793 | |||
4524ebf944 | |||
1eb344ffd3 | |||
f92e632b0a | |||
9e48937e3c |
10 changed files with 135 additions and 20 deletions
9
LICENSE
Normal file
9
LICENSE
Normal 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.
|
|
@ -47,6 +47,8 @@ Here you go!
|
|||
|
||||
![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_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/
|
||||
- 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/
|
||||
- Tux: https://archive.org/details/linuxmandrake7.2chipedition
|
||||
|
|
|
@ -128,15 +128,15 @@ apt install -y --no-install-recommends \
|
|||
tango-icon-theme \
|
||||
squashfs-tools \
|
||||
synaptic \
|
||||
imagemagick \
|
||||
ifstat \
|
||||
/tmp/xdgmenumaker*.deb || error
|
||||
|
||||
message "install nanodesk base packages with recommends"
|
||||
apt install -y \
|
||||
grub-pc \
|
||||
connman \
|
||||
connman-ui \
|
||||
connman-gtk \
|
||||
connman-vpn \
|
||||
network-manager \
|
||||
network-manager-gnome \
|
||||
net-tools \
|
||||
isc-dhcp-client \
|
||||
host \
|
||||
|
@ -144,9 +144,6 @@ apt install -y \
|
|||
gvfs-common \
|
||||
pcmanfm \
|
||||
|
||||
message "remove package ifupdown because it would conflict with connman"
|
||||
apt purge -y ifupdown
|
||||
|
||||
#message "install linux-kernel from backports"
|
||||
#apt install -t bullseye-backports -y linux-image-amd64
|
||||
|
||||
|
|
|
@ -114,20 +114,13 @@ done
|
|||
message "copy build/nanodesk-files/ to 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"
|
||||
#$CHROOTCMD /usr/bin/chmod 440 /etc/sudoers || 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 || 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"
|
||||
$CHROOTCMD /usr/bin/update-alternatives --set x-terminal-emulator /usr/bin/lxterminal
|
||||
|
|
|
@ -136,8 +136,8 @@
|
|||
<IconPath>
|
||||
/usr/local/share/jwm
|
||||
</IconPath>
|
||||
<!-- the comment below is important for nanodesk to put in the actual IconPaths of the system generated by makeanything.sh -->
|
||||
<!-- GENERATED ICONLIST -->
|
||||
<!-- List of IconPath gets generated by nanodesk-gen-iconlist helperscript -->
|
||||
<Include>exec:nanodesk-gen-iconlist</Include>
|
||||
|
||||
|
||||
<!-- Virtual Desktops -->
|
||||
|
@ -197,7 +197,7 @@
|
|||
<StartupCommand>pcmanfm --desktop -p nanodesk</StartupCommand>
|
||||
<StartupCommand>xscreensaver -no-splash</StartupCommand>
|
||||
<StartupCommand>volumeicon</StartupCommand>
|
||||
<StartupCommand>connman-gtk</StartupCommand>
|
||||
<StartupCommand>nm-applet</StartupCommand>
|
||||
|
||||
|
||||
</JWM>
|
||||
|
|
4
nanodesk-files/usr/bin/nanodesk-gen-iconlist
Normal file
4
nanodesk-files/usr/bin/nanodesk-gen-iconlist
Normal 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>"
|
89
nanodesk-files/usr/bin/nanodesk-menumaker
Executable file
89
nanodesk-files/usr/bin/nanodesk-menumaker
Executable 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>"
|
||||
|
|
@ -177,8 +177,28 @@ while [ $STEPFINISH != 1 ]
|
|||
do
|
||||
case $USERSTEP in
|
||||
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'"
|
||||
$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 |
BIN
screenshots/nanodesk_7-n-i-gxm.png
Normal file
BIN
screenshots/nanodesk_7-n-i-gxm.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
Loading…
Reference in a new issue