Need LINUX help

Roy

Living in Brownbackistan
Joined
Oct 1, 2003
Messages
1,347
Reaction score
643
Location
Wichita
Country
llUnited States
Hi guys.
I am having issues getting VASSAL installed on my old laptop that I installed LINUX mint on.

I am a total newb / novice at LINUX and am trying to learn how to use it. I download the TAR, open VASSAL.sh but don't know what to do with it.
Any help would be appreciated. Please keep in mind that you will be talking to an old fart who hasn't a clue what he is doing with LINUX.

Thanks!
Roy
 

jrv

Forum Guru
Joined
May 25, 2005
Messages
21,998
Reaction score
6,207
Location
Teutoburger Wald
Country
llIceland
VASSAL.sh is a shell script. By default on linux (mine at least) text files are not executable, and you have to change their permissions to make them so. There are many ways to do that; this is one. In a terminal window, change directory ("cd") to the directory that contains the VASSAL.sh file. Type "chmod u+x VASSAL.sh" (without the quotes) at the terminal. This should produce no message; if it does it is probably an error. You can then type "./VASSAL.sh &" (without the quotes) at the terminal. If you have everything set up correctly that should bring up the VASSAL application window.

The "&" runs the script in the background, i.e. it does not block your terminal and you can continue to use that terminal. If you start VASSAL.sh without the "&", the terminal will wait for the script to finish (i.e. for you to exit VASSAL) before you can type more commands at that terminal.

JR
 
Reactions: Roy

Will Fleming

Senior Member
Joined
Apr 22, 2003
Messages
4,413
Reaction score
429
Location
Adrift on the Pequod
Country
llUnited States
Welcome to the wonderful world of Linux. I think you will find the experience frustrating, humiliating, and then ultimately rewarding. You are in control now and not some monster from Redmond or Silicon Valley!

Here are some dated instructions. Ubuntu is similar to your "Mint"

http://www.vassalengine.org/forum/viewtopic.php?t=1426

https://boardgamegeek.com/thread/928590/rookie-ubuntu-user-needs-help-setting-vassal


I have a kind of weird setup, but will try to help you out.

1) Do you have java installed? In a terminal (CTRL-ALT-T) what do you get when you type:

java -version

If you need to install java, google something like "Install Java on Mint" to get instructions.


2) You can probably right-click VASSAL.sh to run it in Nautilus/Thunar/Similar (Windows Explorer rough equivalent), but if you can use the terminal above to navigate to the directory with VASSAL.sh. I think that is better to go through the terminal to get error messages and such.

In the screenshot, I "change directory" to where I have VASSAL installed, with the command

cd Dropbox/VASSAL

You will have to modify this to wherever you unpacked the VASSAL files. For example, it might be:

cd Downloads/VASSAL-3.2.17

In my install location, I used 'll' (probably "ls -la" or just "ls" will work for you) to show the files. In my color scheme, VASSAL.sh is in green which basically means I can run the file using this. (the ./ is kind of linux for 'here' when you are running files from the terminal)/ You don't need to run "ls" or "ll", I just did it to show you the files located there.

Time to get it going!

./VASSAL.sh

is the command I used to 'run' the file. If your VASSAL.sh is not executable, you can make it so by doing

chmod +x VASSAL.sh

This adds the 'x' (executable flag to the file) making it so that anyone can run it. Try the ./VASSAL.sh command above again and hopefully it will come up for you.

Alternatively, you can do this to run the file.

sh VASSAL.sh


3) If this works and the VASSAL window comes up, we can take some additional steps to make it easier to start.
 

Attachments

Roy

Living in Brownbackistan
Joined
Oct 1, 2003
Messages
1,347
Reaction score
643
Location
Wichita
Country
llUnited States
OK! Thanks guys. I will give it a go and let you know how it goes.

Appreciate the help!
Roy
 

Roy

Living in Brownbackistan
Joined
Oct 1, 2003
Messages
1,347
Reaction score
643
Location
Wichita
Country
llUnited States
Welcome to the wonderful world of Linux. I think you will find the experience frustrating, humiliating, and then ultimately rewarding. You are in control now and not some monster from Redmond or Silicon Valley!
It came up! Ultimately rewarding is a good term for what just happened. ;)

Now I am ready to make the next step to easier access Will. Point me in the right direction please.

Thanks to you and JR for the help. So much appreciated.
 

BigAl737

Elder Member
Joined
Apr 5, 2011
Messages
1,513
Reaction score
1,277
Location
AK
Country
llUnited States
We should capture this in a pdf and make it available on the VASL website. Anyone willing to write the pdf?
 

Will Fleming

Senior Member
Joined
Apr 22, 2003
Messages
4,413
Reaction score
429
Location
Adrift on the Pequod
Country
llUnited States
JR is much better at PC stuff in general, so I am sure he can improve this and certainly explain it better. I bow to his skill/knowledge of course.

3) To make running things a 'bit' easier, you can let Linux know where you have files you want to be able to run. Basically this way, you can open up the terminal and just type VASSAL.sh similar to other commands in typically executable directories. For example, a lot of your executable binaries are probably in /usr/bin. A lot of the files may be symbolic links or the actual files themselves.

You probably don't want to move VASSAL.sh there as you will probably lose it on an upgrade/reinstall, but you can tell Linux that you want to run files located in a sub-directory of your 'home' folder, which is fairly easy to preserve during upgrades or by just doing a backup.

I suggest learning a text editor if you 'really' want to get down with Linux (vim or emacs), but you can use the default text editor for your distribution.

Again, open your terminal (CTRL-ALT-T) and there is probably a configuration file there that gets loaded every time you start up a new terminal. gedit is similar to notepad on your Windows. It might be something else, but finding your "Text Editor" should help.

cp .bashrc .bashrc-20180403 (do a quick backup in case of trouble)

mkdir ~/bin (this makes the directory where we will put your custom executable files. ~ is short for /home/<username> for your personal stuff)

gedit .bashrc

In there you will find a bunch of stuff, but lines that start with a # (or 'she') are comments and will be ignored. Here is the text I use to add a 'bin' folder to my PATH. $PATH is a special variable that tells Linux where to look for your executables. Mint gives you some locations by default, so you want to keep those, but add ~/bin which is where we will locate your VASSAL.sh (or similar). Add this to the beginning or after the beginning comments marked with a #

# Add ~/bin/ to the PATH
PATH=~/bin/:$PATH
export PATH

$PATH is the one that Linux gave you originally, but we add ~/bin/ to the list. The colon is important to separate the two variables/locations. This won't get loaded until you restart your terminal.

Exit your terminal and restart it to have the changes load. No need to log out, just type exit and press enter, then do a new CTRL-ALT-T to get a terminal up.

4) Go into the new directory

cd bin

gedit VASSAL (this will make the file and I just skip the .sh as I know this is a script and unlike Windows, the Linux reads the file to determine what it is instead of relying on the extension to tell it what to do)

The next part might be a bit tricky, but paste this into the new "VASSAL" file. Again, things starting with # are comments (Well, #! is a bit different, but don't worry about that first line too much). It is just a copy of VASSAL.sh that already works for you. The screenshot should help you. Don't worry about the coloring of the text inside your text editor. Mine will certainly be different.

== Copy below, but not this line ==

#!/bin/sh -ex
#
# Execute this file to launch VASSAL on MacOS or Linux
#
# Find absolute path where VASSAL is installed
#INSTALL_DIR=$(cd "$(dirname "$0")"; pwd)
INSTALL_DIR=/home/weflemi/Dropbox/VASSAL/

# Launch VASSSAL
java -Duser.dir="$INSTALL_DIR" -classpath "$INSTALL_DIR"/lib/Vengine.jar VASSAL.launch.ModuleManager "$@"

== Copy above, not this line ==

For you, you will have to change the INSTALL_DIR to where you put VASSAL. It might be /home/<username>/Downloads/VASSAL-3.2.17/

The blue line is the original. You can try removing the # to turn it from a comment into a line that will be read/executed and put a # in front of the red line so that one is not. For me, I have to tell VASSAL exactly where it is.

Again, make this file executable

chmod +x ~/bin/VASSAL

If the install location figures itself out (blue) or if you tell it exactly where VASSAL is (red) and it works, you should be able to type this in a terminal anywhere now (no need for using the ./VASSAL.sh or similar)

VASSAL

That is basically where I have things right now. I have had it so that a desktop icon would start VASSAL when you double clicked it, but the way that works seems to change a lot and gets lost on upgrades. There are some extensions that allow you to just hit a key ` (the upper left key on most keyboards) and a drop-down terminal will open for you. Type VASSAL there and hit ` again to hide the drop down terminal.

Basically, I type ` VASSAL ` to start it up. You can be lazier and use tab-complete to get it going with ` VA<tab> `

If you don't have the extension for the drop-down terminal, you can do CTRL-ALT-T -> VASSAL and get there just fine.

The tab complete will have Linux look through all your executable directories (and we added ~/bin/ for ours) and try to figure it out for you or to give you suggestions if it finds multiple options. Type fire<tab> and it will complete with 'firefox' for example. If there is more than one option, you may need to type a few more keys to limit the options Linux has to choose from. Maybe you need to do VASS<tab>. Tab complete can help you a lot more than that too as Linux does a good job of trying to figure out what you want, but look that up as you desire.

I hope that helps. I might try to figure out how to make a desktop icon for it again, but probably am too lazy. 5 keystokes and no mouse clicks is fast enough for me to get VASSAL started up.

Future topic:
If you want to continue down the rabbit hole and take Morpheus's "blue pill", we can setup some symbolic links to make the upgrades a bit easier. There really are not many updates these days, so I don't think that is critical however.

Future topic 2:
Also, if you dual boot or use two PC's, you can put the files inside of Dropbox or a similar service and when I update an extension or add boards, logfiles or whatever, it gets synched across all my PC's for me.

As you learn more about the power and freedom that Linux gives you, please share with others. :)

Edit: here is a video that kind of explains .bashrc and talks about changing your $PATH variable.

 

Attachments

Last edited:

hongkongwargamer

Forum Guru
Joined
Apr 4, 2013
Messages
7,196
Reaction score
5,582
Location
Lantern Waste
Country
llUnited Kingdom
Hmm.. this reminds me. I have a tiny little Samsung laptop where I have Ubuntu installed for the heck of it. If its battery still works I might have a little VASL machine to carry around ...
 

Will Fleming

Senior Member
Joined
Apr 22, 2003
Messages
4,413
Reaction score
429
Location
Adrift on the Pequod
Country
llUnited States
Everyone should choose what they like and feel comfortable with, but for me, Linux is the way to go.

I dual boot for Steam. As I am poor, I never tried a Mac, but think I can understand why people love theirs.

Warning of course: Like a hot mistress from Asia, Linux will break your heart if you treat it wrong. With power comes responsibility. Backup important files often until you are comfortable and then just keep doing it out of (good) habit!
 
Last edited:

c600g

Member
Joined
May 11, 2016
Messages
143
Reaction score
96
Location
Oceanside, CA
Country
llUnited States
@Will Fleming Steam works pretty well on Linux, too. Though not every game, of course. ;>

We're getting there! I started on Linux using Slackware, downloading the floppy images in '93, I think? It's come a long way, baby!

Alan
 

Sparafucil3

Forum Guru
Joined
Oct 7, 2004
Messages
11,357
Reaction score
5,111
Location
USA
First name
Jim
Country
llUnited States
@Will Fleming Steam works pretty well on Linux, too. Though not every game, of course. ;>

We're getting there! I started on Linux using Slackware, downloading the floppy images in '93, I think? It's come a long way, baby!

Alan
I can't recall if it was Slack or Yggdrasil. I recall it was like 40 floppies and version 0.8.x. There was no X installed, that was another download via dialup. Ubuntu these days for hobby stuff. Still use windows on my main PC though. Just too easy not to. -- jim
 

jrv

Forum Guru
Joined
May 25, 2005
Messages
21,998
Reaction score
6,207
Location
Teutoburger Wald
Country
llIceland
I have my vasl module and my VASSAL executable in two subdirectories of a common directory, i.e. they are siblings. I have a separate VASSAL directory for each version, "VASSAL-3.2.17", etc. I have all the versions of the vasl module in one directory, and beneath that is the boards & extensions directories.

It is perhaps not obvious but VASSAL.sh will take parameters. In particular it will take the path of the module to start. In my VASSAL directory (the one with VASSAL.sh) I create a file called "vasl.sh", which has the following contents:

vasl.sh said:
#!/bin/sh

#
# Execute this file to launch VASSAL on MacOS or Linux
#

# Find where VASSAL is installed, dereferencing symlinks
INSTALL_DIR=$(dirname "$(readlink "$0" || echo "$0")")

cd "$INSTALL_DIR"

# ./VASSAL.sh ../vasl/vasl-6.3.0.vmod
# ./VASSAL.sh ../vasl/vasl-6.2.2.vmod
#./VASSAL.sh ../vasl/vasl-6.3.0-20151118.vmod

# ./VASSAL.sh ../vasl/vasl-6.3.1.vmod
#./VASSAL.sh ../vasl/vasl-6.3.3.vmod
# ./VASSAL.sh ../vasl/vasl-6.4.0.vmod
# ./VASSAL.sh ../vasl/vasl-6.4.1.vmod
./VASSAL.sh ../vasl/vasl-6.4.2.vmod
You can see I have old module versions commented out. In case I ever need to go back to one. I make this script executable too, "chmod u+x vasl.sh".

When I run vasl.sh (instead of VASSAL.sh), it immediately starts VASSAL with the most recent vasl version that I have in my script, i.e. right into the wizard. This is more convenient for me than opening the module in the VASSAL window. I don't run VASSAL on anything but asl, but if you use other modules you could create separate scripts for them.

I am using the xfce desktop, so unlike some other desktop environments (e.g. recent gnomes), I have a root window menu. I added a vasl menu item to it so I don't have to bring up a command line to run vasl. The instructions would be particular to xfce, so if anyone uses xfce I will give the details. It seems likely that you probably don't have a root window menu (there was a trend in that direction, which I bucked by installing xfce) so I will not give the details unless someone asks. Instead you need to find how to add applications to your desktop environment of choice. I expect most will involve adding a new .desktop entry to ~/.local/share/applications, but I don't know. I run gnome, and I run vasl.sh, but I don't run them both at the same time.

JR
 

jrv

Forum Guru
Joined
May 25, 2005
Messages
21,998
Reaction score
6,207
Location
Teutoburger Wald
Country
llIceland
There is a program called "alacarte" (installed through whatever your standard mechanism for installing programs is; on ubuntu I use apt, apt-get and/or synaptic--mostly synaptic) that will add items to the list of available ones for gnome (to what is called the "dash"). From what I read mint has a menu, and alacarte will also add items to that menu. alacarte ends up adding a .desktop file to ~/.local/share/applications. You can also do that by hand (but I would use alacarte).

If you add vasl.sh (or VASSAL.sh) to your menu or to the dash, you don't need to add it to your PATH unless you like to/need to start vasl from the command line.

JR
 

Will Fleming

Senior Member
Joined
Apr 22, 2003
Messages
4,413
Reaction score
429
Location
Adrift on the Pequod
Country
llUnited States
I probably wasn't kind enough to JR before. :) Thanks for the good information and help sorting this out for others (and some for me too).
 

Will Fleming

Senior Member
Joined
Apr 22, 2003
Messages
4,413
Reaction score
429
Location
Adrift on the Pequod
Country
llUnited States
@Will Fleming Steam works pretty well on Linux, too. Though not every game, of course. ;>

We're getting there! I started on Linux using Slackware, downloading the floppy images in '93, I think? It's come a long way, baby!

Alan
Correct, and for some games, they tend to run better, but for the vast majority, they either

1) Will not run on linux
2) Performance dropoff
3) Graphics options are limited
4) Buggy and generally have poorer support

All IMHO of course. I haven't been able to get into PC gaming for a few years now, but when I do, it is mostly on Windows. Paradox (Crusader Kings, Hearts of Iron) seem to have good Linux support however if any here like those.
 

Roy

Living in Brownbackistan
Joined
Oct 1, 2003
Messages
1,347
Reaction score
643
Location
Wichita
Country
llUnited States
Once again, thanks to all for the help. Honestly, I figured I would get JR to help, I've seen him comment on Linux here before. Will was a bonus. Both have been indispensable. I have been toying with getting VASSAL to come up on my laptop for a while now and always quit in frustration. With a little help, it was easy.

Roy
 

c600g

Member
Joined
May 11, 2016
Messages
143
Reaction score
96
Location
Oceanside, CA
Country
llUnited States
I haven't been able to get into PC gaming for a few years now...
Frankly, Will - either have I. My kids now rule the steam account, and I've limited myself to Rocksmith on the Xbox One when I have a free moment or two at home. ;>

Alan
 
Top