Archive for November, 2008

scp file completion on remote host.

November 21, 2008

Next time you try to scp a file to or from a remote host, try and see if autocompletion is support in the same way it works for cp. You probably need to have ssh keys setup and an ssh agent running.

e.g. scp host.example.com:<press tab tab to autocomplete and see a list of time>

Using ssh forwarding to retrieve papers instead of VPN

November 5, 2008

So far I was using VPN to connect to my university network when I needed to download a paper from home, but that meant to temporarily lose my network connection, with all the hassle attached.

Today I discovered a much simpler method:

1) Open a ssh port forwarding to the remote machine (university server with IEEE or ACM subscription) in this way:

ssh -D 8080 -N <username>@<server address> &

where -D indicated the local port to forward, and -N avoid opening a shell.

2) Download the FoxyProxy Firefox extension, and configure in order to use a proxy on localhost:8080.

3) Add rules to FoxyProxy so that the proxy is active only when needed (*.ieee.*, *.acm.* etc…).

Thanks to Timo Reimann for having suggested that.

Setting up Edimax EW-7318USg under Linux

November 2, 2008

This is from here:

Edimax EW-7318USg aka Hawking HWUG1 (rebranded in US)

# Driver : rt73
# Chipset : Ralink
Ralink RT2571W chipset (can be used with rt73 drivers)
chipset : RT2571WF or RT2528L

HOWTO:RT2500 wireless cards etc. sticky
Ralink 257x/2671 using RT73 driver?

======================
I think that you might be doing some of these steps in the wrong order. eg from the instructions I was given you need to blacklist first. Here are the instructions I use:

1. sudo rmmod rt73usb (remove old drivers)

2. sudo gedit /etc/modprobe.d/blacklist and add these lines to the end of the file:

blacklist rt73usb
blacklist rt2570
blacklist rt2x00lib
blacklist rt2500usb
blacklist rt2x00usb

3. sudo apt-get install build-essential

4. sudo apt-get install linux-headers-`uname –r`

5. get the latest version of the driver source from the serialmonkey site. The name is rt73-cvs-daily.tar.gz. I saved it in my user dir:

6. sudo wget http://rt2x00.serialmonkey.com/rt73-cvs-daily.tar.gz -O ~/rt73-cvs-daily.tar.gz

7. sudo tar -zxvf rt73-cvs-daily.tar.gz

8. cd ~/rt73*/Module

9. sudo make

10. if the file produced is 2Mb in size there is a problem as it should be about 250Kb. To fix this, use the “strip” command:
strip –S rt73.ko

11. sudo make install

12. sudo modprobe rt73

13. as sudo, edit /etc/modules – add the text rt73 at the end

14. as sudo, create text file called rt73 in /etc/modprobe.d

15. put the text “alias wlan0 rt73” in this file

16. remove /etc/modprobe.conf as it’s no longer needed (back it up first – but note I didn’t have one)

17. add the following to /etc/network/interfaces file. You might need to customise this to suit your particular situation (eg if you don’t use WPA encryption):

auto wlan0
iface wlan0 inet dhcp
pre-up ifconfig wlan0 up
pre-up ifconfig wlan0 down
pre-up ifconfig wlan0 up
pre-up iwconfig wlan0 essid “yourSSID” # use quotes if you have spaces in the name of essid
pre-up iwconfig wlan0 mode Managed
pre-up iwpriv wlan0 set Channel=11 # change channel accordingly
pre-up iwpriv wlan0 set AuthMode=WPAPSK
pre-up iwpriv wlan0 set EncrypType=TKIP
pre-up iwpriv wlan0 set WPAPSK=”yourkey”
pre-up ifconfig wlan0 up

18. reboot