First off, thanks to Tillmen and the community for all the hard work with Lich. Without it, I wouldnt still be playing this game.
--------------------------------------------------------------------------------------------------------
I struggled recently with getting the right versions of ruby, sqlite and gtk installed on a remote ubuntu server based on the current guides out there. In the process of figuring it out, I compiled a clean set of repeatable actions that I figured I would share here in case anyone finds value in it.
By following this guide, you will a have a FREE remotely-accessible VM instance utilizing Profanity as the frontend that includes GTK window support.
Step 1: Create a free-tier VM instance on Google Cloud Platform
- Head over to Google Cloud Platform @ https://cloud.google.com and sign up for an account
- Browse to Compute Engine -> VM Instances and select to Create Instance
- Configure the instance in the following way:
Step1.jpg
A. Name the instance whatever you want. I've created unique instances for each character so I name each one the character name.
B. Under Machine type, change to "micro (1 shared vCPU)"
C. Under Machine type, select Customize and change the memory to 1.7 GB (this is only to support installing gtk2 and will later need to be changed back in order to stay free)
D. Under Boot disk, change the image to "Ubuntu 16.04 LTS" and update the Standard persistent disk size to 30GB (just because you can)
E. Click "Create"
Step 2: Setup your server
- From your list of VM instances, select SSH to connect.
- Note both the external IP address of the VM instance in the list and your username after you SSH in. You will need this information later.
- Copy/paste each line below.
Step 3: Download MobaXterm and create SSH keysCode:sudo apt-get update sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev libsqlite3-dev unzip git clone https://github.com/rbenv/rbenv.git ~/.rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc echo 'eval "$(rbenv init -)"' >> ~/.bashrc source ~/.bashrc git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build rbenv install 2.2.5 -v rbenv global 2.2.5 echo "gem: --no-document" > ~/.gemrc gem install sqlite3 gtk2 curses wget https://lichproject.org/download/lich-4.6.44.zip unzip lich-4.6.44.zip git clone https://github.com/matt-lowe/ProfanityFE.git
- Download and install the free Home Edition of MobaXterm from https://mobaxterm.mobatek.net/download.html
- Run MobaXterm. Under Tools, select "MobaKeyGen"
- Ensure RSA is selected
- Click "Generate"
- Move the mouse until the key is created
- Save both the public and private keys in a place that you will remember. I name my private key private_key.ppk and public key as public_key without an extension.
Step 4: Add SSH key to VM Instance and update memory
- From the VM list in GCP, click on the VM name
- At the top of the page, first select "STOP" and then "EDIT" after it is shutdown (it will take little bit)
- On the edit page, click "Customize" under Machine Type
- Update the memory setting back to 0.6 GB
- Scroll down to SSH Keys and expand section by clicking "Show and edit"
- Open your public key on your local computer with notepad
- Copy only the characters for the key (not including the ---- and Comment) and paste them into the key data box
- In the key data box on GCP, add the word "rsa" before the key. After the key add your username that you noted previously. The key should be one long string; ensure that there are no carriage returns from pasting. Your entered key should look like this:
step4b.png
- Click "Save"
- Click "START" at the top of the page to restart the VM
Step 5: Setup MobaXterm session
- In MobaXterm, select the icon to "Start a new remote session" from the top toolbar
- Select SSH
step5a.jpg
A. Enter the Remote host as the external IP address you noted previously
B. Check the box for Specify username and enter your username you noted previously
C. Select Advanced SSH settings
D. Ensure X11-Forwarding is checked
E. Check the box for Use private key and select the private key you saved previously
step5b.jpg
F. Select Terminal settings
G. Change the Terminal type to “xterm-256color”
H. Optionally, under Bookmark settings, you can customize the session name for later reference
I. Click “OK”
Step 6: Set up Lich and connect
- After clicking OK, or later via the saved sessions list, you should be connected to your VM Instance via MobaXterm
- Run lich by entering the command
step6.jpgCode:ruby ~/lich/lich.rbw
A. Enter your username and password
B. Select the character entry next to "Gemstone IV"
C. Check "Save this info for quick game entry"
D. Click "Play"
- You will receive an error stating “failed to find the Simutronics launcher” but your login information has been saved.
- Now you can login with the following command
Code:ruby ~/lich/lich.rbw --login <character> --without-frontend --detachable-client=8000 2> /dev/null &- And start profanity with this command (keep trying if you get an error, sometimes lich takes a bit to get setup)
Code:ruby ~/ProfanityFE/profanity.rb --custom-colors=off --port=8000
Some Notes
- I use separate VMs for each character as the free 0.6 GB memory doesn’t seem to handle MA’ing. You may be able to upgrade and stay within the annual $300 credit, but I haven’t tracked this.
- MobaXterm also has a built-in SFTP client to easily move your scripts around.
- I’m not an expert with linux but I can try to assist if there are any questions.