These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

Linux

 
  • Topic is locked indefinitely.
 

Launch multiple clients from a single shortcut + Ubuntu Unity launcher howto

Author
Onyx47
U-208
#1 - 2011-09-08 14:57:24 UTC  |  Edited by: Onyx47
I got sick of having multiple launchers for starting EVE in multiple virtual desktops laying around so I decided to whip up a quick and dirty script for it. The script will work on any distribution, Unity portion is only if you use Unity of course ;)

I'm also attaching the completed script, launcher and an icon for you to use to this post, refer to instructions on how to modify them for your needs or just follow the instructions step by step.

I'm gonna explain this in detail, if you already know how scripting on Linux works you can skip most of it.

PART I: SCRIPT

1. Open your favorite text editor such as gedit and copy&paste the following (or just drag&drop the launcher into it if you downloaded the one I provided):

Quote:

#!/bin/bash

eveNum=`ps aux | less | grep "ExeFile.exe" | wc -l`
wine explorer /desktop=eve$eveNum,[width]x[height] "[windows path]"


Be sure to replace width and height with your screen size (or EVE window size if you use that) and adjust the path accordingly. Default path, if you installed EVE through wine, will be C:\Program Files\CCP\EVE\eve.exe.

NOTE: regular path will do as well, just remove the quotation marks, e.g. /home/user/.wine/drive_c/Program\ Files/CCP/EVE/eve.exe

2. Save the file somewhere appropriate, for example I have a "Scripts" folder in my home directory

3. Make sure the script is executable by either right clicking the file and setting "Allow executing as a program" under permissions tab or by issuing the following command in terminal:

Quote:

chmod +x [path]


E.g. chmod +x /home/user/Scripts/eve.sh

4. Create a launcher for the script. You can usually do this by right clicking on desktop and choosing "Create launcher". I am currently running Ubuntu 11.10 beta and that option has been removed for some reason. If you are for some reason in the same situation, this is how you do it manually:

Open your text editor and copy&paste the following (or just drag&drop the launcher into it if you downloaded the one I provided):

Quote:

[Desktop Entry]
Type=Application
Terminal=false
Exec=[path to script]
Name=Eve Online
Comment=Eve Online
Icon=[path to icon]


Save the file as EVE.desktop wherever you want it and make it executable by any of two way listed previously.

5. You're done! You can now launch multiple instances of EVE from a single launcher without worrying about which virtual desktop it uses.

PART II: UNITY INTEGRATION

1. Take the launcher you just created and move it to /home/user/.local/share/applications (user being your username). Easiest way is by issuing this command in terminal:

Quote:

mv [path to launcher] ~/.local/share/applications/


2. Now navigate to the said folder with nautilus. Note that .local folder is hidden, so you'll either have to show hidden folders in nautilus by pressing ctrl+h, inputing the path by hand (in nautilus press ctrl+l to show the location bar) or by starting nautilus in proper folder like this:

Quote:

nautilus ~/.local/share/applications


3. Locate the shortcut you just moved and simply drag&drop it to Unity launcher

4. You're done! You can now run EVE by clicking the launcher and launch additional copies by middle clicking the launcher.

LINKS:

Script
Launcher
Icon

If you have any problems please let me know. Fly safe (or unsafe if you so choose) and have fun :)

In PvP there are no winners, only losers. The trick is to be less of a loser than the guy you're shooting at.

M1AU
Zappenduster Inc.
#2 - 2011-09-10 10:38:42 UTC
Thank you very much. That helped me clean up my launcher mess. Big smile
Rastuasi
Crunchy Crunchy
#3 - 2011-09-14 05:08:38 UTC
You kind sir, are genius! Now I don't have to have four different launchers nor remember which ones I already started on. Thanks again.

Rastuasi
Mr M
Sebiestor Tribe
#4 - 2011-09-14 05:41:59 UTC
Onyx47 wrote:
I
eveNum=`ps aux | less | grep "ExeFile.exe" | wc -l`


Clever

Share your experience

Write for the EVE Tribune

www.eve-tribune.com

Eklykti
Anarchy Squad
UA Fleets
#5 - 2011-09-15 01:23:30 UTC

  1. Why do you have less in your script?
  2. Try to:
    1. Open client 1
    2. Open client 2
    3. Client 1 disconnected, oops
    4. Restart client 1... double oops.
I use the following:
Quote:
wine explorer /desktop=$(date +%s),1680x1050 C:\\Program\ Files\\CCP\\EVE\\eve.exe

And if you don't launch 2 windows in exactly one second, they will be always in different desktops.
Murbella Grassa
Session9
#6 - 2011-09-16 17:17:45 UTC
Eklykti wrote:

  1. Why do you have less in your script?
  2. Try to:
    1. Open client 1
    2. Open client 2
    3. Client 1 disconnected, oops
    4. Restart client 1... double oops.
I use the following:
Quote:
wine explorer /desktop=$(date +%s),1680x1050 C:\\Program\ Files\\CCP\\EVE\\eve.exe

And if you don't launch 2 windows in exactly one second, they will be always in different desktops.



%N nanoseconds (000000000..999999999)
%s seconds since 1970-01-01 00:00:00 UTC

so date +%s%N will fix it :).
Rastuasi
Crunchy Crunchy
#7 - 2011-09-27 19:57:33 UTC
Murbella Grassa wrote:
Eklykti wrote:

  1. Why do you have less in your script?
  2. Try to:
    1. Open client 1
    2. Open client 2
    3. Client 1 disconnected, oops
    4. Restart client 1... double oops.
I use the following:
Quote:
wine explorer /desktop=$(date +%s),1680x1050 C:\\Program\ Files\\CCP\\EVE\\eve.exe

And if you don't launch 2 windows in exactly one second, they will be always in different desktops.



%N nanoseconds (000000000..999999999)
%s seconds since 1970-01-01 00:00:00 UTC

so date +%s%N will fix it :).



will have to try this, I came across the disconnect issue where it wouldn't see which one dc'd, so I recreated my old launchers in a folder just in case a dc happened. Thanks
Elegbara
White Wolf Enterprises
Harmonious Ascent
#8 - 2011-10-14 21:13:34 UTC  |  Edited by: Elegbara
Quote:
eveNum=`ps aux | less | grep "ExeFile.exe" | wc -l`
A bit too bulky.
ps ax | grep -c "ExeFile.exe"

Actually you could just use a random number instead. Who cares what are names of those desktops as long as they are different.

eveNum=$RANDOM

Open your eyes. And awaken.

Wh3don
Deep Core Mining Inc.
Caldari State
#9 - 2011-12-19 18:48:18 UTC
Hi,

I've got a real noobish problem : once ive launched twice Eve, how can i switch from a client to another ?

Because, i dont see them when i ALT-TAB. It's really annoying.

Do you have any tip for the newbie i am ?

Thanks !