Traipse OpenRPG – How To Install It!!!

I’m not sure if you’ve heard of OpenRPG, or anything like that, I only heard of it through the passing of a person in the elevator, or on a forum, but it was a long time ago. The program always seemed hard to install, and anyone I talked to seemed daunted by installing it. One of my friends who wants to play a Role Playing Game with me, but they are quite a ways away, a couple states to be exact. He suggested this, but he didn’t know how to get it working. So I sat there and figured it out, and I realized, I was using a weird package, and not doing it right. So here, I will explain how I did it. Then maybe later, I’ll explain how to create a character.

Here are the steps to install, and get Traipse OpenRPG setup and running. At the time of this writing, Traipse OpenRPG is Ornery Orc.

  1. Download the required packages and software.
    1. You’ll want to make sure you download the Traipse OpenRPG package from the link HERE
    2. On that page you’ll also want to download the EXACT Python version they have listed. If you don’t the program will not work, and give you some errors. I also don’t think that the version listed is even available on the Python website.
    3. Then you’ll want to download the wxPython plugin package. I don’t believe you have to compile any of the Python packages into bytecode, but I don’t see any harm in it.
    4. OpenRPG downloads
  2. Install the packages
    1. To install the Python packages, just double click on them, and click next. I recommend, however, that when you install your Python, you create a directory called python, under the C drive, and then make a folder with the version name. That way, there are no spaces in the directory path, and you can keep all the different versions of Python under one roof. So, the directory structure would look like this: C:\python\Python26\
    2. To “install” OpenRPG, unzip the Traipse.zip package to where ever you want it. Then open a command prompt or your terminal of choice, and navigate to the directory where you unzipped the package. Inside, issue the command,  ‘ python setup.py ‘, without the single quotes. If that doesn’t work, then you’ll have to use the full path, ‘ C:\python\Python26\python setup.py ‘.
    3. This might take a bit depending on your system’s internals. For me, it took about a minute for the program to update itself.
    4. OpenRPG setup
  3. Run the Traipse OpenRPG program
    1. Once the program has been setup, and installed, you will run it almost the same way. With that same command prompt or terminal session of choice, issue the command ‘ python Traipse.pyw ‘.
    2. OpenRPG Traipse Startup
    3. This will start the program, try to look for further updates, and then start the actual program.
    4. OpenRPG Updater
    5. When all of this is complete, you will be presented with a green checkered board, and a couple samples on the left hand side.
    6. OpenRPG Window

The next post I will do will explain how to create a character and set up your own “Character Sheet” with what is given to you. I hope this post helps anyone looking to install and setup OpenRPG looking to give it a shot. So far it seems like an awesome platform. The Traipse Website for this again is this: http://www.knowledgearcana.com/traipse-openrpg

mRemoteNG – One Stop Shop on Windows

For a while I have been using mRemoteNG purely as a SSH and Remote Desktop , but I was using Command Prompt, MinGW, and Cygwin as all outside programs. I wanted to integrate them in with mRemoteNG so I’d have just one window, and multiple tabs for my terminal programs. I’ll run through what I did to prepare and then set up the terminals in mRemoteNG.

Preperation:

  1. Choose your terminal: MinGW, Cygwin, GitBash, PowerShell, Command Prompt
    1. If using command prompt, you’ll have to also set it up in Console2. I haven’t had much luck with ConEmu.
    2. Make sure you download and install the latest versions, as they will come with the required software.
  2. Then determine if mintty is installed for your desired terminal, except Command Prompt and PowerShell as stated above.
  3. Download and install the latest version of mRemoteNG from the mRemoteNG website.

Setup

  1. Open the External Tools in mRemoteNG
  2. Add a new External Tool
  3. Locate the location of the mintty or Console2 program in relation to your desired terminal.
  4. Add your arguments
    1. For mine, I always start /bin/bash –login -i so I don’t get the standard /bin/sh
  5. Open the Connections panel
  6. Create a new connection and label it your desired terminal
  7. In the protocol row, change the protocol from RDP to Ext. App
  8. Choose your External Tool, and save it.

Now you should be able to double click on the connection and open a terminal inside of your mRemoteNG session. I also changed a few other options to put it under its own tab called Consoles. After making changes in the External Tools panel, however, you’ll have to restart mRemoteNG because for some reason it’ll either freeze, or crash for me.

mRemoteNG is written in VB.net and is available on GitHub to contribute content, or look at the code. There are a few shoot offs, one being in C#. The developer is sticking with VB.net though.

mRemoteNG Forum

mRemoteNG GitHub

FreeHA – A Simple C HA Daemon

I was on the hunt for a very simple HA daemon, and stumbled across this. It seems to be working just fine, but I’m not sure if I’m doing it correctly. I’m brushing up on my C++ in order to read the code, and understand how its working so I can better refine my service scripts, and start/stop/monitor the services to be HA’ed. Visit the website for FreeHA: http://www.bolthole.com/freeha/.There is a lot of good documentation there, and I wanted to share my steps as well. The developer has put the code on the WWW GitHub for public view, and possible additions. Check it out at: https://github.com/bolthole/freeha

  1. =>Download the software freeha-1.0.tar.gz:
    1. $ wget http://www.bolthole.com/freeha/freeha-1.0.tar.gz
  2. =>Extract the Source files:
    1. $ tar -xvf freeha-1.0.tar.gz
  3. =>Decide on network interface configurations
    1. I used virtual interfaces and assigned 2 per NIC, and made the subnets 255.255.255.252 and the IP’s set to 192.168.x.x within those subnets. Since the FreeHA daemon says it requires two additional network interfaces and they cannot be on the same network, I went that route.
  4. =>Edit the Makefile for your specific OS flavor. I had to comment out the Solaris LDFLAGS and uncomment the Linux flags.
    1. Save the file, and return to the project directory. Make and Install the program
    2. $ make; make install
    3. This moves all the files into /opt/freeha/bin/ and /opt/freeha/bin/service_scripts
  5. =>Edit the startdemon to include correct IP’s
    1. ==>See startdemon – which is the example init script, to be placed in ‘/etc/init.d/’ on RHEL/CentOS systems.
      1. I edited the startdemon file to include the virtual NIC’s IP addresses and their small /30 network. The startdemon file is a basic “init” script, so one could use the same startdemon file and modify it, or write their own, and start it up how they want, and kill it how they want.
      2. Write the init script to start the freehad program from /opt/freeha/bin/ with the options to include the network addresses. This is typically only used for 2 nodes in a cluster, but if three or more are going to be used, there are certain switches that are required. For now, we’re only using two nodes, so we have two private interfaces for the nodes to communicate. Include those into your init script, or just rename the startdemon script to your init script.
      3. Once the daemon starts, the init script should not include the starthasrv script, it will listen on the specified interfaces and once it connects with another freeha daemon, those two daemons will negotiate who is the master, and then the master will start up the services using the starthasrv script.
  6. =>Edit the starthasrv to include the startup scripts
    1. ==>See starthasrv
    2. Write the starthasrv to simply call the *.start scripts from /opt/freeha/bin/service_scripts/. The developer says that the .start/stop/monitor scripts should be written to take in input. I suppose this is to help to cut down on editing multiple files and just edit the start/stopmonitorhasrv scripts. When editing the starthasrv script, be sure to have it call the .start, then check to make sure that script executed cleanly, looking for a 0, if not, fail, and print an error stating what failed.
  7. =>Edit the stophasrv to include stop scripts
    1. ==>See stophasrv
    2. stophasrv does just what it says too, it stops the services to be HA’ed. I did it in reverse order from the starthasrv basically. It’ll close the network interface, then it’ll kill the zabbix_server processes.
  8. =>Edit the monitorhasrv to include monitor scripts
    1. ==>See monitorhasrv
    2. The monitorhasrv script should check to make sure the processes are working on the local system. If they are not working, then it should send an alerthasrv message and fail over. If the monitor has failed, FreeHAd should call stophasrv and kill all the services listed, and then the slave node should pick up the responsibility.
  9. =>Create Startup scripts for desired processes
    1. ==>See zabbix-server.start
      1. ===>zabbix-server.start simply brings up the zabbix-server daemon itself. In the spirit of the program, a commandline argument is passed to this, so I just included the init script, /etc/init.d/zabbix-server, and inside the script I just did ‘$1 start’.
    2. ==>See vip.start
      1. ===>vip.start simply brings up the virtual interface, then assigns the VIP to the interface.
  10. Monitor your FreeHAd
    1. =>See monitorFreeHAd
      1. For the FreeHAd status of the nodes in the cluster, use the command suggested from the website, ‘while true ; do clear ; date; cat /var/run/freehad ; sleep 1 ; done’
    2. =>See monitorSyslog
      1. On CentOS 6.4, there is no real syslog anymore, those logs are directed to /var/log/messages. Just use a ‘tail -n10 -f /var/log/messages’.

To run all of this, I might need to add in a ‘nohup’ into my init script so that the user doesn’t have to stay logged in all the time. I also used ‘screen’ to run all of this at the same time so I could quickly see everything that was going on.

Mount remote Linux Directories in Linux: SSHFS

SSHFS
  1. SSHFS Setup
  • Be sure to download the correct version of fuse-sshfs for your RHEL
    1. $ yum install fuse
    2. $ yum isntall fuse-devel
    3. $ rpm -ivh fuse-sshfs-2.2-1.el5.rf.x86_64.rpm
  1. Mount the remote partition
    1. $ sshfs <user>@<remoteServer>:/path/to/directory/ /path/to/local/directory

Resources:

X11 Forwarding

X11 Forwarding

  1. Global settings
    1. On the remote server, configure these settings in /etc/ssh/sshd_config:
      1. AllowTcpForwarding yes
      2. X11Forwarding yes
      3. X11DisplayOffset 10
      4. X11UseLocalhost
  2. Download the xauth on Remote Server
    1. If RHEL, CentOS, or Fedora, Download xorg-x11-xauth
      1. $ yum install -y xorg-x11-xauth
    2. ArchLinux
      1. $ pacman -S xorg-xauth
  3. Setup your local machine
    1. Windows
      1. **NOTE**
        1. Either use Xming with PuTTY, or Cygwin. Cygwin can work with Xming, but Cygwin has its own X11 Server.
      2. Xming
        1. Install Xming
        2. Run Xming
      3. Cygwin
        1. Install Cygwin, and the X11 packages through the installation program.
        2. Create your ~/.ssh
          1. $ mkdir ~/.ssh
          2. $ touch ~/.ssh/config
        3. Edit the .ssh/config with your text editor
          1. ForwardAgent yes
          2. ForwardX11 yes
        4. Edit the ~/.bash_profile
          1. Add the following line:
            1. export DISPLAY=:0.0  #=>(Those are zeros)
      4. **NOTE**
        1. The big difference between Xming, and what Cygwin is, Xming has not been updated since 2007, and the Cygwin X11 Server has been updated recently since this posting.
      5. Using PuTTY Connect
        1. Download the most recent version of PuTTY
        2. Configure settings as desired. Then open the Connection Menu
        3. Open SSH Menu.
        4. Click on X11, and enable “Enable X11 Forwarding”
        5. The X Display Location should be set to “localhost:0”. Don’t include the quotes
        6. Click Tunnels Menu, and enable:
          1. Local ports accept connections from other hosts
          2. Remote ports do the same (SSH-2 Only)
      6. **NOTE**
        1. Be sure to have your X11 server (Xming, or Cygwin Xserver) running on your local machine before using putty.
      7. Using Cygwin to connect
        1. Open a Cygwin terminal, type ‘startxwin’ without the quotes
          1. Otherwise, go to the Start Menu, and click on Cygwin-X then XWin Server then use the xTerm
        2. Now ssh into the desired remote server
      8. $ ssh -Y user@remoteserver
  4. Execute your program
    1. Once on your remote server, execute your desired GUI application
      1. xclock &
    2. Ta-da, you’re now X11 Forwarding.

Boot Multiple ISO from USB via Grub2 using USB

Boot Multiple ISO from USB via Grub2 using Linux

Boot ISO Files directly from USB using Grub2 from Linux. Here is one way to create a Multiboot USB Flash Drive from a running Ubuntu (I used the Live CD). You may eventually need a large Flash Drive or USB Hard Drive in order to include every bootable ISO entry. I will add more Bootable ISO files to the grub.cfg file as I find time to test them. Contact me to submit working Bootable Linux ISO grub.cfg entries for inclusion.

I. Format your USB Flash Drive to use a Single Partition:

  1. Open a terminal and type sudo su
  2. Type fdisk -l (and note which device is your USB Drive)
  3. Type fdisk /dev/sdx (replacing x with your actual usb device)
  4. Type d (to delete the existing partition)
  5. Type n (to create a new partition)
  6. Type p (for primary partition)
  7. Type 1 (to create the first partition)
  8. Press Enter (to use the first cylinder)
  9. Press Enter again (to use the default value as the last cylinder)
  10. Type a (for active)
  11. Type 1 (to mark the first partition active “bootable”)
  12. Type w (to write the changes and close fdisk)

II. Create a Fat32 Filesystem on the USB Flash Drive:

  1. Type umount /dev/sdx1 (to unmount the mounted partition)
  2. Type mkfs.vfat -F 32 -n MULTIBOOT /dev/sdx1 (to format the partition as fat32)

III. Install Grub2 on the USB Flash Drive:

  1. Type mkdir /media/MULTIBOOT (to create a directory for the mountpoint)
  2. Type mount /dev/sdx1 /media/MULTIBOOT (to mount the USB)
  3. Type grub-install --force --no-floppy --root-directory=/media/MULTIBOOT /dev/sdx (to install Grub2)
  4. Type cd /media/MULTIBOOT/boot/grub (to change directory)
  5. Type wget pendrivelinux.com/downloads/multibootlinux/grub.cfg (to get the grub.cfg file)

IV. Test to make sure your USB Device Boots into Grub2:

Reboot your Computer, and enter your BIOS or Boot Menu. Set the Boot Order to boot from the USB Device. Save your changes and Reboot. If all goes well, you should be presented with a Grub2 Boot Menu.

Resources:

PenDrive Linux – MultiBoot with Grub2 on USB