Die siberas GmbH ein auf Sicherheitsanalysen und Penetrationstests spezialisiertes Beratungsunternehmen, welches Sie herstellerunabhängig und kompetent im Bereich IT-Sicherheit berät.

  • siberas GmbH
  • Karl-Krämer-Strasse 29
    71364 Winnenden
  • info@siberas.de

Installing FX/Ruby on (Kali) Linux

As most of the common linux distribution also Kali Linux has its own ruby package. But using these pre-built packages is often a pain in the … ahm … not the best choice, especially if you need to compile your own modules. From my experiences with Ruby on linux, I recommend to use RVM (Ruby Version Manager) for installing Ruby. This little tutorial will show you how to install (FX)Ruby on Kali Linux.

I assume you’re using Kali Linux as an unprivileged user (not/never root!). If not, it’s not my problem ;) If running as root you should create an unprivileged user with the following commands:

adduser -m -s /bin/bash -G sudo "your_username"
passwd "your_username" [now enter your super-secure-password]

Now logout ‘root’ and login as your new user

Note: The following steps are meant to be executed as an unprivileged user! Otherwise RVM will install itself as a multi-user-environment which will not work for this tutorial.

Install additional packages

These packages are necessary to compile fox-toolkit, fxscintilla and opengl which are essential for fxruby.

for pkg in bash curl git patch bzip2 build-essential openssl libreadline6 libreadline6-dev git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev libxft2-dev freeglut3-dev libjpeg-turbo8-dev libjpeg8-dev libjpeg-dev zlib1g-dev libbz2-dev libpng12-dev libtiff4-dev;
sudo apt-get -y install $pkg
# ftp://ftp.fox-toolkit.org/pub/fox-1.6.47.tar.gz
# Download and compile fox-toolkit
# version 1.6.44 works
# version 1.7.x is incompatible with fxruby
# http://www.fox-toolkit.org/
wget http://ftp.fox-toolkit.org/pub/fox-1.6.47.tar.gz
tar xzvf fox-1.6.47.tar.gz
cd fox-1.6.47
sudo make install
cd ..

# Download and compile fxscintilla
wget http://download.savannah.gnu.org/releases/fxscintilla/fxscintilla-2.28.0.tar.gz
tar xzvf fxscintilla-2.28.0.tar.gz
cd fxscintilla-2.28.0
sudo make install
cd .. 

Now it’s time to lay back and get a coffee …

Install RVM

Installing RVM is very straight forward. More details can be found here.

 znow@hotdog:~$curl https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer | bash -s stable
znow@hotdog:~$source "$HOME/.rvm/scripts/rvm"

Integrate RVM Into Gnome Terminal

Before we continue with installing Ruby we should make our bash running as a login-shell. If you want to learn more about how to integrate RVM into Gnome, I recommend this article. So, first check “Run command as login shell” option under Terminal->Edit->Profile Preferences.

Gnome terminal settings

Next, we have to edit ~/.bash_profile to make it look like this:

source "$HOME/.profile"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* 

Install Ruby

In case you want to use WATOBO you should install Ruby 1.9.3. No lower version and no higher! Open a new terminal and type:

znow@hotdog:~$rvm install 1.9.3

Now it’s time to lay back and get a 2nd coffee ….

Re-check your ruby path which should point into your home directory:

znow@hotdog:~$ which ruby

Install FXRuby and more…

Now everything should be fine and you can continue installing gems you like, like fxruby, opengl, …

znow@hotdog:~$ gem install fxruby
Fetching: fxruby-1.6.26.gem (100%)
Building native extensions. This could take a while...
Successfully installed fxruby-1.6.26
1 gem installed
Installing ri documentation for fxruby-1.6.26...
Installing RDoc documentation for fxruby-1.6.26...
znow@hotdog:~$ ruby -e "require 'fox16'; puts Fox.fxversion"


ruby 2 fxruby 1