Why can't I make a Desktop shutdown icon?

ln -s /boot/system/bin/“shutdown -r” /boot/home/Desktop

that’s because -r is a flag to be used in the terminal.

the proper way to test if the bug is resolved, is to navigate to /boot/system/bin with tracker, and double click the shutdown binary and see if it shuts down without error.

Yes, the Shutdown binary (/boot/system/bin) shuts down without error upon clicking in r38903 as does the symlink that I made.
However, based on your comment regarding my reboot attempt, it’s impossible in Haiku to create a symlink to reboot simply because there is no reboot binary in Haiku.
Is this correct?
(It’s really no big deal as the reboot script that you suggested some time ago works fine. But I’m just curious).

I think you should leave the symlink approach and do a bash script instead

‘there is no reboot binary in Haiku.’

I don’t think there is, and this is handled via the shutdown binary with the appropriate parameter.

Yes you need to make a bash script or try yab to make a shutdown window for you:

Something like this:

#!/bin/sh
if [ “$(alert “Shutdown Script Example” “shutdown” “reboot”)” == “reboot” ]; then
shutdown -r
else
shutdown
fi

Right click on the file and then select “get info”. activate the permissions using the up-arrow and set permission to execute for all (user, group, other).

Links:

Add a icon: http://www.besly.de/menu/search/archiv/pref/haikuicon_eng.html

OK, thank you. That works fine.

that script works perfectly but the alert can’t be skipped so it’s better to add a cancel button

#! /bin/sh

case $(alert --info “Leave this system by:” “Shutdown” “Reboot” “Cancel”) in

"Shutdown")

		shutdown
		
		;;
		
"Reboot")

		shutdown -r
		
		;;
		
*)

		exit
		
		;;

esac

Once you have saved this file (it’s better to save it in your home/config/bin) and added a icon (google for a shutdown.svg image) as lelldorin described, you can add a deskbar replicant too by saving another script to /boot/home/config/boot/launch, this should contain a similar code

#! /bin/sh

desklink “cmd=Shutdown:/bin/shutdown” “cmd=Reboot:/bin/shutdown -r” “cmd=Remove Replicant:desklink --remove=Shutdown” /boot/home/config/bin/Shutdown

this time there is no need for an icon but you have to mark it as executable like it was done with the previous file, once this script has been loaded a replicant should appear on deskbar, a primary mouse button click open the alert script, the secondary mouse button click shows a menu

sorry for this unsolicited reply, this seems to be a boring holiday morning

Is there any way to start the screensaver from the command line and add to this script?

Thanks,
hey68you

[quote=hey68you]Is there any way to start the screensaver from the command line and add to this script?

Thanks,
hey68you[/quote]

I suppose this can be done invoking screen_blanker but I don’t know if this has got any args

[quote=hey68you]Is there any way to start the screensaver from the command line and add to this script?

Thanks,
hey68you[/quote]

http://betips.net/1997/09/09/run-screensavers-from-the-terminal/