Sunday, 16 June 2013

Citrix Receiver Segfaulting under Kubuntu Raring

The other weekend I updated Kubuntu through 2 releases to the latest raring.
The upgrade was a painless process - a simple do-release-upgrade or something so I thought all was merry.

Not so fast. One of the few application I use is Citrix XenApp receiver to work from home. For some reason when I clicked the icon from the web interface I was getting zero response. Zero, nada, zilch.

(I did manage to work out how to get the raw ICA file through from the citrix xenapp web interface: in firefox simply disable the Citrix receiver plugin and it pops up with the file itself which you can run through wfica manually! :) ).

I ran the program through a lot of stuff - strace, checked the ldd, valgrind, changed my window manager, and nothing fixed it! I couldn't even see the problem since the code is proprietary. Though it did seem to be happening somewhere gtk_main.

Still segfaulting.

Then I went on a bit of a rampage and deleted everything listed under `gtkorphan` which was fun but not helpful.

Then I force removed gtk3 down to 2 using: http://askubuntu.com/questions/18631/how-to-downgrade-gtk2-0-package-to-workaround-bug-693758

Then I removed the oxygen them: http://askubuntu.com/questions/177909/restore-gtk-integration-after-removing-kde

And bingo!
Not sure exactly what it was. My tests seem to indicate the oxygen theme but that wouldn't explain why it still wasn't working under xfce. So maybe it was that in combination with the gtk downgrade.

Anyway, please let me know if you face a similar problem and write a comment - I can probably help you out. This was such a difficult one to fix (without reinstalling!).

Peace out.

Restoring Linux Ubuntu Citrix Receiver Keyboard Shortcuts

Recently I did a complete upgrade of my Kubuntu OS which managed to break one of my few useful utilities - Citrix Xenapp receiver.

First it segfault'ed all the time (more to come) but secondly it also got rid of all my keyboard shortcuts!

I couldn't quit Xenapp when it was full screen without forcibly killing the application (killall `pidof wfica`). The Ctrl-F2 shortcut had been wiped.

So the fix was as follows.

Check to make sure both your ~/.ICAClient/appsrv.ini and ~/.ICAClient/wfclient.ini both have the following shortcut mappings right after the [WFCLIENT] tag:


 Hotkey1Char=F1  
 Hotkey1Shift=Shift  
 Hotkey2Char=F3  
 Hotkey2Shift=Shift  
 Hotkey3Char=F2  
 Hotkey3Shift=Shift  
 Hotkey4Char=F1  
 Hotkey4Shift=Ctrl  
 Hotkey5Char=F2  
 Hotkey5Shift=Ctrl  
 Hotkey6Char=F2  
 Hotkey6Shift=Alt  
 Hotkey7Char=plus  
 Hotkey7Shift=Alt  
 Hotkey8Char=minus  
 Hotkey8Shift=Alt  
 Hotkey9Char=F3  
 HotKey9Shift=Ctrl  
 Hotkey10Char=F5  
 HotKey10Shift=Ctrl  
 Hotkey11Char=plus  
 Hotkey11Shift=Ctrl  
 Hotkey12Char=plus  
 Hotkey12Shift=Ctrl  
 Hotkey13Char=plus  
 Hotkey13Shift=Ctrl  
Now I can Ctrl-F2 and Alt-Tab to my next local application REF: http://support.citrix.com/article/CTX140219

Saturday, 18 May 2013

Convert a folder of flacs to mp3

Convert a folder full of flac files to mp3 files with the same name but mp3 extension. Requires ffmpeg (sudo apt-get install ffmpeg)

 for i in `ls *.flac`; do res=`echo $i | awk '{sub(/flac/,"mp3"); print }'`; `(nohup ffmpeg -i $i -ab 196k -ac 2 -ar 48000 $res;) &`; done;  

Tuesday, 9 April 2013

Citrix MultiMonitor Pass Config Parameters From Web Interface

Clearly I don't post on here any more but here is a useful thing I found the other day.

Whenever I want to work from home I have to the citrix web interface to launch a remote session. At home I have a dual monitor linux ubuntu setup using my gtx 560 and the standard (for now) nvidia drivers that come with kubuntu - using twinview.

When I open my citrix connection from the browser (uses xendesktop) I cant get the remote session to span all my screens. I can expand and stretch but not achieve full fullscreen.

I fixed this by doing the following to my bashrc, adding:

export WFICA_OPTS="-span a"

This is a useful environment variable that is passed in when you load citrix from the web interface - otherwise there is no mechanism to pass args in.

This caused my citrix session to span both my monitors when I configured it to fullscreen seamless from the web UI (this is a vital step).

Perfect.

Tuesday, 14 August 2012

Updating NVIDIA Drivers

Downloading and installing the NVIDIA binary blobs (or drivers as they're known) from the website is an absolute nightmare for Linux. It usually involves killing the xserver and ensuring that you have the right kernel modules matching up.

Anyway, there is a simple way of keeping your NVIDIA display driver up to date by adding the following ppa to your repositories:

sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current 
  

Algorithmic Trading in the Headlines

With the spectacular melt down of Knight Capital (resulting in a $440million loss) this week due to a piece of buggy 'dormant' software, the newswires have been alive with talk of HFT and algorithmic trading. Below I pick a selection of the best headlines that are worth a read. How long will this last?


High-frequency trading and the $440m mistake - Tim Harford (BBC News)
Raging Bulls: How Wall Street Got Addicted to Light-Speed Trading - Wired
History of Algorithmic Trading - Bloomberg News (Opinion)

And also a nice little video to explain HFT.

A Brief History of Supercomputers

Interesting infographic from hpc4energy.

Can we just autofill city and state? Please!

Coming from a country that is not the US where zip/postal codes are hyper specific, it always drives me nuts when you are filling in a form ...