x11-wm/fluxbox fluxbox-generate_menu lists all available programs.
Hello! The script fluxbox-generate_menu shipped with current versions of fluxbox (fluxbox-1.1.0.1_1 and 1.1.1 too, I think) produces menu with all known programs. The reason for it is find_it* family of functions used to determine if the program exists (see attached test.sh). It expects that 'hash' will return non-zero exit code when it cannot find the command and it is true on linix (some Ubuntu with 'dash', surprisingly enough, man says it is BSD sh), but not here: ~ uname -a FreeBSD wep4035.physik.uni-wuerzburg.de 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sun Sep 21 18:51:53 CEST 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC amd64 ~ ./test.sh ls Found ls ~ ./test.sh bla-bla-non-existent Found bla-bla-non-existent Substituting 'hash' with 'which' solves the problem more or less, but I am not a sh guru to claim it is 100% correct. It could be also a sh(1) bug... Alexey. #!/bin/sh find_it() { [ -n $1 ] hash $1 2 /dev/null shift $@ } find_it $1 echo Found $1 exit 0 ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: x11-wm/fluxbox fluxbox-generate_menu lists all available programs.
On Mon, 22 Sep 2008 12:52:49 -0500, Alexey Shuvaev [EMAIL PROTECTED] wrote: Hello! The script fluxbox-generate_menu shipped with current versions of fluxbox (fluxbox-1.1.0.1_1 and 1.1.1 too, I think) produces menu with all known programs. The reason for it is find_it* family of functions used to determine if the program exists (see attached test.sh). It expects that 'hash' will return non-zero exit code when it cannot find the command and it is true on linix (some Ubuntu with 'dash', surprisingly enough, man says it is BSD sh), but not here: ~ uname -a FreeBSD wep4035.physik.uni-wuerzburg.de 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sun Sep 21 18:51:53 CEST 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC amd64 ~ ./test.sh ls Found ls ~ ./test.sh bla-bla-non-existent Found bla-bla-non-existent Substituting 'hash' with 'which' solves the problem more or less, but I am not a sh guru to claim it is 100% correct. I agree for 'which' is best thing to do. Not all shells (csh, see in builtin(1)) have 'hash' stuff. I have bring all of hash - which stuff from 1.0.0, so let me know patches work for you. http://people.freebsd.org/~mezz/diff/patch-util%3a%3afluxbox-generate_menu.in http://people.freebsd.org/~mezz/diff/patch-util_fbsetbg Put those files in x11-wm/fluxbox/files/ and reinstall fluxbox. It could be also a sh(1) bug... No idea, I get same result with zsh. Cheers, Mezz Alexey. -- [EMAIL PROTECTED] - [EMAIL PROTECTED] FreeBSD GNOME Team http://www.FreeBSD.org/gnome/ - [EMAIL PROTECTED] ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: x11-wm/fluxbox fluxbox-generate_menu lists all available programs.
On Mon, 22 Sep 2008 14:16:35 -0500 Jeremy Messenger [EMAIL PROTECTED] wrote: I agree for 'which' is best thing to do. Not all shells (csh, see in builtin(1)) have 'hash' stuff. I have bring all of hash - which stuff from 1.0.0, so let me know patches work for you. http://people.freebsd.org/~mezz/diff/patch-util%3a%3afluxbox-generate_menu.in http://people.freebsd.org/~mezz/diff/patch-util_fbsetbg Put those files in x11-wm/fluxbox/files/ and reinstall fluxbox. The patch-util_fbsetbg fixed the inability to set backgrounds. I had almost forgotten about this minor problem. The fluxbox-generate_menu.in patch results in an improved function but I recommend users backup their ~/.fluxbox in case it does something odd (I have a highly customized menu). Thanks again for fluxbox patches ;-) Randy -- ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: x11-wm/fluxbox fluxbox-generate_menu lists all available programs.
On Mon, Sep 22, 2008 at 06:35:20PM -0400, Randy Pratt wrote: On Mon, 22 Sep 2008 14:16:35 -0500 Jeremy Messenger [EMAIL PROTECTED] wrote: I agree for 'which' is best thing to do. Not all shells (csh, see in builtin(1)) have 'hash' stuff. I have bring all of hash - which stuff from 1.0.0, so let me know patches work for you. http://people.freebsd.org/~mezz/diff/patch-util%3a%3afluxbox-generate_menu.in http://people.freebsd.org/~mezz/diff/patch-util_fbsetbg Put those files in x11-wm/fluxbox/files/ and reinstall fluxbox. Everything seems to be fine now. The patch-util_fbsetbg fixed the inability to set backgrounds. I had almost forgotten about this minor problem. The fluxbox-generate_menu.in patch results in an improved function but I recommend users backup their ~/.fluxbox in case it does something odd (I have a highly customized menu). This function gives some (not so bad) starting point for those who have never used fluxbox before. Thanks again for fluxbox patches ;-) Me too :) Alexey. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: x11-wm/fluxbox fluxbox-generate_menu lists all available programs.
On Mon, 22 Sep 2008 18:10:44 -0500, Alexey Shuvaev [EMAIL PROTECTED] wrote: On Mon, Sep 22, 2008 at 06:35:20PM -0400, Randy Pratt wrote: On Mon, 22 Sep 2008 14:16:35 -0500 Jeremy Messenger [EMAIL PROTECTED] wrote: I agree for 'which' is best thing to do. Not all shells (csh, see in builtin(1)) have 'hash' stuff. I have bring all of hash - which stuff from 1.0.0, so let me know patches work for you. http://people.freebsd.org/~mezz/diff/patch-util%3a%3afluxbox-generate_menu.in I forgot to say that make sure to rename it to patch-util::fluxbox-generate_menu.in. In case, if you haven't done then be sure to remove this patch before you update your ports tree. http://people.freebsd.org/~mezz/diff/patch-util_fbsetbg Put those files in x11-wm/fluxbox/files/ and reinstall fluxbox. Everything seems to be fine now. The patch-util_fbsetbg fixed the inability to set backgrounds. I had almost forgotten about this minor problem. The fluxbox-generate_menu.in patch results in an improved function but I recommend users backup their ~/.fluxbox in case it does something odd (I have a highly customized menu). This function gives some (not so bad) starting point for those who have never used fluxbox before. Yeah, it's good for fresh account or ~/.fluxbox/*. But any users that have custom menu shouldn't be use fluxbox-generate_menu thought. Thanks again for fluxbox patches ;-) Me too :) Np and thank for test. Both patches have been committed. Cheers, Mezz Alexey. -- [EMAIL PROTECTED] - [EMAIL PROTECTED] FreeBSD GNOME Team http://www.FreeBSD.org/gnome/ - [EMAIL PROTECTED] ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]