Installing Samsung Multifunction Printer – Ubuntu 11.10

Getting Multifunction Printers to scan under Linux can be a bit of a pain. The Samsung SCX-3400 I had to install recently was no exception.

Here are the necessary steps I had to perform:

  1. Ignore all Samsung Provided CD’s and downloads. They do not work under Oneiric Ocelot (11.10)
  2. Add Samsung Unified Driver repository http://www.bchemnet.com/suldr/smfpv3.html
  3. Install Samsung drivers and libsane-extras
  4. Edit sane configuration files
vim /etc/apt/sources.list
#add the Samsung Unified Driver Repo
deb http://www.bchemnet.com/suldr/ debian extra
wget http://www.bchemnet.com/suldr/suldr.gpg
apt-key add suldr.gpg
apt-get update
apt-get install samsungmfp-data samsungmfp-driver samsungmfp-network samsungmfp-scanner samsungmfp-configurator-data samsungmfp-configurator-qt4 libsane-extras

The following sane config files need to be modified (add lines)

/etc/sane.d/xerox_mfp.conf

# Samsung SCX-3400
usb 0x04e8 0x344f

/lib/udev/rules.d/40-libsane.rules

# Samsung SCX-3400
ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="344f", ENV{libsane_matched}="yes"

The entries above are for the SCX-3400 model. To find the USB ID’s for other models use

sane-find-scanner

Thanks to the following Ubuntu Forum participants for providing some the tips: http://forum.ubuntuusers.de/topic/installation-samsung-scx/

Connecting to Cisco Small Business VPN from Ubuntu

Connecting to IPSec VPN gateways has always been one of the more painful things to do. Unfortunately Cisco is not helping by being extremely sluggish on making their utilities available on most recent OS revisions (you can’t even get their QuickVPN client to work properly on 64bit Win7 yet). Operating System support outside of Windows seems to be pretty much non-existent (see https://supportforums.cisco.com/thread/2040595).

Shame on you Cisco !

Option 1 – running QuickVPN under using wine

Download the QuickVPN client

http://www.cisco.com/cisco/software/type.html?mdfid=282414013&flowid=787

Install using wine

wine setup.exe

Copy the QuickVPN Client Certificate to the QuickVPN program folder and run

cp RVS4000_Client.pem ~/.wine/drive_c/Program\ Files/Cisco\ Small\ Business/QuickVPN\ Client/
cd ~/.wine/drive_c/Program\ Files/Cisco\ Small\ Business/QuickVPN\ Client/
wine VPNClient.exe

Option 2 – vpnc connection

apt-get install vpnc openconnect  network-manager-vpnc  network-manager-openconnect

Theoretically it should be possible to connect to the Cisco Small Business Routers using vpnc (& openconnect). However there is ZERO information from Cisco as to the settings and the QuickVPN utility seems to use some non-standard authentication and handshake mechanisms.

I would love to hear from anybody who was able to connect using native (and standard) Linux VPN utilities rather than the wine hack above.

Android 4.0 screenshot functionality on Galaxy Nexus

One of the features I missed since the good old Android 1.5 days was the ability to take screen-shots on the device. Prior to Android 4 (ICS) the only workable way to create screen-shots was to connect via USB cable and use the Android SDK to make remote screen-shots.

On Android 4.0 all you have to do is press Volume Down Key + Power Key down at the same time and hold.  You should hear the camera click (if audio is on) and Android will show a notification that the screenshot was saved on your device and you can now upload or transfer to your favourite service.

Finding a Notepad++ alternative / replacement on Ubuntu

One of the most important utilities on any computer is a decent text editing tool. Since there are as literally hundreds of text-editors out there you would think it is an easy task to find a similar one for each platform.

After years of trialing on various Windows platforms I have found Notepad++ to be the most useful of them all (closely followed by EMEditor which I used for years before Notepad++). Since I have now switched to Ubuntu completely it was necessary to find a permanent alternative on that platform since Notepad++ is only available on Windows.

The requirements list in order of priority:

  1. Fast & Native (reading NOT Java or similar runtime requirements)
  2. Excellent Search & Replace (which is where most fail ….)
  3. Lightweight
  4. Simple GUI (reading NOT an IDE)

Potential Candidates

Scite

Scite was my first try since it is based on the same engine as Notepad++. I have used it for a number of months but was never really happy with it. Issues with “Find in Files” functionality have been the final issue that make me move on. http://www.scintilla.org/SciTE.html

Scite Screenshot

Geany

I came across this one very recently and after a short trial period grown to really like it. Apart   from it’s silly name and very ugly icon it really has got the nicest overall balance of speed and functionality. And most importantly it also has very decent in-built search & replace functions. This includes ”Find in Files” functionality which actually works. http://www.geany.org/

Geany Screenshot

Vim (Cream)

Since vim is my command-line text editor of choice for years I was giving the GUI version a try next to Geany. However since I am not a total vim freak (never had enough time to learn all the power of this tool) I decided to stick to a dedicated GUI text editor for long editing tasks (HTML, CSS coding) and keep vim for when I am on the command-line or a headless server.

Gedit

Being the default editor in Ubuntu I have used it a bit, but always found it very sluggish and not very intuitive to use. Apart from the fact is installed by default I did not find many things I liked about it.

Note: sometimes the find and replace needs are outside of the capabilites of any text editor and you have to resort to a specialised tool. As a GUI I have always found Regexxer (http://regexxer.sourceforge.net/) very useful. Otherwise there is always the full power of grep and sed.

Turning the Toshiba Z830 into a Ubuntu Ultrabook

ultrabook

EDIT: Here are some tweaks if you install 12.04 (Precise Pangolin).

Since I will have to do a fair amount of traveling in the next year I was in need of upgrading my trusted workhorse of Toshiba Qosmio F60 to a more portable option that will be easier on the shoulders during long travels. After doing some research into which of the major manufacturers offer the best support for a Linux based Operating System it came down to a final two: the Intel i7 variants of Samsung Series 9 and the Toshiba Z830.

Thanks to these sites for some useful content:

In the end it came down to Toshiba having full-size VGA, HDMI and Ethernet connectors at the rear of the unit (no need for carrying adapters) and getting a very decent price rebate for the Toshiba.

The first and only task in the included Windows 7 OS was to create a recovery USB drive using the Toshiba included utility (on the desktop). You need a 12GB USB stick (found out the hard way after buying an 8GB version with the unit on advice of the sales guy).

After booting from a USB stick created from the Ubuntu 11.10 ISO (http://www.ubuntu.com/download/ubuntu/download) with Ubuntu Bootdisk Creator (or alternatively UnetBootin) I opted to wipe the whole SSD drive. If you are not sure that you want to stick with Ubuntu it might be safer to try running from USB or dual-boot.

Note: you need to use the USB3 connector on the right-hand side of the machine to boot (not the rear USB2 connectors). Press the F-12 Function key when turning the unit off and choose the USB Boot option.

It always gives me strange pleasure to wipe a pristine new machine from all the rubbish that manufacturers pre-install and start with a clean system that I can customise to my needs (without having redundant stuff cluttering the system and waste valuable resources).  So enjoy that part ;-)

toshy ultrabook

The Oneiric Ocelot (11.10) installation was extremely smooth. As predicted by the previous research all the hardware was detected automatically. Even Bluetooth and Toshiba Function keys (screen brightness and display switching) work without any tweaking.

I am currently looking into some SSD specific tweaks thanks to this article on ZDNET. I will post future updates on further experiences when it comes to battery-life and other day-2-day issues.

Update: I have made a tweak to improve disk I/O parameters to improve SSD performance

Disable the ‘elevator’ I/O scheduler in the kernel by editing the default Grub config (/etc/default/grub)

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=noop"

Looks like this unit is definitely a good option for people looking for Ubuntu Notebook / Ultrabook hardware. Well done Toshiba ! Now I just want a refund for the wasted Windows license….

Enjoy your OPEN Ultrabook !

Mobile Browser Testing on the Desktop

If you need to check websites for mobile compliance on a regular basis you know that having a device to constantly check is painful and slows down your work during debugging and phases of constant change.

Surrounding myself with screens by adactio, on Flickr
Creative Commons Attribution 2.0 Generic License  by  adactio 

There are a few tools that will make this work a lot easier:

Google Chrome

Chrome does have some nice dedicated plug-ins to help with this task

Firefox

I am not aware of any plug-ins like Chrome, but as a hack I have found it useful to employ a user-agent switching plugin to trick the browser

User Agent Switcher (http://chrispederick.com/work/user-agent-switcher/) works well for this.

  1. Download the User Agent Switcher Add-on for Firefox
  2. Restart Firefox for the add-on change to take place.
  3. To start a new browsing session using an emulated browser, go to Tools > User Agent Switcher and select the appropriate mobile web browser you want to emulate
  4. To switch back to normal browsing, just select the default option from the above menu.

If you need more specific UA Strings check here: http://www.zytrax.com/tech/web/mobile_ids.html

For more serious work there are obviously dedicated emulators from the major Mobile OS vendors (but they need to be installed and configured for each platform):

 

PS: Nothing substitutes final QA testing on actual devices …

 

Virtualbox 4 install on Ubuntu

Since the default Ubuntu repository does not have the current version of VirtualBox (currently 4.1.x) here is the installation procedure via apt-get

echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-4.1

To use USB devices on the clients you need to install the Extension Pack from the Oracle Site and install via the File –> Preferences.