![]() |
View and Edit system files in Ubuntu?
It's probably really obvious (hopefully) but is there a way that I can view and edit the system files on my n900 using ubuntu?
I've been reading the modding thread and while I have installed midnight commander and used it to add the "Reboot" button with no problems, there are other things I want to mod and play around with like changing wifi logo, battery logo's etc, but I would just feel a lot happier doing this via my laptop. Anyone have a way? |
Re: View and Edit system files in Ubuntu?
I ssh into my N900 to edit files. http://wiki.maemo.org/SSH
|
Re: View and Edit system files in Ubuntu?
Code:
apt-get install sshfs Code:
apt-get install openssh-server then just Code:
mkdir /media/n900 after testing that it works this way, please set up key authentication for the N900 "user" account. that's much safer than connecting as root. |
Re: View and Edit system files in Ubuntu?
Thanks guys, to do this ssh, do I need a wifi router with active connection to the web?
My only option for web browsing is currently to tether using my trusty N900, so that presumably wouldnt be an option for me... However, I do still have a BT homehub router, which i guess could still just serve as a LAN, which might be good enough to let me do a SSH? Hmmm, i must try... |
Re: View and Edit system files in Ubuntu?
Quote:
You would also need to install openssh on the N900. On the Ubuntu side, modify the /etc/network/interfaces file and add these lines: Code:
iface usb0 inet static Code:
sudo ifup usb0 |
Re: View and Edit system files in Ubuntu?
Quote:
Genius, thank you :) |
Re: View and Edit system files in Ubuntu?
I need more help here, im not quite getting something right.
I followed the set up for the N900 instructions, and I was successfully able to ping my laptop = 100% packets received. When it came to doing it the other end, pinging my N900 from my laptop doesnt work, I get 100% packets NOT received. What could be causing this? Also, I then try to connect via either filezilla or secure shell and cant establish a connection. I dont fully understand what i'm doing so its probably something really obvious im missing. |
Re: View and Edit system files in Ubuntu?
Errrm, correction to the above.
It seems I can ping my N900 (192.168.2.15) from my N900, but not my laptop (ping 192.168.2.14) However, when using the laptop, neither address works |
Re: View and Edit system files in Ubuntu?
Quote:
Quote:
Code:
sudo gainroot edit: you did do "ifup usb0" on the N900 as well, right? |
Re: View and Edit system files in Ubuntu?
Ok guys, I've done, and re-done everything suggested here, but when I come to connect via SSH I just get a "Host Unreachable" error.
Checklist on N900: 1. Installed SSH server and Client 2. did what ever this means: "mkdir /media/n900 chown <username> /media/n900 sshfs root@n900.host.or.ip:/home/user /media/n900 -o allow_other" 3. did "ifup usb0" Checklist in Ubuntu 1. apt-get install openssh-server - done 2. modified /etc/network/interfaces file to add "iface usb0 inet static address 192.168.2.14 netmask 255.255.255.0 broadcast 192.168.2.255" 3. did "ifup usb0" Still no joy. |
Re: View and Edit system files in Ubuntu?
you don't need my sshfs part for USB networking, that's for mounting a remote directory over SSH. and it was supposed to be run on the ubuntu side :)
you didn't set up the usb0 interface on the N900. please read the link archebyte posted again, you have to edit /etc/network/interfaces on the N900 as well. |
Re: View and Edit system files in Ubuntu?
Quote:
|
Re: View and Edit system files in Ubuntu?
Quote:
hm, dunno what's wrong, then. post the output of "ifconfig" on both devices (after ifup usb0) here for comparison. also try "lsmod | grep usbnet" under ubuntu after "ifup usb0", maybe your kernel module doesn't get loaded. a firewall on the ubuntu host might also be an issue. |
Re: View and Edit system files in Ubuntu?
Ok, ifconfig on laptop:
dan@dan-laptop:~$ ifconfig eth0 Link encap:Ethernet HWaddr 00:a0:d1:65:b1:67 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:27 errors:0 dropped:0 overruns:0 frame:0 TX packets:27 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2928 (2.9 KB) TX bytes:2928 (2.9 KB) ppp0 Link encap:Point-to-Point Protocol inet addr:10.214.254.178 P-t-P:10.6.6.6 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:1352 errors:0 dropped:0 overruns:0 frame:0 TX packets:1325 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:405678 (405.6 KB) TX bytes:291798 (291.7 KB) usb0 Link encap:Ethernet HWaddr b6:5e:7e:e9:d2:2a inet6 addr: fe80::b45e:7eff:fee9:d22a/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:51 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1428 (1.4 KB) TX bytes:1800 (1.8 KB) wlan0 Link encap:Ethernet HWaddr 00:19:d2:36:36:e6 inet6 addr: fe80::219:d2ff:fe36:36e6/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:657 errors:0 dropped:0 overruns:0 frame:0 TX packets:646 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:209762 (209.7 KB) TX bytes:78529 (78.5 KB) wmaster0 Link encap:UNSPEC HWaddr 00-19-D2-36-36-E6-33-36-00-00-00-00-00-00-00-00 UP RUNNING MTU:0 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) ...... standby for same from N900... |
Re: View and Edit system files in Ubuntu?
From N900
home/user # ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:601 errors:0 dropped:0 overruns:0 frame:0 TX packets:601 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:63162 (61.6 KiB) TX bytes:63162 (61.6 KiB) phonet0 Link encap:UNSPEC HWaddr 15-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 UP POINTOPOINT RUNNING NOARP MTU:4000 Metric:1 RX packets:9390 errors:0 dropped:0 overruns:0 frame:0 TX packets:4706 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:1293112 (1.2 MiB) TX bytes:614868 (600.4 KiB) upnlink0 Link encap:UNSPEC HWaddr 1B-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 UP POINTOPOINT RUNNING NOARP MTU:49152 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) usb0 Link encap:Ethernet HWaddr F2:C8:A7:BD:D7:AD inet addr:192.168.2.15 Bcast:192.168.2.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:12 errors:0 dropped:0 overruns:0 frame:0 TX packets:63 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3432 (3.3 KiB) TX bytes:2646 (2.5 KiB) /home/user # |
Re: View and Edit system files in Ubuntu?
From N900
home/user # ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:601 errors:0 dropped:0 overruns:0 frame:0 TX packets:601 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:63162 (61.6 KiB) TX bytes:63162 (61.6 KiB) phonet0 Link encap:UNSPEC HWaddr 15-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 UP POINTOPOINT RUNNING NOARP MTU:4000 Metric:1 RX packets:9390 errors:0 dropped:0 overruns:0 frame:0 TX packets:4706 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:1293112 (1.2 MiB) TX bytes:614868 (600.4 KiB) upnlink0 Link encap:UNSPEC HWaddr 1B-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 UP POINTOPOINT RUNNING NOARP MTU:49152 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) usb0 Link encap:Ethernet HWaddr F2:C8:A7:BD:D7:AD inet addr:192.168.2.15 Bcast:192.168.2.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:12 errors:0 dropped:0 overruns:0 frame:0 TX packets:63 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3432 (3.3 KiB) TX bytes:2646 (2.5 KiB) /home/user # |
Re: View and Edit system files in Ubuntu?
DanStarr, it looks like the N900 is fully set up and Ubuntu sees the usb0 interface but without an IP. 'sudo ifup usb0' in Ubuntu after connecting the cable. 'ifconfig usb0' on Ubuntu should now show the IP 192.168.2.14.
once the usb0 interfaces on both sides have valid IPs, you can ssh into the N900 from Ubuntu: ssh root@192.168.2.15 or use sshfs. |
Re: View and Edit system files in Ubuntu?
DanStarr, this is bascially the setup required on the client-side (Ubuntu):
1) modify /etc/network/interface per my post above 2) Connect USB cable (on the N900, select PC Suite Mode and execute ifup usb0 as root) 3) verify that the usb0 interface is recognised by running the following command in Ubuntu: Code:
dmesg Code:
[295050.409021] usb0: register 'cdc_ether' at usb-0000:00:1d.7-7, CDC Ethernet Device, de:59:f3:a9:fa:fe Code:
sudo ifup usb0 Code:
archebyte:~$ ifconfig usb0 Code:
archebyte:~$ ping 192.168.2.15 Code:
ssh root@192.168.2.15 |
Re: View and Edit system files in Ubuntu?
Quote:
it should look the same as usb0 on the N900, with a different "inet addr". did you do "ifup usb0" beforehand? |
Re: View and Edit system files in Ubuntu?
Wow guys, thanks to your help i'm now in!! and I understand a bit more about how it all works. Thanks...
To my mind, I did everything I needed to do yesterday, i've not really done anything extra today to get it working - I think the problem I had was this "ifup usb0" thing, I may have activated it too soon, possibly on the laptop before plugging the phone in, and then when I would type it in time and time again I would get the message back that it was already activated. The "obvious" point here was then looking at the output of "ifconfig usb0" when it showed that the command hadnt actually done as it should - likely due to my timing. Starting fresh today with more of your words of wisdom got it sorted. I was able to confirm that the IP address now appeared in ifconfig, and straight away it worked. :) |
All times are GMT. The time now is 10:22. |
vBulletin® Version 3.8.8