diff --git a/util/fbsetbg b/util/fbsetbg index 0bdb804a..e2773171 100644 --- a/util/fbsetbg +++ b/util/fbsetbg @@ -505,7 +505,11 @@ if [ "$option" = random ]; then randomnumber=`random_number` # some shells don't support $RANDOM elif [ -z "$RANDOM" ]; then - randomnumber=`(echo $$ ;time ps; w ; date )2>&1 | cksum | cut -f1 -d' '` + if [ -r /dev/urandom ]; then + randomnumber=`hexdump -n 2 -e '/2 "%u"' /dev/urandom` + else + randomnumber=`(echo $$; ps; w; date) 2>&1 | cksum | cut -f1 -d' '` + fi else randomnumber="$RANDOM" fi @@ -526,7 +530,7 @@ fi if [ ! -r "$wallpaper" ]; then - if [ "$ignore_missing_wallpaper" == "true" ]; then + if [ "$ignore_missing_wallpaper" = "true" ]; then exit 0 fi message "Can't find wallpaper $wallpaper" diff --git a/util/fluxbox-generate_menu.in b/util/fluxbox-generate_menu.in index 63c152ea..eb6414ce 100755 --- a/util/fluxbox-generate_menu.in +++ b/util/fluxbox-generate_menu.in @@ -331,7 +331,7 @@ searchForIcon(){ if [ -f "$entry_icon" ]; then # if icon exists and entry does not already exists, add it if ! grep -q -m 1 "^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>" $ICONMAPPING 2> /dev/null; then - echo -e "\"${entry_exec}\" \t <${entry_icon}>" >> $ICONMAPPING + printf "\"${entry_exec}\" \t <${entry_icon}>\n" >> $ICONMAPPING else : echo "# mapping already exists for ${entry_exec}" >> $ICONMAPPING fi