Categories
Hardware Linux Ubuntu

Unable to enumerate USB device on port…

I have an old PC with what appears to be a broken implementation of USB. I cannot obtain a BIOS update and there is no BIOS setting to switch off USB either. Very old Linux distributions would run on this PC, but only on those with USB support as loadable modules. For later kernels with direct USB support I would get continuous error messages to the console.

After spending some time Googling, I found this useful post

For Ubuntu 10.04 LTS I used the advice to create rules to deactivate USB entirely on this host. The first file that I created was /etc/udev/rules.d/20-disable-ehci.rules which contained the following code:-

ACTION=="add", SUBSYSTEM=="pci", DRIVER=="ehci_hcd", \
        RUN+="/bin/sh -c 'echo -n %k > %S%p/driver/unbind'"

When I rebooted the PC, it disabled one of the troublesome USB hubs but I was still getting error messages for another but much more frequently now. I experimented by creating a similar file to deactivate ohci but this didn’t do anything. I tried again with uhci and that worked, USB completely disabled.
/etc/udev/rules.d/30-disable-uhci.rules

ACTION=="add", SUBSYSTEM=="pci", DRIVER=="uhci_hcd", \
        RUN+="/bin/sh -c 'echo -n %k > %S%p/driver/unbind'"

So if you have two or more USB hubs throwing enumeration errors, try disabling both EHCI and UHCI, it worked for me.

Obviously, if you have any USB devices that you need to use with this host, forget it. You will need a new motherboard.

Categories
Security Ubuntu

Ubuntu 10.10 SSH login message fix

Do you get two welcome messages when logging in to your Ubuntu 10.10 host? I have experienced it on hosts upgraded from 10.04 and on freshly built hosts from the downloaded CD-ROM images. The problem can be easily fixed using…

sudo rm /etc/motd.tail

If you are still using password based login for SSH, consider using key based logins instead. It is very easy to set up, convenient to use and secure. If you also use PuTTY on a Windows PC you can use Pageant as the automatic authentication agent.

Categories
Ubuntu

Wireshark missing interfaces on Ubuntu 10.10

The old Dell laptop that I use for packet sniffing was in need of a rebuild after I had been experimenting with Zabbix. In hindsight, I shouldn’t have used the laptop that has become my network toolkit. I had well and truly messed it up and I was desperate to get it operational again.

Ubuntu 10.10 had recently been released and I had already downloaded the ISO images overnight. With a freshly burned CDR in my hand, I set about installing the new version. This laptop is primarily a network analysis tool so Wireshark was naturally the first application to be installed. It wasn’t long before I found that 10.10 has the same missing interface problem that I had experienced with 10.04. “No problem” I thought. “I will just use the fix that I found for 10.04“. Well, that didn’t work either. I left it for a day to have a think, and came back to it with a solution that I found on Launchpad. The fix is as follows.
In a terminal session, execute these commands:-

sudo addgroup –quiet –system wireshark
sudo chown root:wireshark /usr/bin/dumpcap
sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap

Using your favourite text editor, add your user id to the wireshark group in /etc/group or use usermod instead:-

sudo usermod -a -G wireshark vince

Reconfigure the Wireshark Common package and answer ‘Yes’ to the question ‘Should non-superusers be able to capture packets?’ :-

sudo dpkg-reconfigure wireshark-common

Reboot, login and test Wireshark. The missing interfaces should be present now.

Categories
Hardware Ubuntu

Brother MFC-660CN printer for Ubuntu 9.10

I have a Brother MFC-660CN all-in-one network printer on our LAN and it has been performing admirably for nearly three years. I was so impressed with this printer that I bought a MFC-680CN for my parents and another for use at home.

Each of the Windows PCs has the complete multifunction driver set installed and can print, FAX and scan over the network with ease. I would like to be able to do the same with the Ubuntu Desktops but I suspect that it is going to be a little trickier getting the network scanning and network FAX functions operational. This page is just concerned with getting network printing running.

I have used CUPS before and have already decided that I am going to use an Ubuntu PC setup as a server on the LAN as a print server to share the printer with the other desktops.

Fortunately, Brother has good driver support for Linux. I followed these instructions on their website but it is a little confusing in places as it references multiple Linux distributions. To make things easier for myself, I am summarizing the method for Ubuntu 9.10 here.

Download and save to disk the ‘deb’ format of the LPR driver and the cupswrapper driver.

Open a terminal on the Ubuntu ‘print server’ PC to type in the commands to install the drivers. I used “Applications”, “Accessories”, “Terminal” from the GUI.

sudo aa-complain cupsd
sudo mkdir /usr/share/cups/model
sudo ln -s /etc/init.d/cups /etc/init.d/lpd
sudo mkdir /var/spool/lpd
sudo apt-get install csh
sudo apt-get install psutils

I downloaded the LPR and cupswrapper driver to the ‘Downloads’ folder in my home directory so I changed the current working directory to that folder.

cd ~/Downloads
sudo dpkg -i –force-all mfc660cnlpr*deb
sudo dpkg -i –force-all mfc660cncupswrapper*deb

Check that the LPR and cupswrapper drivers are installed:-

dpkg -l | grep Brother

I had the following result confirming that the drivers were installed.

ii mfc660cncupswrapper 1.0.1-1 Brother CUPS Inkjet Printer Definitions
ii mfc660cnlpr 1.0.1-1 Brother lpr Inkjet Printer Definitions

To access the CUPS web interface, point your browser at http://localhost:631/printers

Under ‘Queue Name’, click the name of the printer (MFC660CN).

There should be two button menus displayed, ‘Maintenance’ and ‘Administration’. Click the ‘Administration’ button menu and select ‘Modify Printer’
You will be prompted to login, use your usual Ubuntu credentials.

Select ‘LPD/LPR Host or Printer’ and click Continue.

For ‘Connection:’ enter lpd://printer/binary_p1 where printer is the hostname or IP address of the printer that the LPR and cupswrapper drivers will print to. Then click Continue.

Enter a Description and Location. Share the printer by ticking the check box. Click Continue.

The printer driver that you just installed should be selected. Click ‘Modify Printer’ to activate the changes.

The ‘Administration’ button menu has a ‘Set Default Options’ selection. You can use this to change your paper type to A4 size.

To print a test page, click the ‘Maintenance’ button menu and select ‘Print Test Page’

You should now have a working CUPS print server.

Categories
Hardware Ubuntu

NEC MultiSync 5FGe on Ubuntu 9.10

I recently bought two used and abused Dell GX240 PCs for a software development project I am currently working on. I don’t have a spare LCD monitor to use with them at the moment but the guy that sold me the PCs also had some old CRTs that he wanted to get rid of. So, for an additional £3, a heavy 17″ CRT monitor is now on my desk. It takes up a lot of space, but for only £3 it’s a small sacrifice.

Ubuntu Desktop 9.10 installed on the GX240 without issue. However, the maximum resolution displayed was 800×600. I knew from previous experience of the NEC 5FGe was that it could go higher. In fact, the maximum resolution is 1024×768. Not much by today’s standards, but a lot better than 800×600.

The X-Window system from X.Org in Ubuntu is considered to be so good at doing device detection now that the traditional manually edited configuration file xorg.conf is no longer present when installed. This is great for most Flat Panel monitor users, but not that good for people using old fashioned display cards with CRT monitors. Fortunately, xorg.conf is still supported and it is possible to get old junk running at or near its best.

It took a while searching for the info on various web sites but it was worth doing. My 5FGe is running at 1024×768 and is good enough to use to type this. As I know I will probably need to do this again someday, I thought it would be worthwhile documenting the process while it was still fresh in my mind.

With Ubuntu Desktop running the GUI, press Ctrl+Alt+F1 together to switch to a character terminal interface.

At the prompt, login with your Ubuntu user ID and password. When logged in your current working directory should be your home directory.

Enter the following to shutdown the GNOME Display Manager:-

sudo service gdm stop

Enter the following to generate a basic xorg.conf file to work with:-

sudo Xorg -configure

At this point, you should have an xorg.conf.new file in your home directory. Copy this configuration file to the /etc/X11 directory.

sudo cp xorg.conf.new /etc/X11/xorg.conf

If you know what settings your display equipment needs in the xorg.conf file, now is the time to edit it to include them. You will need to know the ‘Modeline’ info for the display resolution. I chose to specify 1024×768 at 60hz refresh as that was a safe starting point. The GTF program can be used to generate a suitable Modeline. To make things easy, I redirected GTF’s output to append to xorg.conf .

sudo gtf 1024 768 60 >> /etc/X11/xorg.conf

I have got used to using Nano for editing files on Ubuntu but you can use whatever editor you like as long as you achieve the same result.

sudo nano /etc/X11/xorg.conf

Edit the section for the monitor settings so that it looks like this:-

Section "Monitor"
Identifier   "Monitor0"
VendorName   "NEC"
ModelName    "MultiSync 5FGe"
HorizSync    31-62
VertRefresh  55-90
Option       "DPMS"
# 1024x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
Modeline "1024x768_60.00"  64.11  1024 1080 1184 1344  768 769 772 795  -HSync +Vsync
EndSection

You must cut and paste the GTF output from the end of the file and insert it inside the Monitor section. These settings work for my NEC MultiSync 5FGe. Note that each Modeline is a single line in the file. The comment output from GTF doesn’t hurt if present with a leading #.

Next add the Device info for the display adapter. My Dell GX240 has an AGP graphics card that I am still looking for more X.Org info regarding suitable tweaks. For clarity, I’m not showing all the commented out options below. If you have an ATI Rage 128 Pro Ultra TF your settings will look something like this:-

Section "Device"
Option     "Display" "CRT"
Identifier  "Card0"
Driver      "r128"
VendorName  "ATI Technologies Inc"
BoardName   "Rage 128 Pro Ultra TF"
BusID       "PCI:1:0:0"
EndSection

The important option for the NEC MultiSync 5FGe is:-

Option     "Display" "CRT"

Almost done editing now. Just need to add all of the colour depth settings for the 1024×768 screen mode in the ‘Screen’ section:-

Section "Screen"
Identifier "Screen0"
Device     "Card0"
Monitor    "Monitor0"
DefaultDepth 16
SubSection "Display"
Viewport   0 0
Depth     1
Modes    "1024x768"
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     4
Modes    "1024x768"
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     8
Modes    "1024x768"
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     15
Modes    "1024x768"
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     16
Modes    "1024x768"
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     24
Modes    "1024x768"
EndSubSection
EndSection

Save the file.

Restart the X-Window system using your new xorg.conf by entering the following at the command prompt.

sudo service gdm start

Once the GUI restarted on my PC, I clicked ‘Restart’ just to be sure that the AGP card and monitor were initialised properly. Then I went to ‘System’, ‘Preferences’, ‘Display’ and found that Xorg had now detected that my monitor could run at 75Hz despite not stating a Modeline for it. I have left mine running at 75Hz and all seems to be well so far.

Categories
Ubuntu

Rediscovering Ubuntu

I have been a long time fan of Linux and Unix in general since the early 1990’s. I have tried many Linux distributions over the years but found that I kept on coming back to Debian. Some time ago when Ubuntu was first gaining traction I built my first Linux desktop PC. Up until this time I had only used Linux for server applications and the odd X-Windows Network Console. It was good, but device support was still not as good as Microsoft’s and I didn’t take Ubuntu any further.

About a year ago, I installed OpenSuse on an old laptop and was impressed that it actually worked without too much effort configuring it. I don’t know why, but for some reason I decided to try Ubuntu again and downloaded a copy of Ubuntu Desktop 9.10 . The old Dell Latitude D410 was the candidate for the install and I was completely stunned how well it went. So much so, that I have been using that old battered laptop more recently than my year old Vista powered Lenovo. Could this really be the desktop Linux distribution that pulls me away from using Microsoft products? I think so.

My wife recently purchased a Samsung N140 netbook with 2GB of RAM and Windows 7 Starter. This thing is an unbearable slug of a computer with Windows 7 and I’m surprised that anyone, including my wife cannot resist the urge to throw it across the room. I decided to see if the OS on the N140 was really the problem. I downloaded Ubuntu Network Remix (UNR) and created a bootable 1GB USB stick with it. Using UNR of the stick without installing it on the hard drive it was clear that the N140 was actually quite a good machine with the right OS. The netbook was snatched back before I could convince my wife to wipe it’s hard drive of Windows 7 but the impression it made on me has been astounding.

In the last few weeks I have resurrected three old PC’s that weren’t even that good on WinXP SP2. Each is now running Ubuntu with admirable performance. One by one, these old PCs will all become servers although I’m actually using Desktop 9.10 because the GUI tools are just so good.

Yesterday, I bought two old Dell GX240 midi-towers for a project. These old PCs had Win2K originally installed with 512MB RAM and 20GB hard drives. They are both running Ubuntu Desktop 9.10 now and I’m using one of them to write this.

If Garmin would produce a version of Mapsource that would run on Linux I would have no more need for a Windows PC. Ubuntu is truly outstanding. I’m glad I took the time to rediscover it.

The next version of Ubuntu is coming soon

Privacy Preference Center

      Necessary

      Advertising

      Analytics

      Other