PDA

View Full Version : [ubuntu] [SOLVED] How do I edit the host file?



mstruve
December 11th, 2008, 08:13 PM
Hi, sorry I have a total beginners question. I have literally just installed Ubuntu for the first time and am not hugely techy anyway. I've done a bit of reading around but can't find the answer to this:

I'm trying to get the iPhone VLC remote working, and have been told i need to :

VLC in the latest versions uses a file called '.hosts' to define which computers can access the VLC remote player. You need to open this file and edit it:

you will need to edit the hosts file:

the file is in /usr/share/vlc/http/.hosts (If you're using the old http interface, it's located in /usr/share/vlc/http/old/.hosts )

How do I do this? Where do i enter this code?

Thanks for your help.

Matt

jakev383
December 11th, 2008, 08:17 PM
Go to Applications -> Accessories -> Text Editor
then select the Open button and navigate to that directory you need. You'll need to right click on the dir listing in the center menu and select Show Hidden Files to see the file you want (a period as the first char of a filename signifies that it's hidden).

halitech
December 11th, 2008, 08:18 PM
you can either

a. Press Alt-F2 and type in
gksu gedit /usr/share/vlc/http/.hosts
or
b. open a terminal and paste in the same command.
or
c. open a terminal and type
sudo nano /usr/share/vlc/http/.hosts

mstruve
December 11th, 2008, 08:19 PM
Wow, thanks very much for your quick replies. Much appreciated.

halitech
December 11th, 2008, 08:20 PM
Go to Applications -> Accessories -> Text Editor
then select the Open button and navigate to that directory you need. You'll need to right click on the dir listing in the center menu and select Show Hidden Files to see the file you want (a period as the first char of a filename signifies that it's hidden).


the file is in /usr/share/vlc/ so they need to do it with sudo or they won't be able to save the file

mstruve
December 11th, 2008, 09:06 PM
the file is in /usr/share/vlc/ so they need to do it with sudo or they won't be able to save the file

yeah i think this is right, its saying "You do not have the necessary permissions to save the file. Please, check that you typed the location correctly and try again."

Will try the other way. Thanks.

mstruve
December 11th, 2008, 09:14 PM
you can either

a. Press Alt-F2 and type in
gksu gedit /usr/share/vlc/http/.hosts
or
b. open a terminal and paste in the same command.
or
c. open a terminal and type
sudo nano /usr/share/vlc/http/.hosts

Sorry one more stupid question - i've followed your instructions here, and seem to have edited the code, but how do i then 'save' the modified version?
Thanks

edit - sorry should also say i used option c in your list.
thanks

halitech
December 11th, 2008, 09:18 PM
if I remember right, it should be CTRL-O to save the file and CTRL-X to exit but just look at the bottom of the window, it should have the commands there

mstruve
December 11th, 2008, 09:24 PM
if I remember right, it should be CTRL-O to save the file and CTRL-X to exit but just look at the bottom of the window, it should have the commands there

Thanks again for all your help. VLC remote now working like a charm :)

halitech
December 11th, 2008, 09:27 PM
glad to hear that :) please remember to mark the thread solved in case others are serching for the same issue

oldos2er
December 11th, 2008, 11:01 PM
if I remember right, it should be CTRL-O to save the file and CTRL-X to exit but just look at the bottom of the window, it should have the commands there

Ctrl-X will prompt the user to save the file if it has changed.

halitech
December 12th, 2008, 01:11 AM
I just prefer to do the save first myself, just in case :)