N
N
nepster-web2015-03-09 14:46:00
Debian
nepster-web, 2015-03-09 14:46:00

How to run sh script in graphical shell?

Wrote this script:

#!/bin/bash
sudo pm-suspend

Checked the box:
Allow this file to run as a program.
I'm trying to run the file and nothing happens. If you run through the terminal, then everything works. What is the problem ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tolik, 2015-03-09
@Diel

Option 1:
#!/bin/bash
gksudo pm-suspend
Option 2:
#!/bin/bash
gnome-terminal -e 'sudo pm-suspend'
# or your other terminal

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question