Linux


15
Jan 10

Fix the “534 Protection level negotiation failed.” error in lftp

If you are using lftp to connect to a secure FTP (SFTP) server using SSL, you may sometimes get the following error during file transfers:

534 Protection level negotiation failed.

In this case, you need to add the following line to the bottom of your /etc/lftp.conf file

set ftp:ssl-protect-data

Now try connecting again and hopefully everything should work ok – it sorted my problems when I was trying to connect to the Leeds University SFTP servers using lftp on Ubuntu 9.10 (Karmic).


15
Jan 10

View PDF files inline in Firefox on Ubuntu Karmic 9.10

When using Firefox on Ubuntu, PDF files are opened in a separate PDF viewer rather than being displayed within the browser window itself.

If you follow this guide, you should be able to get PDF files to open inline, embedded within the Firefox window as in the screenshot below:

firefox-inline-pdf.png

To allow PDF files to be opened inline within the browser window, you need to do the following:

Install Mozplugger and Evince:

sudo apt-get install evince mozplugger

Edit the Mozplugger config file:

gksudo gedit /etc/mozpluggerrc

Find the following block of text (or something very similar):

application/pdf:pdf:PDF file
application/x-pdf:pdf:PDF file
text/pdf:pdf:PDF file
text/x-pdf:pdf:PDF file
        ACROREAD()
        repeat noisy swallow(kpdf) fill: kpdf "$file"
        repeat noisy swallow(Xpdf) fill: xpdf -g +9000+9000 "$file"
        repeat noisy swallow(okular) fill: okular "$file"
        GV()
        repeat noisy fill exits: evince "$file"

If you prefer to use the Evince PDF viewer replace the above code with the following:

application/pdf:pdf:PDF file
application/x-pdf:pdf:PDF file
text/pdf:pdf:PDF file
text/x-pdf:pdf:PDF file
	repeat noisy swallow(evince) fill: evince "$file"
	ACROREAD()
	repeat noisy swallow(kpdf) fill: kpdf "$file"
	repeat noisy swallow(Xpdf) fill: xpdf -g +9000+9000 "$file"
	repeat noisy swallow(okular) fill: okular "$file"
	GV()
	repeat noisy fill exits: evince "$file"

Or if you prefer to use the xpdf PDF viewer, you can use the following lines (make sure you if not already installed that you install xpdf using the command sudo apt-get install xpdf):

application/pdf:pdf:PDF file
application/x-pdf:pdf:PDF file
text/pdf:pdf:PDF file
text/x-pdf:pdf:PDF file
	repeat noisy swallow(Xpdf) fill: xpdf "$file"
	ACROREAD()
	repeat noisy swallow(kpdf) fill: kpdf "$file"
	repeat noisy swallow(okular) fill: okular "$file"
	GV()
	repeat noisy fill exits: xpdf "$file"

Save changes, close all instances of Firefox and Evince/Xpdf and then open firefox and try viewing a PDF file. Everything should now function as you want it to.


17
Nov 09

Improve Wireless Performance in Ubuntu Karmic on Asus EeePC 1005HA

We have a problem
For the last month or so since I bought my Asus EeePC 1005HA, I’ve been wanting to throw the thing out of the window, such has my frustration been with it’s wireless performance.

Poor Wireless Performance
Whilst the laptop is a great little machine, since I installed Ubuntu Karmic on it, the wireless connection had been completely useless. At first, Network Manager would report great signal strength for wireless networks within range of the netbook. However, once connected to the access point, the wireless signal which was first reported at over 80% would rapidly deteriorate to something much lower, often below 30%. Even when the computer was within metres of the wireless access point, the connection speed would be incredibly slow and I frequently experienced wireless drops, especially when connecting to secure wireless networks.

Solution at hand
However, fear not. After doing much searching around on the internet it seems that there is a solution to this problem. I managed to find a bug on launchpad where other EeePC 1005HA users suggested that installing the “Karmic Wireless Backports Module” would make most of the problems go away. This module contains all the cutting edge wireless drivers for Ubuntu Karmic from the testing repositories which haven’t yet been officially released.

After installing the module via apt-get, I have experienced a 30% increase in wireless signal strength, a faster connection and no drops for the last half and hour or so, it would indeed seem that the problem is solved or at least much less annoying. Here are the steps you need to follow to install the backport modules:

Enable Karmic backports
First we need to enable the Karmic backports repository. Open up “Software Sources” and browse to the “Updates” tab, make sure the karmic-backports option is ticked.

软件源.png

Install the Karmic wireless backports module
Now open a terminal and enter the following commands to install the backports wireless module.

sudo apt-get update && sudo apt-get install linux-backports-modules-wireless-karmic-generic

Please note that it is not recommended to install linux-backports-modules-karmic-generic as it has been suggested in some posts as this may affect other things on your system apart from the wireless.

Once complete, reboot your computer and enjoy.


29
Sep 09

Ubuntu 9.04 Settings for Eduroam Wireless Networks

Many UK universities use Eduroam wireless networks which require certificate authentication along with a username and password. Despite following the official guide to getting my laptop setup at the University of Leeds, my laptop wouldn’t seem to connect – however, after a bit of playing I managed to get things up and running.

Here are the settings you will need:

  • Set ‘Wireless security’ to WPA or WPA2 Enterprise
  • Set ‘EAP method’ to TTLS
  • Set ‘Key type’ to MSCHAP
  • Set ‘Identity’ to your ISS Username with @leeds.ac.uk appended, for example jh1761@leeds.ac.uk
  • Type your normal ISS password into the password box
  • Leave ‘Anonymous Identity’ blank
  • Leave ‘Client certificate file’ set to (none)
  • Click the ‘CA Certificate file’ option, a file open window should popup – locate the file: /etc/ssl/certs/GTE_CyberTrust_Global_Root.pem , select it and click open
  • You should now find that the computer connects without any issues.