1

I have a simple script that stores the user info in a file and then locks the screen:

#!/bin/bash
echo $USER > /tmp/file.txt
# Lock the screen:
gnome-screensaver-command -l

When I execute it from the terminal, my username is stored inside. But when it is executed from the shortcut Super+L, it just locks the screen, and there is no file present. Why is this?

Kevin Bowen
  • 20,055
  • 57
  • 82
  • 84
igobivo
  • 153

0 Answers0