3

I have XAMPP installed, and need to edit my httpd.conf file to add a virtual host block. If I right-click on the file in Nautilus and open with gedit, I can see all the content, but it's read-only.

If I try to open it via terminal, like this:

esther@estherLinuxSony:~$ sudo gedit opt/lampp/etc/extra/httpd-vhosts.conf

It opens the root version of gedit, but there's no content in the file.

How can I edit this file?

6

You are missing the slash before 'opt', the following should work:

gksudo gedit /opt/lampp/etc/extra/httpd-vhosts.conf
  • Thank you! Could you clarify what the difference is between sudo and gksudo? It seems to work either way. – EmmyS Jan 11 '11 at 18:59
  • 2
    gksudo will open a graphical dialog to prompt you for your password, while sudo will do it in the terminal. – Phil Miller Jan 11 '11 at 19:16
  • 1
    See psychocats.net/ubuntu/graphicalsudo – Lekensteyn Jan 11 '11 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.