Shutdown/Reboot from PHT (Ubuntu)

Is there any way of getting the shut down or reboot options from PHT to work when running Ubuntu? The shut down option only quits PHT as it is now.

 

I have PHT to start automatically when the server is started or rebooted, and since im mostly using a remote control it would be nice to be able to easily reboot the server after system updates etc without first having to quit PHT and then reach for the mouse just to be able to shut down/reboot.

 

Am currently running Ubuntu Gnome 15.04 (don't know if that information is needed).

 

 

 

Edit: Finally found a solution that works for me but had to do a lot of searching since a lot of threads contain the words shutdown/reboot etc...

 

Only tried "2nd method B" in the thread/post below, but worked fine for me.

https://forums.plex.tv/topic/136323-shutdown-question/?p=880452