Git Product home page Git Product logo

gw2-linux-multibox-launcher's Introduction

Guild Wars 2 Linux Multibox Launcher Script

Gw2Launcher is a fantastic tool for windows, and the author is thankfully responsive to Linux issues, but the tool relies on a poorly documented Windows feature to kill the GW2 mutex which does not always consistently work through wine. See Healix/Gw2Launcher#249 (comment) for the comment which inspired me to build this.

Because each WINEPREFIX has a separate windows-like environment, the mutex is not shared between WINEPREFIXs, allowing simultaneous instances of the game from distinct WINEPREFIXs. However, the Gw2.dat file is 66 G and counting, making storing multiple instances challenging.

This script uses fuse-overlayfs, setsid, and xdotool to dynamically create WINEPREFIXs with minimal overhead, run the game, and detect launches (allowing sequential launch to avoid X11 CPU overuse trying to draw overlapping odd geometry partially transparent windows).

It requires you to already be able to run GW2 from the command line (if you have a working install via Lutris, you can use something like lutris guild-wars-2 --output-script gw2.sh).

It works great on the two machines I use (both Arch Linux, one installed w/Lutris and one w/o), but will need broader testing to verify it works for others; consider this an alpha release. The command line options may change.

Support

Please let me know if you find any bugs - especially if you also have generalizable fixes. I may not have time to add features, and want to keep the script relatively simple - if you have a great idea, feel free to let me know about it, implement it, and/or fork the codebase as necessary.

If you'd like help running this, or are having trouble installing GW2 on your Linux distribution I'd be interested in helping. Contact me via email or Discord (iiridayn, [email protected]) if you've exhausted other support avenues and are willing to wait around for me to be available to help. Follow the principle of don't ask to ask.

Usage examples

If you don't want a bunch of fuser mounts in your system between runs:

gw2-alt.sh -c 01 02 03 # create mounts and run
gw2-alt.sh -x 01 02 03 # close each
gw2-alt.sh -d 01 02 03 # remove mounts

When the game releases updates, first run:

gw2-alt.sh -cu 01 02 03 # create mounts and update
gw2-alt.sh 01 02 03 # run, given mounts exist already

To change saved username/password or settings in one account at a time:

gw2-alt.sh -o 01 # change options/configure

Initial setup

  1. Install GW2 normally and ensure it runs.
  2. Create a launch script, and ensure it runs GW2 from the command line
  3. Backup your GFXSettings.GW2-64.exe.xml (in <gw2 WINEPREFIX>/drive_c/users/$USER/AppData/Roaming/Guild Wars 2/), run the game and set graphics to values you'd like to run multiple clients with (all minimums likely), then stash the modified GFXSettings.GW2-64.exe.xml and restore your nice one for regular use.
  4. Run the script
  5. Choose a base location for the script to use to run and store data, create $XDG_CONFIG_HOME/gw2alts, and update $XDG_CONFIG_HOME/gw2alts/config.sh as directed.
  6. Run again
  7. Copy your GFXSettings.GW2-64.exe.xml to the conf folder of the directory you chose for the script to use.

Once you're set up, you can create new Local.dats for each account with gw2-alt.sh -co "<name>", then enter username, password, save them (unless you like retyping them each time you launch), launch the game and change settings however you'd like (you can't change them during normal launches, only when launching with -o, which launches the game in exclusive mode), then exit. This should set things up so that in the future you can set up and launch multiple accounts with just gw2-alt.sh "<name>" "<name 2>", etc as normal. Quotes are only needed if you want a space in the account name, which I've not tested yet but should probably work.

Troubleshooting

  • Arbitrary clients crash occasionally: relaunch that account. The game does that, which is why the name is in the window title, to make it easier to spot which account crashed.
  • The login screen won't load, some red text about downloading (I think?): update each account by running gw2-alt.sh -u "<name>" "<name 2>" etc, then try launching normally. If one crashes during the update, re-run the update for that one.
  • My computer is too slow: reduce graphics settings (and update the stashed GFXSettings.GW2-64.exe.xml), buy more RAM (I think each account requires around 4 G of free RAM), get a CPU with more cores, etc. RAM is often a key bottleneck here.
  • Something else: check the log file for the account; they often have useful information to diagnose and fix issues.

License

This script is licensed under the terms of the WTFPL version 2.

If you submit any pull requests, you agree to license them under the same, to avoid potential legal headaches I'd rather not deal with.

gw2-linux-multibox-launcher's People

Contributors

iiridayn avatar

Stargazers

 avatar seres avatar  avatar

Watchers

 avatar  avatar

Forkers

lorschy

gw2-linux-multibox-launcher's Issues

$GW2_ALT_BASE/conf/GFXSettings.GW2-64.exe.xml file naming + a couple of other issues

I'm going through the script and I had few issues I figured I'd share. First was this one - which was especially frustrating because the solution was literally staring me in the face the entire time.

line 53:

if [ ! -d "$GW2_ALT_BASE/conf" ] || [ ! -f "$GW2_ALT_BASE/conf/GFXSettings.GW2-64.exe.xml" ]; then

it took me an embarrassingly long time to realize that my GFX file was actually named

GFXSettings.Gw2-64.exe.xml

I didn't rename my file - I just copied it straight over to the .config directory, so that name is the default for my installation (lutris built on a windows install) - so I'm not sure if that's a typo on your end or just a legit difference in the potential filenames - but it might be worth mentioning if there are different filename variants.

The next issue is related (I hope!) to first launches. I have 5 accounts, and I started with

./gw2-alt.sh -c 01 

let it start up, then I would do the next -

./gw2-alt.sh -c 01 02

and so on until 05. However, every time I would launch a new one for the first time, it would hang on the GW2 launcher screen - just before iyou get to the login, there's a 'downloading' and then a 'initializing' - it hung on 'initializing'. The only time I had the patience to let it sit for a while, it eventually provided the following error:

 XGetWindowProperty failed!

The final issue is that the login screen isn't remembering the usernames and passwords - I'm hoping there's an easy fix for that - it's not the end of the world, but it's a littke tedious

I'm running arch btw, i3wm; AMD graphics card, not sure if that matters.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.