Running VirtualBox in Ubuntu

, , Comments Off

To install VirtualBox in Ubuntu

$ sudo apt-get install virtualbox-ose

To run VirtualBox type

$ /usr/bin/VirtualBox

VirtualBox in Xubuntu
VirtualBox in Xubuntu

Running GUI Software from Remote Servers with Xming

, , , Comments Off

Xming provides an implementation of the X Windows System (X11 server) for Microsoft Windows.  Its useful when needing to use a GUI application on a remote server that doesn’t provide remote desktop access.

Installing Xming

Installing Xming on Windows is easy; download the binary file and follow the installation wizard.

To configure Xming run XLaunch from the Start Menu, otherwise run Xming to start up the application.

Xming Menu

When started an icon would appear on the taskbar.

Xming Icon

Configure X11 Forwarding in PuTTY

Before establishing and SSH connection go to Connection -> SSH -> X11 in the configuration window and check the “Enable X11 forwarding” box.

PuTTY X11 Forwarding

PuTTY X11 Forwarding

After SSH connection has been established any GUI application can be run by executing it from the command prompt e.g. the Thunar file manager for Xubuntu

Running Thunar in Windows with Xming

Running Thunar in Windows with Xming

More detail information can be found here.

Installing BoutDuTunnel Server on Mono XSP

, , , , Comments Off

In my previous blog I talked about setting up a HTTP tunnel using BoutDuTunnel. To setup the server-side, a command line application was used: BdtServer. BoutDuTunnel also provides a web application solution BdtWebServer which lets you host the application inside a web server. To host BdtWebServer in Ubuntu, BoutDuTunnel recommends to use Apache/mod_mono, however I decided to use an alternative approach.

Configuring BdtWebServer

Mono XSP is a lightweight and simple webserver written in C# which runs run ASP.NET applications.

To install Mono XSP run the following:

$ apt-get install mono-xsp2
$ apt-get install libmono-system-runtime2.0-cil

To ensure that XSP is properly installed you can install the ASP.NET 1.1 and 2.0 demo pages.

$ apt-get install asp.net2-examples
$ xsp2 --applications /:/usr/share/asp.net2-demos

When the server has successfully started, point your browser to http://localhost:8080 (the default port for XSP web server is 8080) to display the web page below:

ASP.NET Examples

ASP.NET Examples

If the following error is encountered:

System.InvalidOperationException: Standard output has not been redirected or process has not been started.

Run the following command to address the issue:

ln -s /usr/bin/gmcs2 /usr/bin/gmcs

Now the BdtWebServer is ready to be started:

xsp2 --port 8080 --nonstop --applications /:/opt/bdt.bin.1.4.3066.mono/BdtWebServer

--nonstop don’t stop the server by pressing enter. Must be used when the server has no controlling terminal.

Configuring BdtClient

Setting up the BdtClient to establish a connection to BdtWebServer is similar to BdtServer with the exception that the name attribute is set to BdtServer.soap in the service tag of the configuration file.

<service name="BdtServer.soap" .../>

Security Issue

When hosting the BdtWebServer application in a web server the BdtServerCfg.xml (which contains the username and passwords) will be exploit when you point the web browser http://my.server:8080/BdtServerCfg.xml.

To address this issue I setup XSP to integrate with Apache/mod_proxy by configuring the following Apache configuration to forbid access to BdtServerCfg.xml

    <Location /BdtServerCfg.xml>
        Order deny,allow
        Deny from all
    </Location>

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
    ProxyRequests off
    ProxyPass / http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/

Finally, I setup a firewall to block port 8080 from public access.

Building Mono from Source

, , 1 Comment »

Installing  Mono on Ubuntu is easy:

$ apt-get install mono-2.0-devel

Unfortunately even the latest version of Ubuntu 9.04 only comes with Mono 2.0.1.  To install a newer (or different) version a solution would be to build Mono from source.

Download the desire version from the Mono website and extract the packaged file.

$ wget http://ftp.novell.com/pub/mono/sources/mono/mono-2.4.tar.bz2
$ tar -xf mono-2.4.tar.bz2

To compile and install Mono execute the following

$ cd mono-2.4
$ configure --prefix=/opt/mono-2.4

Where --prefix option indicates which directory to installation should be; for more option run

$ configure --help

If anything is missing from the system, configure will throw an error, install the missing package with apt-get and try running it again.  Then execute the compilation and installation to complete the build.

$ make
$ make install

Compiling Error with Mono 1.9.1

If you are compiling Mono 1.9.1 the following error might be encountered:

wapi_glob.c: In function 'globextend':
wapi_glob.c:303: error: 'ARG_MAX' undeclared (first use in this function)
wapi_glob.c:303: error: (Each undeclared identifier is reported only once
wapi_glob.c:303: error: for each function it appears in.)

The problems is due to the newer versions of GLib no longer defines ARG_MAX. To fix this issue, add the following to mono/io-layer/wapi_glob.c in the Mono source directory:

#include <unistd.h>
#if defined(_SC_ARG_MAX)
# if defined(ARG_MAX)
#    undef ARG_MAX
# endif
# define ARG_MAX sysconf (_SC_ARG_MAX)
#endif
#include "wapi_glob.h"

Monitoring Fan RPM in Ubuntu

Comments Off

I have two PWM fan’s installed in my Shuttle KPC K45 being monitor with of sensor-applet in Ubuntu, which also monitors the CPU and hard drive temperature.

To begin run sensors-detect a utility which comes with lm-sensors

$ sudo apt-get install lm-sensors
$ sudo sensors-detect

Answer YES to all the YES/no questions and allow sensors-detect to modify the /etc/modules, and reboot the computer.

To check the status of all the items lm-sensors can read.

$ sensors

To monitor the fan’s RPM from sensor-applet, select it from the “Sensors” tab.

Sensors Applet

Sensors Applet

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in