diff --git a/woof-code/3builddistro b/woof-code/3builddistro index 51cfc3b1f44..2e6945f74e6 100755 --- a/woof-code/3builddistro +++ b/woof-code/3builddistro @@ -153,6 +153,7 @@ chroot rootfs-complete install -D -m 644 /home/spot/.config/mimeapps.list /root/ chroot rootfs-complete install -D -m 644 /home/spot/.config/mimeapps.list /etc/skel/.config/mimeapps.list chroot rootfs-complete /etc/rc.d/rc.update w +chroot rootfs-complete run-as-spot fixmenus rm -rf build mkdir build diff --git a/woof-code/rootfs-petbuilds/fixmenusd/README.md b/woof-code/rootfs-petbuilds/fixmenusd/README.md index 7753d9e5fae..7196c0fe0d1 100644 --- a/woof-code/rootfs-petbuilds/fixmenusd/README.md +++ b/woof-code/rootfs-petbuilds/fixmenusd/README.md @@ -1 +1 @@ -fixmenusd uses inotify to watch /usr/share/applications and runs argv[1] on change. +fixmenusd uses inotify to watch /usr/share/applications and runs fixmenus on change. diff --git a/woof-code/rootfs-petbuilds/fixmenusd/etc/skel/.config/autostart/fixmenusd.desktop b/woof-code/rootfs-petbuilds/fixmenusd/etc/skel/.config/autostart/fixmenusd.desktop index 396cac66851..6b7fb9e8793 100644 --- a/woof-code/rootfs-petbuilds/fixmenusd/etc/skel/.config/autostart/fixmenusd.desktop +++ b/woof-code/rootfs-petbuilds/fixmenusd/etc/skel/.config/autostart/fixmenusd.desktop @@ -2,6 +2,6 @@ Version=1.0 Name=fixmenusd Comment=fixmenus daemon -Exec=fixmenusd "fixmenus; killall -HUP labwc" +Exec=fixmenusd Terminal=false Type=Application \ No newline at end of file diff --git a/woof-code/rootfs-petbuilds/fixmenusd/fixmenusd.c b/woof-code/rootfs-petbuilds/fixmenusd/fixmenusd.c index aa341e36084..53b4b5cf194 100644 --- a/woof-code/rootfs-petbuilds/fixmenusd/fixmenusd.c +++ b/woof-code/rootfs-petbuilds/fixmenusd/fixmenusd.c @@ -11,14 +11,14 @@ #include static int -sh(const char *cmd, const sigset_t *set) +fixmenus(const sigset_t *set) { pid_t pid, reaped; pid = fork(); if (pid == 0) { if (sigprocmask(SIG_SETMASK, set, NULL) == 0) - execl("/bin/sh", "/bin/sh", "-c", cmd, (char *)NULL); + execlp("fixmenus", "fixmenus", (char *)NULL); exit(EXIT_FAILURE); } @@ -77,7 +77,7 @@ main(int argc, char* argv[]) sigset_t set, oset; int fd, appwd, flatpakappwd, sig; - if (argc != 2) + if (argc != 1) return EXIT_FAILURE; if ((sigemptyset(&set) < 0) || @@ -115,7 +115,7 @@ main(int argc, char* argv[]) (((sig == SIGRTMIN) && (handle_events(fd, appwd, flatpakappwd, &oset) == 0)) || ((sig == SIGALRM) && - (sh(argv[1], &oset) == 0)) || + (fixmenus(&oset) == 0)) || (sig == SIGCHLD))); inotify_rm_watch(fd, flatpakappwd); diff --git a/woof-code/rootfs-skeleton/etc/rc.d/rc.update b/woof-code/rootfs-skeleton/etc/rc.d/rc.update index 01676121306..e4335fc5583 100755 --- a/woof-code/rootfs-skeleton/etc/rc.d/rc.update +++ b/woof-code/rootfs-skeleton/etc/rc.d/rc.update @@ -32,10 +32,6 @@ update_cache_files() { fi done - if [ /usr/bin/labwc-xdgmenu ] ; then - LANG=C run-as-spot fixmenus #Reconstruct configuration files for JWM, IceWM... - [ -n "$WAYLAND_DISPLAY" ] && killall -HUP labwc - fi if [ -e /usr/bin/update-desktop-database ] ; then rm -f /usr/share/applications/mimeinfo.cache 2>/dev/null update-desktop-database /usr/share/applications diff --git a/woof-code/rootfs-skeleton/usr/local/bin/fixmenus b/woof-code/rootfs-skeleton/usr/local/bin/fixmenus index 1f172f6978c..2a884252690 100755 --- a/woof-code/rootfs-skeleton/usr/local/bin/fixmenus +++ b/woof-code/rootfs-skeleton/usr/local/bin/fixmenus @@ -12,18 +12,10 @@ #120209 this script now called from /usr/sbin/quicksetup, whenever locale is changed. #120216 sss translation file now uses simple sed expressions. -[ ! "$HOME" ] && HOME='/root' -[ "$HOME" = "/" ] && HOME='/root' -export HOME - -LANG1="${LANG%_*}" #120207 ex: de - for ONESRC in `ls /etc/xdg/templates/_* 2>/dev/null` #ex: _root_.jwmrc do ONEDEST=${ONESRC##*/} # basename: _root_.jwmrc - if [ "$HOME" != "/root" ] ; then - ONEDEST=${ONEDEST//_root/$HOME} # _root.jwmrc -> /home/finn_.jwmrc - fi + ONEDEST=${ONEDEST//_root/$HOME} # _root.jwmrc -> /home/finn_.jwmrc ONEDEST=${ONEDEST//_/\/} # _root_.jwmrc -> /root/.jwmrc echo "Generating $ONEDEST..." @@ -44,4 +36,6 @@ do mv -f ${TMPDEST} ${ONEDEST} done +labwc -r + ###END### diff --git a/woof-code/rootfs-skeleton/usr/local/bin/logout_gui b/woof-code/rootfs-skeleton/usr/local/bin/logout_gui index 7bd814aa0d3..a376bcb3b82 100755 --- a/woof-code/rootfs-skeleton/usr/local/bin/logout_gui +++ b/woof-code/rootfs-skeleton/usr/local/bin/logout_gui @@ -21,7 +21,7 @@ exec yad \ --field "$(gettext 'Install Puppy')"\!media-flash-symbolic:FBTN "kill \$YAD_PID; bootflash" \ --field "$(gettext 'Restart graphical server')"\!view-refresh-symbolic:FBTN "kill \$YAD_PID; restartwm" \ --field "$(gettext 'Exit to Prompt')"\!application-exit-symbolic:FBTN "kill \$YAD_PID; wmexit" \ - --field "$(gettext 'Rebuild Menu')"\!open-menu-symbolic:FBTN "kill \$YAD_PID; fixmenus; killall -HUP labwc" \ + --field "$(gettext 'Rebuild Menu')"\!open-menu-symbolic:FBTN "kill \$YAD_PID; fixmenus" \ --field "$(gettext 'Lock screen')"\!system-lock-screen-symbolic:FBTN "kill \$YAD_PID; swaylock" \ --no-buttons \ --use-interp