4

I am running Ubuntu 13.04 and am trying to create an .sh file for conky in /usr/bin using gedit. When trying to save I get the error dialogue:

Could not save the file /usr/bin/conky-start.sh
You do not have the permissions necessary to save the file. Please check that you typed the location correctly and try again."

From searching, I think I have to run a command in terminal to allow permission, but I couldn't find out what that is.

Edit:
I'm trying to create the file conky-start.sh, not change or run it.
Thus far, I've opened gedit, copied and pasted some required info from the net, and I'm trying to save-as /usr/bin/conky-start.sh

Perhaps I need to create the file first in terminal, then edit it?

How would I do that?

guntbert
  • 13,485

2 Answers2

3

Please try:

gksudo gedit /usr/bin/conky-start.sh

Write the contents of the file and you should be able to save it. To make it executable, you may need to do:

sudo chmod +x /usr/bin/conky-start.sh
Seth
  • 59,442
  • 44
  • 149
  • 201
chili555
  • 61,440
  • I wish y'all would make up your minds! This edit admonishes me to use gksudo: askubuntu.com/questions/220048/ubuntu-12-04-wireless-wont-connect-with-gnome-network-manager-or-wicd/225161#225161 – chili555 Jun 28 '13 at 01:56
  • The file conky-start.sh doesn't exist yet. I'm trying to create it, not open it. – plaguedoctor Jun 28 '13 at 02:19
  • On my fully updated 13.04 system, I can create it with gksudo but not with pkexec. – chili555 Jun 28 '13 at 02:26
  • Finally got it. I just did "gksudo gedit", and then I was able to save the file anywhere I wanted. Thanks everyone for helping – plaguedoctor Jun 28 '13 at 06:41
2

You have to become super user, by using sudo command.

  1. Press Ctrl+Alt+T to bring up the terminal
  2. Type sudo gedit /usr/bin/conky-start.sh
  3. It will ask for the password. Type the password. Now you ll be able to save the save without any problem.

Read https://help.ubuntu.com/community/RootSudo for more information on sudo.

Mateo
  • 8,152
thefourtheye
  • 4,922