Manual server installation on linux
Preparing the package
- Download A.V.A.T.A.R server zip file from GitHub.
- Click on the
button and
Download zip
.
- Click on the
- Extract the
A.V.A.T.A.R-Server-master.zip
file using "Extract or Extract here" selection.. - In your home directory, create a packager/server directory which will be used to package the application.
-
Copy the contents of ~/downloads/A.V.A.T.A.R-Server-master/dist to ~/packager/server.
: cd ~/downloads/A.V.A.T.A.R-Server-master/dist : cp - r * ~/packager/server
Installing the packager module
-
Change to the packager/server directory:
cd ~/packager/server
-
Enter the following command to install the packager and all application modules:
~/packager/server$ npm install --save-dev @electron/packager
About deprecated modules
You can ignore messages about deprecated modules.
These messages are not important and the installation can continue. -
After a few moments, you should see the following result:
added <xxx> packages, and audited <xxx> packages in 15s <xx> packages are looking for funding run `npm fund` for details found 0 vulnerabilities
About vulnerabilities
The application is updated regularly, but it is possible that you may discover vulnerabilities.
If this is the case, installation is unaffected and can continue.
You can also contribute by leaving an issue to update the application.
Running the packager module
In order to have the latest version of Electron
for your installation, you need to retrieve the latest version from the Electron GitHub which will be used to package it.
-
Go to the Electron GitHub web site and on the right, in the Releases section, below the About section, note the latest version (as in the example image below, framed in red):
-
Run the packager:
- Suppose that the lastest version readed on the Electron site is 34.8.1, then change the XX.X.X value to the latest version in the --electron-version=XX.X.X parameter in the command line below then execute it.
3. After a few moments, you should see the following result (varies by platform):~/packager/server$ npx electron-packager . --electron-version=XX.X.X --icon=./avatar.ico --out=output
Packaging app for platform win32 x64 using electron vXX.X.X (the latest version from Electron GitHub site) Wrote new app to: output\A.V.A.T.A.R-Server-linux-x64
Warning
The architecture name depends of the packaging, it can be A.V.A.T.A.R-Server-linux-x64 or A.V.A.T.A.R-Server-linux-arm64.
In the section below, we assume that it is A.V.A.T.A.R-Server-linux-x64 but it can be A.V.A.T.A.R-Server-linux-arm64. If it is the case, change the directory name according to your platform.
Installing Electron module
- Change to output/A.V.A.T.A.R-Server-linux-x64/resources/app directory:
~/server$ cd ./output/A.V.A.T.A.R-Server-linux-x64/resources/app
- Enter the following command to install Electron in the package:
~/app$ npm install electron --save-dev
- After a few moments, you should see the following result:
added <xxx> packages, changed <x> packages, and audited <xxx> packages in 13s <xx> packages are looking for funding run `npm fund` for details found 0 vulnerabilities
Deploy A.V.A.T.A.R server as an application
A.V.A.T.A.R server is now ready to be moved into its application directory.
You have two possible choices:
- Move the contents of packager/server/output/A.V.A.T.A.R-Server-linux-linux-x64 to a directory and start the server with its
a.v.a.t.a.r-server
executable. - Create an A.V.A.T.A.R-Server application.
Choose what you want to do below (between « Move to a directory » or « Create an application »)
-
Change to the packager/server directory:
cd ~/packager/server
-
Install the required packages:
~/packager/server$ sudo apt-get update ~/packager/server$ sudo apt-get install fakeroot dpkg
-
Install electron-installer-debian:
~/packager/server$ npm install -g electron-installer-debian
-
In the /packager/server directory, create the
.deb
package:~/packager/server$ electron-installer-debian --src output/A.V.A.T.A.R-Server-linux-x64/ --dest output/installer/ --arch amd64
-
Go to the packager/server/output/installer directory and install the package created in this directory (the name may vary depending on the platform and the version):
~/packager/server$ cd ./output/installer ~/packager/server/output/installer$ ls -l # returns the name of the package # copy and put the name in the following command (for the example it's A.V.A.T.A.R-Server_amd64.deb) ~/packager/server/output/installer$ sudo apt install ./A.V.A.T.A.R-Server_amd64.deb
-
Modify the application icon:
- Edit the /usr/share/applications/a.v.a.t.a.r-server.desktop file in your prefered editor
- Change the value of the
Icon
property by:
Icon=/usr/lib/a.v.a.t.a.r-server/resources/app/avatar.ico
- Create a directory for A.V.A.T.A.R server (e.g. ~/avatar/server).
-
Copy (or move) the contents of the output/A.V.A.T.A.R-Server-linux-win64 directory to ~/avatar/server.
cd ~/packager/server/output/A.V.A.T.A.R-Server-linux-x64 mv -r * ~/avatar/server
-
Delete the ~/packager/server directory.
if you want an application icon to the dock
- Create a ~/.local/share/applications/a.v.a.t.a.r-server.desktop file
-
Open this file and add the following line:
note: Replace <account> by your login account (it is your home directory)
[Desktop Entry] Name=A.V.A.T.A.R Server Comment=A.V.A.T.A.R Server GenericName=A.V.A.T.A.R Server Exec=/home/<account>/avatar/server/a.v.a.t.a.r-server %U Icon=/home/<account>/avatar/server/resources/app/avatar.ico Type=Application StartupNotify=true Categories=GNOME;GTK;Utility;
-
Save the a.v.a.t.a.r-server.desktop file
Start A.V.A.T.A.R server
Start the A.V.A.T.A.R server according to installation choice:
- In a directory:
- Click on the A.V.A.T.A.R-Server exe file in the installation directory.
- As an application:
- Locate the A.V.A.T.A.R Server application in the applications list and run it.
Warning
Warning: if you have anti-virus software, it may notify you that the application does not have a valid digital signature. Click on "always authorize".
Mandatory parameters
You're starting the server for the first time.
Although some server properties have been configured automatically, others need to be changed quickly.
- Do a right click here and select 'Open link in new tab' to display the
Server Settings
page access. -
Then, change these parameters to complet the installation:
- Default client - Mandatory -
- The name of a default client when it is homis in an action to be executed (enter the name of the most frequently used client).
- At the installation, this parameter is empty.
- Application language - Optional -
- Defines the language used for all graphical interfaces and application messages.
- At the installation, this parameter is set to "English" (you can choose between "English or "French").
- If "English" is the language you need, you can bypass this step.
- Communication port (HTTP) - Optional -
- The communication port used by all clients with the A.V.A.T.A.R Server.
- At the installation, this parameter is set to "3000".
- If this port is not used by another application you can leave this number and bypass this step.
- Background image - Optional -
- A Background image for the server. Not mandatory but so much nicer!
- Default client - Mandatory -
Test the installation
Install a client first then at the end of the client installation step, you'll see a step for testing the installation.