Hello all! I actually am not currently using opensuse, I'm using Ubuntu 16.04. I have been messing around with using Cinnamon desktop on it instead of unity. However one problem I have is that I cannot suspend (aka put the computer to sleep) within the Cinnamon UI. I've found a way around it was downloading s2ram (apparently created by openSuse, according to google) and typing

~$ sudo s2ram -f -a 1
This works perfectly but I tried setting a keyboard shortcut for it in cinnamon settings and it doesn't work. I am still somewhat new to linux, though I've been using it for about 4 months now almost exclusively, but I think that I'm not able to issue sudo commands with a keyboard shortcut.

So what I'm really trying to figure out now is to actually make some sort of autoexecutable file on my desktop to let me go to sleep mode, or even making a cinnamon applet that will do this for me. Any pointers on this? What I mean by autoexecutable is that if I were to press this theoretical desktop icon I'd be able to put the computer in sleep, instead of typing the full code and my password in the terminal every time.

P.S. I already have tried all the current shutdown applets available on Cinnamon to no success.

P.S.S. I have already tried using sudo pm-suspend in the terminal. I have also tried editing the etc/pm/sleep.d files as some suggested on the Linux Mint forums. Really I just want to use s2ram exclusively in Cinnamon at this point, to be clear.