Adobe Flash 10 and Google Gears on Firefox in 64-bit Ubuntu!

Posted in Guides, Life in General, Linux, Lists by aliencam | 1 Comment »

It makes almost no sense nowadays to be using a 32 bit operating system, however, there are still many problems with using a 64 bit version of firefox, like the one shipped with 64-bit editions of Ubuntu.  The main problems are that a few addons don’t support the 64 bit version, and flash 9 is very unstable.  It was not impossible to find information on the internet explaining how to fix the issues with Flash and Google Gears, without messing up anything else.

The solution that I found to unstable flash in 64-bit Ubuntu was to use the new version of flash, 10.  Flash 10 is still not in the repositories, and probably will not be until the next release of ubuntu (curse you feature freeze!), but some people on the ubuntu forums have posted how to get Flash 10 installed in firefox, it is really quite easy using their script. If you don’t want to follow my interpretation of the instructions, you can read the topic for yourself at http://ubuntuforums.org/showthread.php?t=954100

Flash 10

Go to System > Administration > Software Sources and then to the Third Party Software tab. click Add and add the line: 

deb http://ppa.launchpad.net/psyke83/ubuntu intrepid main

This repository has flash 10, and a new version of pulseaudio as well, so that will get upgraded along with everything else.

Hit “Close” let it refresh, then close again.  make sure you DO NOT do software upgrade right now, it will break things.

if you have not already, install the getlibs package, which is extremely useful for installing 32-bit software in 64-bit ubuntu. (install it by clicking that link and downloading the package on that page, then clicking on the downloaded package and installing it. )

then make a new file anywhere, and as it’s contents paste in the following:

#!/bin/bash
# Script  created by
# Romeo-Adrian Cioaba romeo.cioaba@spotonearth.com
# Super minor updates by jason.melton[at]gmail[dot]com
# Another minor update by tal.liron[at]gmail[dot]com
# Released under GPL

echo "Stopping any Firefox that might be running"
sudo killall -9 firefox

echo "Removing any other flash plugin previously installed:"
sudo apt-get remove -y --purge flashplugin-nonfree gnash gnash-common mozilla-plugin-gnash swfdec-mozilla libflashsupport nspluginwrapper
sudo rm -f /usr/lib/mozilla/plugins/*flash*
sudo rm -f ~/.mozilla/plugins/*flash*
sudo rm -f /usr/lib/firefox/plugins/*flash*
sudo rm -f /usr/lib/firefox-addons/plugins/*flash*
sudo rm -rfd /usr/lib/nspluginwrapper

echo "Installing ia32-libs and nspluginwrapper"
sudo apt-get install ia32-libs nspluginwrapper

echo "Getting libs"
sudo getlibs -p libcurl3
sudo getlibs -p libnss3-1d
sudo getlibs -p libnspr4-0d

echo "Installing Flash Player 10"
cd ~
wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz
tar zxvf install_flash_player_10_linux.tar.gz
sudo cp install_flash_player_10_linux/libflashplayer.so /usr/lib/mozilla/plugins/
rm -rf ~/install_flash_player_10_linux/
sudo nspluginwrapper -i /usr/lib/mozilla/plugins/libflashplayer.so

echo "Linking the libraries so Firefox can find it."
sudo ln -sf /usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so /usr/lib/mozilla/plugins/
sudo ln -sf /usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so /usr/lib/firefox-addons/plugins/

echo "Done :-)"

I am really sorry to do this, but you will now have to manually replace all of the open and close quotation marks in that block of code with regular quotation marks. If you use gedit to paste all that information in, then you can use “find and replace”, paste a curved open quote into the find box, then replace all with a regular quote that you type, then do the same for the close quotation.
(Note: I just found a wordpress plugin that will let me disable smartquotes on certain posts, I will be installing that ASAP)

after replacing all the quotes, save and close the file. right-click on it and go to properties, then permissions, and check the “enable executing this file as a program” box. Then open a terminal, and you can either type the path of the file into the terminal and execute it, or just drag the file into the terminal, go back to the terminal and hit enter.

It should ask you for your admin password, then ask you to press “y” a few times, and then if you get “Done :-)” displayed in the terminal, everything should be good. Your Firefox now has Flash 10 installed!!!


Google Gears in 64-bit Firefox!

According to the official Google Gears FAQ, there are two ways to install gears in a 64-bit edition of firefox.  The first one is using “nspluginwrapper” (which makes little to no sense because gears is an addon, not a plugin and as such cannot be wrapped), and the second option is to use a patch documented on the google groups.  The problem with the patch is that most people don’t know how to patch and build source. However, some nice person has patched version 0.4.9.0 (which is a recent version) and posted the compiled addons on their website.  All you have to do is go to http://www-personal.umich.edu/~swolchok/gears/ and download the most recent file anywhere, then in firefox go to File > Open File and select the .xpi file.  Firefox will then install the addon and the only issue will be that every once in awhile you get an error message saying that firefox cannot update the extension because your browser is 64-bit.  Just ignore it and check that website to see if a new version has been posted, it does not interfere with any of the other extensions from being updated.  This guide was taken from HERE.
If you still want to patch and build the latest svn yourself, the patch is located at http://groups.google.com/group/gears-users/browse_thread/thread/4584842dd14a4882 and the SVN is located at http://code.google.com/p/gears/source/checkout

that is all.

-aliencam

Ubuntu 8.10 X61t Tablet Setup (With Touch)

Posted in Guides, Linux by aliencam | No Comments »

Well, I wanted to get a head start on playing with ubuntu 8.10, so that it doesn’t take me hundreds of hours this weekend to rewrite my entire ubuntu setup guide to be relevent to 8.10, so I partitioned off 10 gb and did a fresh install of ubuntu 8.10 RC last week. The first thing I set up was tablet support.

Supposedly this is more difficult in this version of Ubuntu thanks to a fancy new xorg server that ignores the xorg.conf file unless you tell it to, but you tell it to use the file by adding a server section to the xorg.conf file anyway!

This guide only activates the tablet in ubuntu 8.10, it does not do other things that I will need to do later in the xorg.conf file. (such as middle-mouse scroll, and turning off the annoying middle-mouse button = paste function)


***NOTE: ALWAYS BACKUP YOUR XORG.CONF FILE BEFORE EDITING. YOU CAN DO THIS WITH THE COMMAND:

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

Then if you can’t login and need to restore the original, from a failsafe termainal login you can do:

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

YOU MAY NOW PROCEED TO MAKING YOUR UBUNTU COMPUTER AWESOME.***

So, for archival/recovery purposes, here is my original xorg.conf with a Thinkpad x61 Tablet in Ubuntu 8.10, Intrepid Ibex:

Section "Device"
Identifier    "Configured Video Device"
EndSection

Section "Monitor"
Identifier    "Configured Monitor"
EndSection

Section "Screen"
Identifier    "Default Screen"
Monitor        "Configured Monitor"
Device        "Configured Video Device"
EndSection

Of course, that does not include the  commented out parts, or any correct tab spacing (curse you wordpress!!!) but those aren’t really important.

In order to get the tablet working, you need to add at least the three pen devices (eraser, stylus, and cursor) and optionally the “touch” device (if you have a multitouch screen [is your max resolution 102×768? then you likely have multitouch])

The lines for that is as follows:

#BEGIN TABLET SECTION
Section "InputDevice"
Driver        "wacom"
Identifier    "stylus"
Option        "Device"    "/dev/input/wacom"    # USB ONLY
Option        "Type"        "stylus"
Option        "USB"        "on"        # USB ONLY
Option        "ForceDevice"    "ISDV4"        # Tablet PC ONLY
Option        "Button2"    "3"        # Added to map stylus click correctly
EndSection


Section "InputDevice"
Driver        "wacom"
Identifier    "eraser"
Option        "Device"    "/dev/input/wacom"   # USB ONLY
Option        "Type"          "eraser"
Option        "USB"           "on"        # USB ONLY
Option        "ForceDevice"   "ISDV4"        # Tablet PC ONLY
Option        "Button3"    "2"        # Added to map eraser correctly
EndSection

Section "InputDevice"
Driver        "wacom"
Identifier    "cursor"
Option        "Device"        "/dev/input/wacom"    # USB ONLY
Option        "Type"        "cursor"
Option        "USB"        "on"        # USB ONLY
Option        "ForceDevice"    "ISDV4"        # Tablet PC ONLY
EndSection
#END TABLET SECTION

And if you have a tablet PC with multitouch, before the line “#END TABLET SECTION” you can add:

# This section is for the TabletPC that supports touch
Section "InputDevice"
Driver        "wacom"
Identifier    "touch"
Option        "Device"        "/dev/input/wacom"  # USB ONLY
Option        "Type"          "touch"
Option        "ForceDevice"   "ISDV4"               # Tablet PC ONLY
Option        "USB"           "on"                  # USB ONLY
EndSection

Finally, add the server layout section to the bottom of the file so that what you just entered does something:

Section "ServerLayout"
Identifier    "Default Layout"
Screen        "Default Screen"

#Section for tablet events
InputDevice     "stylus"    "SendCoreEvents"
InputDevice     "cursor"    "SendCoreEvents"
InputDevice     "eraser"    "SendCoreEvents"
#InputDevice    "touch"        "SendCoreEvents"  #for the TabletPCs that supports touch
EndSection

If your laptop DOES have multitouch, and you want poking the screen with your finger to work, remove the “#” that is before the line InputDevice    "touch"        "SendCoreEvents"

That’s it, save and restart, and BAM!

Everything on a line after a pound sign (#)  in the above is a comment.  I have put comments in the above xorg.conf configuration so that I know what sections do what, without having to remember things.  If you want, you can remove all of the comments, but I would not suggest it because someday when  you are editing xorg.conf and xorg crashes on you and you want to figure out what you messed up, you will need that documentation.

Remember that my favorite system file editor is nano, NOT gedit.  gedit is very nice for editing normal text files, but I find that things break much more often when using a graphical text editor than a CLI one like nano.  The hardest part about nano is the keyboard shortcuts.  arrow keys to move up and down, and ctrl-shift-c for copy, ctrl-shift-v for paste, and ctrl-x for exit.  You cannot save until you exit (I think…) and when you press ctrl-x it will ask you “do you want to save this file” or something similar, press y, then where you want to save it (probably just hit enter).

So, using nano, the command to edit xorg.conf is:

sudo nano /etc/X11/xorg.conf

And just in case I was not clear enough above, here are the contents of my final xorg.conf file:

# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type “man xorg.conf” at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# Note that some configuration settings that could be done previously
# in this file, now are automatically configured by the server and settings
# here are ignored.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Device"
Identifier    "Configured Video Device"
EndSection

Section "Monitor"
Identifier    "Configured Monitor"
EndSection


Section "Screen"
Identifier    "Default Screen"
Monitor        "Configured Monitor"
Device        "Configured Video Device"
EndSection

#BEGIN TABLET SECTION
Section "InputDevice"
Driver        "wacom"
Identifier    "stylus"
Option        "Device"    "/dev/input/wacom"    # USB ONLY
Option        "Type"        "stylus"
Option        "USB"        "on"        # USB ONLY
Option        "ForceDevice"    "ISDV4"        # Tablet PC ONLY
Option        "Button2"    "3"        # Added for stylus click
EndSection

Section "InputDevice"
Driver        "wacom"
Identifier    "eraser"
Option        "Device"    "/dev/input/wacom"   # USB ONLY
Option        "Type"          "eraser"
Option        "USB"           "on"        # USB ONLY
Option        "ForceDevice"   "ISDV4"        # Tablet PC ONLY
Option        "Button3"    "2"        # Added for eraser working
EndSection

Section "InputDevice"
Driver        "wacom"
Identifier    "cursor"
Option        "Device"        "/dev/input/wacom"    # USB ONLY
Option        "Type"        "cursor"
Option        "USB"        "on"        # USB ONLY
Option        "ForceDevice"    "ISDV4"        # Tablet PC ONLY
EndSection

# This section is for the TabletPC that supports touch
Section "InputDevice"
Driver        "wacom"
Identifier    "touch"
Option        "Device"        "/dev/input/wacom"  # USB ONLY
Option        "Type"          "touch"
Option        "ForceDevice"   "ISDV4"               # Tablet PC ONLY
Option        "USB"           "on"                  # USB ONLY
EndSection
#END TABLET SECTION

Section "ServerLayout"
Identifier    "Default Layout"
Screen        "Default Screen"
#    InputDevice    "Synaptics Touchpad"


#added to get tablet working
InputDevice     "stylus"    "SendCoreEvents"
InputDevice     "cursor"    "SendCoreEvents"
InputDevice     "eraser"    "SendCoreEvents"
InputDevice    "touch"        "SendCoreEvents"
EndSection

Hope this helps, I don’t think there is another guide for it online yet.

–aliencam

Final Note:

I wrote this guide in Noble Library on ASU’s campus this morning, and I lost my laptop’s stylus while I was there… So far it has not shown up in any of the lost and founds around campus, and it was not in the study room where I was working, so it looks like I need a new one… The problem is that I don’t have any money right now, the pen costs $50, and I need it to take notes in many of my classes… If this  guide helped you out, and you need web hosting, please consider using the bluehost affiliate link in the right sidebar.  Bluehost is great for very cheap unlimited hosting, (I think about $90/yr) and if one person were to sign up, the affiliate program would pay me enough to afford a new digitizer pen for my laptop. The stylus is also on my amazon wishlist at the link at the top of the page, and here

Here is my xorg.conf file with Touch disabled.  I am posting this because there are problems with wordpress messing up quotation marks and indentations/tab spacing in the things I have posted, causing people who copy-pasted from my blog to only be able to boot in low-graphics mode.

xorg.conf

UPDATE 01.07.2008: I just updated the xorg.conf sections in this post to include “code” tags, so now it should be okay to copy-paste directly from here. Double check that it is not still pasting “smart-quotes” before saving the changes, but hopefully that shouldn’t happen.

Also, one commenter has said that the buttons on their digitizer pen are mapped differently. If you could not get the eraser working, try mapping the eraser to "Button1" "3" instead of "Button3" "2"

Creative Commons License