Archive

Posts Tagged ‘ubuntu’

Using RVM & Ubuntu

June 28th, 2011 No comments

If you’re using RVM and attempting to setup a fresh server, do not forget to do the following

$ rvm package install readline
$ rvm package install zlib
$ rvm remove 1.9.2
$ rvm install 1.9.2

Seemed to solve most open issues for me.

Also, you need to system install somedev libraries. For instance I needed to run the following because bundle install failed:

sudo apt-get install libsqlite3-dev, libreadline5-dev, libncurses5-dev

That last statement btw – solves most problems with RVM and readlines. After that you can follow the directions on beginrescueend around readline
.

Categories: Technology Tags: , , , , ,

Citrix ICA Client (Xenapp) on Ubuntu

August 21st, 2010 No comments

Since I am building a machine from scratch right now, a number of things are becoming minor annoyances. Thankfully the interwebs are alway standing by to provide answers. Since I managed to find answers to this particular issue, in a myriad of different places (all linked to at the bottom of this post), I figured I might as well bring them all into one location. Also, please note, these instructions are usually compiled for folks who know nothing about Ubuntu or libraries, or security certificates etc.. If you are indeed knowledgeable about these things, feel free to skip this entire post.

The best guide for installing the Citrix XenApp Client is on Ubuntu’s forums.

Only follow instructions till the point where it gets to “Download Citrix client 10.6″… those are older instructions and you don’t need to follow them.

After that you will need the security certificates. Otherwise you will get the “you have chosen not to trust” error message when you connect to your Citrix server.

So to avoid doing that grab the certificates from the following locations :

i) Thawte Certs from :

http://www2.slac.stanford.edu/computing/windows/services/citrix/linux_client.htm

Grab both files – thawte-server-ca.crt and ThawteRoot.crt

ii) GoDaddy from :

https://certs.godaddy.com/anonymous/repository.seam

Grab the file gd-class2-root.crt

Download these, then move them into usr/lib/ICAclient/keystore/cacerts

Done. Once that happens, you should be able to open the ica files that Firefox gives you with the wcfmgr in /usr/lib/ICAClient folder.

You might need other certificates – download them and place them in the same directory. You can export certs from Opera if needed (I haven’t found how to do them from FF).

Categories: Technology Tags: ,

How to install Flash on 64 bit Ubuntu

August 21st, 2010 No comments

Note : This post will become obsolete as soon as Flash re-releases its 64 bit Flash application. They did have an Alpha release in the wild, but personal testing led me to believe it was buggy and extremely prone to crashing my browsers (especially Chrome). They apparently felt the same way and have shut it down for now, with the promise of better, stronger, faster, coming soon.

Update : I got an email asking which version of Ubuntu this was. My apologies for not adding that in – 10.04 – Lucid Lynx released in April 2010. Its the LTS version so will retain support till 2013.

Anyways, there’s lots of tutorials out there in the wild, that instruct you to use ia32-libs, and nswrapperplugin via the nswrapper plugin -i method (see end of this post for that method if you need). However there is an easier way.

Anyways, assuming this is a fairly new build. Here’s what you do.
sudo apt-get install flashplugin-nonfree

Restart all your browsers and voila – all is good in the world again. This will automatically install the following packages as well.

flashplugin-installer flashplugin-nonfree ia32-libs nspluginwrapper

If you already have a previous version of ia32-libs installed, this may or may not work for you. In that case, you may be tempted to purge your current ia32-libs, however, be careful when you are doing this, I strongly suggest you only do this on ‘new builds’ that don’t already have a ton of 32 bit programs running that are relying on this. For instance, Skype. If you have already installed Skype on your 64 bit machine, do not remove ia32-libs. Scroll down and try the more manual method.

The more manual method is described in detail in the following blog post : My Science is Better…

For those of you that don’t want to follow the link – its fairly straight forward.

i) Remove all older versions of Flash Plugins
sudo apt-get remove -y --purge flashplugin-nonfree gnash gnash-common mozilla-plugin-gnash swfdec-mozilla libflashsupport nspluginwrapper

ii) Then remove any Flash Libraries
sudo rm -f /usr/lib/mozilla/plugins/*flash*
sudo rm -f ~/.mozilla/plugins/*flash*
sudo rm -f /usr/lib/firefox/plugins/*flash*
sudo rm -rfd /usr/lib/nspluginwrapper

iii) If you haven’t already download ia32-libs and nswrapperplugin
sudo apt-get install ia32-libs nspluginwrapper

iv) Get the latest version of Flash from Adobe : http://get.adobe.com/flashplayer/

v) Untar it.

vi) Place libflashplayer.so (or whatever the filename is then) in a folder that you can access. Preferably put it in /usr/lib/mozilla/plugins. Both Firefox and Chrome look in this folder for plugins. Then run the following

vii) Nswrapper time…
sudo nspluginwrapper -i /usr/lib/mozilla/plugins/libflashplayer.so
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/

Note, that in some cases, this won’t work – and you will get the dreaded error ::
nspluginwrapper: no appropriate viewer found for libflashplayer.so

If that happens to you, try the first approach, and see if that works.

Update [April 2011]
Flash released a 64 bit version in Adobe Labs. Install that if you like. Thus far it seems stable, and not too much of a memory hog.

Categories: Technology Tags: ,

AMTU and UBUNTU

July 29th, 2009 1 comment

Amazon Merchant Transport Utility – it takes all the worry of SOAP out of your daily life!

Recently a customer wanted to explore the option of using AMTU in order to move files to, and receive reports from Amazon. The idea is simple -

  • Run AMTU on a local computer
  • Designate a folder
  • Voila – receive new reports there and any files you put there get uploaded to Amazon (every 5 to 12 minutes depending on the file)

It did actually work exactly as described above on a Windows machine. However, we want to do some other things with the information we get from Amazon – warehouse, and payment provider integration etc.

I mocked together a “clunky” looking application (as described by my Director of Services) that does the above in Rails – and was running it on an Ubuntu machine over at Slicehost.

Now, to get AMTU running on this machine, (AMTU is all Java, it should ‘theoretically’ run everywhere), and I’m off to the races. I toss on the kettle, and run back to my machine expecting to drink a cup of tea as I watch automation make our customer’s life much easier in a few minutes.

Clunk!

AMTU refuses to install properly on Ubuntu.

In order to make this easier for future folks attempting this.

1) You need Java (OpenJava, Sun Java6, Sun Java5 whatever). You can and should check this exists by typing in

java -version

Assuming this works, on to the next point. If this doesn’t work then do something along the lines of
sudo apt-get install sun-java6-jre

2) You need to be able to echo JAVA_HOME.  Also, don’t make the mistake of pointing it at /usr/bin/java – since the installation is actually asking for the directory wherein Java was installed – it appends the /bin/java part on top of that during the installation. In order to be able to accomplish this in the easiest fashion possible do the following :

sudo nano /etc/environment

Feel free to use any other editor if you like – vi etc. To this file add the line :

JAVA_HOME="/usr/lib/jvm/java-1.5.0-sun"

Note, make sure you actually change that to the file you’re looking for. If you don’t know where you need to point JAVA_HOME, you can get a hint by doing

whereis javac

and then following the symlinks back from that directory to the actual location of javac then traverse the directory tree so that you’re in the directory that has a child named bin, and that bin has a child named java, and you’re in the right place.  In the example below, /usr/lib/jvm/java-1.5.0-sun is the appropriate directory for JAVA_HOME.

Setting JAVA_HOME in Ubuntu

Setting JAVA_HOME in Ubuntu (Click on it for a larger view)

3) Now you should be able to just run ./install.sh from inside the AMTU folder.

4) If all went according to plan, this worked great. If it didn’t, you’re probably seeing a -bash XXXXXXXX No such file or folder error.

If that’s the case, then you need to keep in mind two things. One, AMTU’s last release was in 2007. It has no real support in the community, or from Amazon itself. Two, you’re probably on a 64 bit machine, and you’ve never needed to install ia32-libs. You can correct this now by doing

apt-get install ia32-libs

5) Now go ahead, uninstall, and reinstall AMTU.

If you run into any other errors, feel free to ping me, and I’ll share with you what little I know about it.

UPDATE : I got an email claiming that they were unable to find sun-java6-jre as a package. The most likely culprit there is that apt-get isn’t checking the multiverse for packages. If you want more details on what that means – check out the explanation of main, restricted, universe, and multiverse here.

In order to let Ubuntu look into the multiverse for packages that are “not free” you need to change the following files /etc/apt/sources.list

sudo nano /etc/apt/sources.list

Your file probably looks similar to this :

deb http://archive.ubuntu.com/ubuntu/ hardy main restricted universe
deb-src http://archive.ubuntu.com/ubuntu/ hardy main restricted universe
deb http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted universe
deb-src http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted universe
deb http://security.ubuntu.com/ubuntu hardy-security main restricted universe
deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted universe

You want your file to look like this :

deb http://archive.ubuntu.com/ubuntu/ hardy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted universe
deb-src http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted universe
deb http://security.ubuntu.com/ubuntu hardy-security main restricted universe
deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted universe