![]() |
2010-01-26
, 21:13
|
|
Posts: 850 |
Thanked: 626 times |
Joined on Sep 2009
@ Vienna, Austria
|
#22
|
cat /etc/hosts
subcoren900:~# cat /etc/hosts 127.0.0.1 subcoren900 localhost 195.113.232.88 downloads.maemo.nokia.com 195.113.232.91 downloads.maemo.nokia.com subcoren900:~#
![]() |
2010-01-26
, 21:33
|
|
Posts: 141 |
Thanked: 5 times |
Joined on Dec 2009
@ Brasil
|
#23
|
watch out for spaces!
/etc/hosts is the path to a file and must not contain spaces! always be very, very careful in a root shell!
to check whether you have successfully entered it, you can view the file contents by
it should look like this:Code:cat /etc/hosts
Code:subcoren900:~# cat /etc/hosts 127.0.0.1 subcoren900 localhost 195.113.232.88 downloads.maemo.nokia.com 195.113.232.91 downloads.maemo.nokia.com subcoren900:~#
![]() |
2010-01-26
, 21:43
|
|
Posts: 850 |
Thanked: 626 times |
Joined on Sep 2009
@ Vienna, Austria
|
#24
|
sudo gainroot osso_notes /etc/hosts
![]() |
2010-01-26
, 22:09
|
|
Posts: 141 |
Thanked: 5 times |
Joined on Dec 2009
@ Brasil
|
#25
|
hehe ok i see you tried a few times
you have to edit this file so it looks like the one i showed you, with only 3 lines.
Code:sudo gainroot osso_notes /etc/hosts
edit:
btw, the reason your file isn't correct, is that you had too many " in your command. there should be only 2 of them, but you broke the string by adding a third.
as i said, you have to be very careful and exact.
![]() |
2010-01-26
, 22:29
|
|
Posts: 850 |
Thanked: 626 times |
Joined on Sep 2009
@ Vienna, Austria
|
#26
|
127.0.0.1 Nokia-N900-51-1 localhost 195.113.232.88 downloads.maemo.nokia.com 195.113.232.91 downloads.maemo.nokia.com
echo "127.0.0.1 Nokia-N900-51-1 localhost" > /etc/hosts echo "195.113.232.88 downloads.maemo.nokia.com" >> /etc/hosts echo "195.113.232.91 downloads.maemo.nokia.com" >> /etc/hosts
![]() |
2010-01-26
, 22:50
|
|
Posts: 141 |
Thanked: 5 times |
Joined on Dec 2009
@ Brasil
|
#27
|
no, just these 3 lines
the other two lines are from the xterm, they look similar on your device. and "subcoren900" just happens to be my hostnameCode:127.0.0.1 Nokia-N900-51-1 localhost 195.113.232.88 downloads.maemo.nokia.com 195.113.232.91 downloads.maemo.nokia.com
and yes, it seems the easy way of editing in place with osso_notes doesn't work. i tried before i posted it and it worked, but apparently only for the first time. sorry for that.
usually, one uses "vim" to edit system files in place - there are a few other methods, but all of them are a bit too much to describe here, so i'll once again use echo. it's just the least complicated way
echo just outputs everything between the " ", we use > in the first command to overwrite the target file, and >> in the other two to append to the newly created file instead of overwriting it again.Code:echo "127.0.0.1 Nokia-N900-51-1 localhost" > /etc/hosts echo "195.113.232.88 downloads.maemo.nokia.com" >> /etc/hosts echo "195.113.232.91 downloads.maemo.nokia.com" >> /etc/hosts
if you input exactly these 3 commands as root, you should have a correct /etc/hosts file with 3 lines.
edit:
just to be sure - you know you can copy & paste from the browser into the x terminal, right?
![]() |
2010-01-26
, 22:59
|
|
Posts: 850 |
Thanked: 626 times |
Joined on Sep 2009
@ Vienna, Austria
|
#28
|
One question, there is only 1 space between the ">" on both sides, right?.
![]() |
2010-01-26
, 23:01
|
|
Posts: 850 |
Thanked: 626 times |
Joined on Sep 2009
@ Vienna, Austria
|
#29
|
edit:
ok, I accessed the N900's browser, I copied and pasted the code and ran the command again
cat / etc / hosts
But there's something wrong, because the answer does not change.
cat /etc/hosts
![]() |
2010-01-26
, 23:10
|
|
Posts: 141 |
Thanked: 5 times |
Joined on Dec 2009
@ Brasil
|
#30
|
/etc/hosts is the path to the file you are editing, there is no space in there. the command is
Code:cat /etc/hosts
sorry, I did not understand where to enter codes:
echo "195.113.232.88 downloads.maemo.nokia.com">> / etc / hosts
echo "195.113.232.91 downloads.maemo.nokia.com">> / etc / hosts
to do in xterm? (I did in root, but nothing happened)