<type>documentation</type>
<domain>intro</domain>
<id>linux-installation-detail</id>
<title>Linux Installation Notes</title>
<date>$Date$</date>
<version>$Revision$</version>
<product>all</product>

On Linux, Wing can be installed from RPM, Debian package, or from tar archive.  Use the latter
if you do not have root access on your machine or wish to install Wing somewhere
other than ``/usr/lib/~~PRODUCT_SPEC_VERSION~~``.  Only 64-bit Linux is supported, although
in Wing Pro `remote development <ref:proj/remote-hosts>`__ can be used to develop on
a 32-bit host.

~~~if WEBSITE:
The instructions here are for Wing Pro.  The package naming for Wing Personal is instead
``wing-personal6`` and for Wing 101 it is ``wing-101-6``.
~~~

**Installing Wingware's Public Key**

Some systems will complain when you try to install Wing without first installing our
public key into your key repository.  The key is `available here <https://wingware.com/pgpkey>`__.  
Copy and paste the key into a file ``wingware.pub`` and then use the following to import the key.

For RPM systems::

  sudo rpm --import wingware.pub

For Debian systems::

  sudo apt-key add wingware.pub

An alternative is just to bypass the key check with ``--nogpg`` command line option for ``rpm``,
``--nogpgcheck`` for ``yum``, and ``--no-debsig`` for ``dpkg``.

**Installing from RPM:**

Wing can be installed from an RPM package on RPM-based systems, such as RedHat
and Mandriva. To install, run ``rpm -i ~~PRODUCT_SPEC_VERSION~~-~~FULL_VERSION~~.0.x86_64.rpm`` 
as root or use your favorite RPM administration tool. Most files 
for Wing are placed under the ``/usr/lib/~~PRODUCT_SPEC_VERSION~~``
directory and the ``~~EXECUTABLE~~~~MAJOR_VERSION~~.~~MINOR_VERSION~~`` command is placed in the
``/usr/bin`` directory.

**Installing from Debian package:**

Wing can be installed from a Debian package on Debian, Ubuntu, and other Debian-based systems. 

To install, run ``dpkg -i ~~PRODUCT_SPEC_VERSION~~_~~FULL_VERSION~~.0_amd64.deb`` 
as root or use your favorite package administration tool. Most files 
for Wing are placed under the ``/usr/lib/~~PRODUCT_SPEC_VERSION~~``
directory and the ``~~EXECUTABLE~~~~MAJOR_VERSION~~.~~MINOR_VERSION~~`` command is placed in the
``/usr/bin`` directory.

It may be necessary to install some dependencies before the installation
will complete, as requested by ``dpkg``.  The easiest way to do this is
``sudo apt-get -f install`` -- this installs the missing dependencies and
completes the configuration step for Wing's package.

**Installing from Tar Archive:**

Wing may also be installed from a tar archive. This can be used on systems
that do not use RPM or Debian packages, or if you wish to install Wing into a directory other
than ``/usr/lib/~~PRODUCT_SPEC_VERSION~~``. Unpacking this archive with 
``tar -zxvf ~~PRODUCT_SPEC~~-~~FULL_VERSION~~.0-linux-x64.tar.gz`` will create a
``~~PRODUCT_SPEC~~-~~FULL_VERSION~~.0-linux-x64`` directory that contains the
``wing-install.py`` script.

Running the ``wing-install.py`` script will 
prompt for the location to install Wing, and the location in which to place the executable 
``~~EXECUTABLE~~~~MAJOR_VERSION~~.~~MINOR_VERSION~~``. These locations default to
``/usr/local/lib/~~PRODUCT_SPEC~~`` and ``/usr/local/bin``, respectively. The
install program must have read/write access to both of these directories, and
all users running Wing must have read access to both.

**Configuring Wing for High DPI Displays**

Wing's UI is implemented with the Qt toolkit, which includes support for high DPI
displays, but the support varies depending on the desktop environment in use:

On ``KDE``, as of early 2019, Wing should display correctly.

On ``Gnome``, as of early 2019, Wing may suggest an interface scale factor based
on the size of a character on the primary display.

If Wing is not displaying correctly, the user interface may be scaled
manually. To scale icons, windows, and other elements other than
fonts, use the `User Interface > Other > Icon and Window Scale Factor
<script:show_preferences_gui#prefname="main.non-font-scale-factor">`__
preference. To scale the entire UI, including fonts, use
``Presentation Mode`` in the common configuration menu, which is
accessed from the menu icon in the top right of Wing's window.

The ``QT_*`` environment variables described at `https://doc.qt.io/qt-5/highdpi.html
<https://doc.qt.io/qt-5/highdpi.html>`__ may also be used to scale Wing's display.
