I made this script when executed will shutdown my system (after some time) and should enable a screensaver.

```
#!/bin/bash
sudo shutdown -h +30
gnome-screensaver-command -a

```

There are mainly two problems in this script.

1. It asks for password (which I don't want)
2. After executing `sudo shutdown -h +30` its not running `gnome-screensaver-command -a`

that is, it activates shutdown but not the screensaver

How to solve these problem?