Citrix Receiver on Linux x86_64

Of late I have been on an OS installation spree; For some reason I didn’t like 12.10 too much.

To WFH and that too from some derivative of Linux, I had to each time make sure that Citrix worked. I have successfully installed it on Ubuntu, Slackware and Linux Mint (few minutes back).

#Step 1

Go to Citrix.com and download Receiver for Linux in .deb

The package:

Even though we have downloaded it from the 64-bit section, as the name suggests it still is a 32-bit package.

#Step 2

To make sure that the 32-bit binaries work on your 64-bit machine please install:

$ sudo apt-get install ia32-libs

#Step 3

Installation is as simple as a double click (for Debian and derivatives). For others please convert it to the required format using the tools available on your current system.

#Step 4

Open web browser (Chrome works best). Login etc.

And when the browser downloads the .ICA file then advise the Browser to use

/opt/Citrix/ICAClient/wfica

Known Issues:

Installation Fails:

You are happily waiting for the installation to complete but it fails at the final post-install steps, even after getting successfully installed.

Now each time you try to install a new software this post-install will be retried and would leave your machines in a mess.

The work around is pretty simple. The script is looking for x86 as the desired architecture when it actually is x86_64 (you can validate that by typing `uname -m` in the terminal)

#StepA Open the postinstall file
$ sudo gedit /var/lib/dpkg/info/icaclient.postinst

#StepB
# replace
# echo $Arch|grep "i[0-9]86" >/dev/null
# with
# echo $Arch|grep -E "i[0-9]86|x86_64" > /dev/null

#StepC tell dpkg to configure icaclient
$ sudo dpkg --configure icaclient

If it still doesn’t work for you then open the terminal and try this:

/opt/Citrix/ICAClient/wfica PATH_TO_ICA_FILE

This way you can find out details and try to troubleshoot.

Additionally you may check this https://help.ubuntu.com/community/CitrixICAClientHowTo.

Happy Hacking.

VirtualBox vboxdrv problem on Ubuntu

Problem Statement:

#1

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing


/etc/init.d/vboxdrv setup

as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

#2

Failed to open a session for the virtual machine “Windows XP”.

The virtual machine ‘Windows XP’ has terminated unexpectedly during startup with exit code 1.

(Running a virtual machine on VirtualBox the two dialogues would say that)

The cause — as the VirtualBox page states it:

Ubuntu/Debian users might want to install the dkms package to ensure that the VirtualBox host kernel modules (vboxdrv, vboxnetflt and vboxnetadp) are properly updated if the linux kernel version changes during the next apt-get upgrade.

The Fix:

The dkms package can be installed through the Synaptic Package manager or through the following command:

sudo apt-get install dkms

Running `virtualbox` in the terminal says almost the same thing…

$ virtualbox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (3.5.0-18-generic) or it failed to
load. Please recompile the kernel module and install it by

sudo /etc/init.d/vboxdrv setup

You will not be able to start VMs until this problem is fixed.
# You have heard the man!
$ sudo /etc/init.d/vboxdrv setup
* Stopping VirtualBox kernel modules [ OK ]
* Uninstalling old VirtualBox DKMS kernel modules [ OK ]
* Trying to register the VirtualBox kernel modules using DKMS
Error! Your kernel headers for kernel 3.5.0-18-generic cannot be found.
Please install the linux-headers-3.5.0-18-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located

* Failed, trying without DKMS
* Recompiling VirtualBox kernel modules
* Look at /var/log/vbox-install.log to find out what went wrong
# Downloading the Linux Headers now
# sudo apt-get install linux-headers-3.5.0-18-generic
$ sudo apt-get install linux-headers-`uname -r`
# Running it again
$ sudo /etc/init.d/vboxdrv setup
* Stopping VirtualBox kernel modules                          [ OK ]
* Uninstalling old VirtualBox DKMS kernel modules             [ OK ]
* Trying to register the VirtualBox kernel modules using DKMS [ OK ]
* Starting VirtualBox kernel modules                          [ OK ]

All good!

Enable Hibernation on Ubuntu

One of those note-to-self posts!

Why does Ubuntu come with Hibernation disabled by default?

Ubuntu had to resort to such measures as users experienced a lot of issues like:

  • No resume after suspending the PC — in a limbo
  • Open files and folders gone — Shutdown instead of hibernation
  • Wifi etc devices not working after waking up — the worst nightmare

And that happened because there wasn’t enough Hardware support. Even in Ubuntu derivatives like Linux Mint it came disabled.

What is hibernation?

Seriously? Forget it. I am not even going to look at you.

Alright Alright suit yourself: https://help.ubuntu.com/community/PowerManagement/Hibernate

Advantages of Hibernation:

  • You have an edge over “suspending”. It saves power.
  • The exact state of the computer is resumed.
  • Major use case for the people who leave their  PCs unattended (think: http://Torrentz.in)

How to enable it in Ubuntu:

Step#1 Check if hibernate works on your hardware.

  • Open Terminal (CTRL + ALT + T)
  • Save your work first and then type
 $ sudo pm-hibernate 
  • If everything goes smoothly, start your laptop and continue iff things look good.
  • If you see anything unexpected then please make sure that the size of SWAP is at least as large as the RAM or just 
     System.exit(1) 

Step#2 You can continue to use that command safely or make it permanent by enabling it on the menu (do it only if Step#1 above works)

Open terminal and type:

 $ sudo gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla 

Enter the password

(instead of `gedit` you can use `vi` its awesome)

hit “i”; paste; hit “ESC”; hit “:”; hit “x”

Step#3 Paste the following lines in the blank file you created just now.

[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

Hit Save and Quit.

Step#4 Reboot for the changes to take effect.

If upon restart you still cannot see the “Hibernate” item in the menu, then you need to Tweak the Grub but mostly it would not come to that.

And we’re back …

Also check http://nikunjlahoti.com/2012/04/29/ubuntu-12-04-fix-fn-brightness-keys/

Sources:

https://help.ubuntu.com/12.04/ubuntu-help/power-hibernate.html

https://help.ubuntu.com/12.04/ubuntu-help/power-suspendfail.html

Ubuntu fix Fn Brightness keys

So my Acer Aspire 5738 encountered the oh-the-Brightness-Function-keys-are-not-working-yet-again issue after the installation of Ubuntu 12.04. There is a simple fix and some related caveats. So here we go …..

#1 (open the file in gedit or vi)

$ sudo vi /etc/default/grub
[sudo] password for nikunj:

#2 (find an insert the arguments in gray)

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash acpi_osi=Linux acpi_backlight=vendor

#3 (update the grub configuration)

$ sudo update-grub
Generating grub.cfg …
Found linux image: /boot/vmlinuz-3.2.0-24-generic
Found initrd image: /boot/initrd.img-3.2.0-24-generic
Found linux image: /boot/vmlinuz-3.2.0-23-generic
Found initrd image: /boot/initrd.img-3.2.0-23-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
Found Ubuntu 11.10 (11.10) on /dev/sda2
done

Just reboot the machine.

Caveats:

At times the screen would go entirely dark. Or would not apparently resume from a blank screen or when the screensaver gets active.

For such cases, all you need to do is press “Fn + Brightness UP button” and screen will GLOW. Simple!!

(This post is more like a NOTE TO SELF. But if it helps you in someway then its even better … AWESOME!! :D)

Update:

Works for Ubuntu 12.10 perfectly 🙂

Update (2013/01/08):

You can use “sudo gedit /etc/default/grub” if you are not very familiar with vi editor! 🙂

Update (2013/05/12):

For Ubuntu 13.04 do the following:

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash acpi_osi=Linux acpi_backlight=vendor

Update (2014/05/25):

Works on Ubuntu 14.04.

That’s how OALD7’s Successfully Installed on amd64!!

😀 Well.. . as crazy as if sounds .. . I finally managed to Break the Code! 😛

IF you-don’t-follow-my-blogs OR you-don’t-remember-stuff THEN
URL.refer (http://mrdigerati.blogspot.com/2010/02/this-is-what-i-did-on-v-day.html)
🙂

oops!
END IF;
// Yeah Some PL/SQL *HIT I’m into these days.  Sucks?

Anyway! Coming to the point. I looked for answers like almost everywhere and couldn’t really find even one…! Finally I went deep and mined some stuff, similar issues that the gamers were facing. Hail Loki.

ISSUES:
#1 (regular usage)

$ ./installation.sh
Verifying archive integrity… All good.
Uncompressing ……………………..
This installation doesn’t support glibc-2.1 on Linux / x86_64

#2 (using x86 emulation)

$ linux32 ./installation.sh
Verifying archive integrity… All good.
Uncompressing ……………………..
/home/nikunj/.setup5913: error while loading shared libraries: libgtk-1.2.so.0: cannot open shared object file: No such file or directory
Couldn’t load ‘atal’
The setup program seems to have failed on x86/glibc-2.1

Both the times it said:
Please contact Loki Technical Support at support@lokigames.com
The program returned an error code (1).

Anyway. ‘linux32’ should’ve ideally worked but .. . . there was more.

WHAT I DID TO MAKE OALD7 run:

#1. To run 32-bit apps on 64-bit Linux, you first need to install these prerequisite packages:

$ sudo apt-get install ia32-libs ia32-libs-gtk ia32-libs-sdl dpkg-dev


#2. Then I downloaded the i386 package from the Ubuntu site.
libGTK1.2: http://packages.ubuntu.com/jaunty/i386/libgtk1.2/download

#3. Deflate (Unzip/Un… hmm… Deb?) the libgtk1.2_1.2.10-18.1build2_i386.deb (right-click and extract) and then go inside the folder hence created. Deflate data.tar.gz and go inside ./usr,

$ cd libgtk1.2_1.2.10-18.1build2_i386/usr/lib (in short)


#4. Now we need to copy the files (lib? Modules?) to the location where OALD7 desires to find it!

$ sudo cp -v -i * /usr/lib32

#5. Try installation now. [ERROR. still?]
(Even after that another library was required)

$ linux32 ./installation.sh

Verifying archive integrity… All good.
Uncompressing ……………………..
/home/nikunj/.setup6372: error while loading shared libraries: libgmodule-1.2.so.0: cannot open shared object file: No such file or directory
Couldn’t load ‘atal’
The setup program seems to have failed on x86/glibc-2.1

#6. Then I downloaded two i386 packages for the Ubuntu site.


Follow the same procedure (#3-5) for libglib1.2ldbl_1.2.10-19build1_i386.deb

😀 and voilà .. . 😛 this is what you get! Don’t kill me 😛

Looks Kinda…  hmm….Nude!!

I don’t know why but just couldn’t see any TEXT 😐 I closed my eyes, trusted my senses and from the last time I installed it without this ‘Chick Chick’. Pushing the third Check-Box would save all the Sounds etc and makes it offline! 🙂 DO THAT.

Finally 😀 ….. Legen — wait for it —- Dary!!!

Update:
OALD8 installation is like so easy. Works Great! But I like the UI of v7 better! 🙂

OALD8 looks Light W8! (Rhyme?)

Update (2012-09-19):

For OALD8 on Ubuntu 12.04 Amd64

#1 Dependencies

$ sudo apt-get install ia32-libs ia32-libs-gtk ia32-libs-sdl dpkg-dev

#2 Mount the ISO/CD

using Furious ISO Mount Tool, etc!

#3 Begin Installation

Go to the mount directory

$ cd linux

$ linux32 ./setup.sh

Tweaks:

#1

No Sound?

Try padsp – PulseAudio OSS Wrapper:

padsp starts the specified program and redirects its access to OSS compatible audio devices (/dev/dsp and auxiliary devices) to a PulseAudio sound server.

$ padsp path-to-the-oald8

eg:

$ padsp ‘/home/nikunj/oald8/oald8’

#2

Create a Shell-Script on the Desktop

#!/bin/sh

padsp ‘/home/nikunj/oald8/oald8’

Make it executable. Also, optionally set the ICON from: /home/nikunj/oald8/chrome/icons/default/main-window.xpm

#3 (adjust)

Annoying Dialog: Click OK to download Plugin

Click Cancel. Yeah! Adjust! 😛

 
Update (2012-09-20)

Just copied and pasted it to my brand new Linux Mint.

It didn’t work by default.

/run-oald8.sh: 166: ./run-oald8.sh: ./oald8-bin: not found

So all I had to do was install the libraries.

$ sudo apt-get install ia32-libs ia32-libs-gtk ia32-libs-sdl dpkg-dev