Marionnet: X configuration in Knoppix

In a previous post, I showed how to install the Marionnet open-source network simulator on a Debian Linux system. Recently, I installed Marionnet on a Knoppix system so I can run it on any computer from a USB thumb drive.

Knoppix is based on Debian but, by default, it uses the LXDE desktop environment instead of the Gnome desktop environment. When installing Marionnet on a system running Knoppix Linux, follow the procedures listed in the Debian install post. Then, when you need to enable the X-server to connect to X-clients to the host’s X server using TCP, use the procedure described in this post.

Why change the X Server configuration?

As a security measure, most Linux systems are configured to prevent an X client from using TCP to communicate with the X server. It is more secure for a remote X-client to connect to a local X-server by tunneling through an SSH connection, which requires user authentication and is encrypted.

But, the Marionnet open-source network simulator uses TCP instead of SSH to communicate between the X server on the host Linux system and the X client on each virtual machine in the Marionnet network simulation. Even though it creates a security risk, we must enable the X-server to connect to X-clients over TCP if we wish to use X applications running in the Marionnet network virtual machines.

A general procedure to find the X configuration

To quickly find the X configuration, search for the text “nolisten tcp” in all the files in the /etc/ directory. This should work for most systems based on Debian. Find the file that contains the text:

$ su
# grep -r 'nolisten tcp' /etc/
# exit

Then, remove the text “nolisten tcp”, from the line in which it occurs in the file.

Note: When searching for the text, I used the su command to switch to the root user because using sudo to run the grep command made the output harder to read. If you switch to root user before running the command, the text highlighting in the command output will help you find the text faster.

Configure X in Knoppix LXDE to work with Marionnet

To configure X to listen to TCP in Knoppix, do the following:

  1. Edit the /etc/init.d/knoppix-startx file:

    $ sudo gedit /etc/init.d/knoppix-startx
    
  2. In the text editor, find the text “nolisten tcp” and remove that text from the file.

    In this case, the text occurred at line #126. I removed the text “nolisten tcp” from the line and the new line looks like:

    su -l -c "export STARTUP=$STARTUP ; exec /usr/bin/startx -- vt5 -dpi "$DPI" -br -noreset" "$USER" /dev/tty5 2>&1 ; RC="$?"
    
  3. Save the file and quit gedit.
  4. Log out and log back in to restart X.
Scroll to Top