Running Fly - kitkatzecat/fly GitHub Wiki

If for some reason you want to try to run Fly, here's a guide I made while doing a test install recently.

Initial Steps

First, you're going to need an installation of your favorite Linux distribution. Personally, I have used Debian and Ubuntu, but I'm sure others will work. To run on Windows, the Windows Subsystem for Linux is the best way to achieve this.

If you want to run it as the main interface on a physical device or virtual machine, I would recommend installing the LXDE desktop environment during or after your chosen distribution's setup. (If you're using WSL or just wanting to run Fly beside your regular Linux installation, don't worry - you don't need to do this!) More about this further down.

Laying the Foundation

Once you have your Linux distribution (Debian, Ubuntu, WSL, etc.) installed, the foundations for Fly start to get set. To run, Fly needs Apache HTTP server and PHP installed. For the purposes of this tutorial, I'll be using commands that I have personally used in Ubuntu and Debian. If you're using another distribution, your commands might differ.

First, use these commands to install the Apache server:

sudo apt-get install apache2

Once Apache is installed, install PHP and the PHP extension for Apache using these commands:

sudo apt-get install php libapache2-mod-php

Now that both Apache and PHP are installed, we're getting really close to being able to actually download Fly! Before we can do that, though, there are a couple configuration changes you'll need to make to PHP for Fly to run.

Locate the php.ini file on your computer and open it in Nano (or your favorite text editor). It's normally stored in /etc/php/7.2/apache2 (or whatever version of PHP is installed), so your command will probably look something like this:

sudo nano /etc/php/7.2/apache2/php.ini

Once you have it open, you'll want to find the "UNIX" subsection under the "Paths and Directories" section (it's normally somewhere around line 698). That line and the lines surrounding it will probably look something like this:

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2" ;include_path = ".:/usr/share/php" ;

For Fly to run, we need to add a directory to the list that PHP checks for include files. Make sure that the line isn't commented by removing ; to the left of include_path, if there is one there. In the quotes on the include_path line, you'll add the path to the Fly includes directory, system/include. Make sure to separate this path from the other default ones using :. The Apache server is usually set up to run from /var/www/html, so the line will probably end up looking about like this:

include_path = ".:/var/www/html/system/include"

Since we haven't actually downloaded the Fly files, this directory doesn't exist yet, but it will be very important to make sure Fly will run.

Next, we'll need to edit the line that controls error reporting, so we're not getting ridiculous amounts of errors. Find the error_reporting line (usually somewhere around line 445). It will probably look something like this:

; http://php.net/error-reporting
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

; This directive controls whether or not and where PHP will output errors, ; notices and warnings too. Error output is very useful during development, but

At the end of the error_reporting line, add & ~E_NOTICE so the line looks like this:

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE

This is making sure PHP won't report every single little notice that it gets (hopefully I'll eventually be able to get rid of all the old/bad code that's causing these notices, but for now this works :P). Once you have that line set, you can save the file and exit Nano (CTRL+X, Y, ENTER) or whichever other editor you're using. (If it says permission is denied when trying to save, make sure you're running Nano as sudo!)

We also need to install some components for PHP that aren't always with the default install. Enter the following commands to install these files:

sudo apt-get install php-xml

Cloning Fly

Now that all the foundations have been laid, it's time to actually download the Fly files! First, you'll want to make sure git is installed:

apt-get install git

Once that's done, navigate to the directory right above the root of your Apache server. Usually the root is /var/www/html in Debian/Ubuntu, so your command will look something like this:

cd /var/www

Once we're in this directory, we're going to remove the current root folder to make sure there's nothing in it that could interfere with Fly. Do this by entering the command (replace the html with the name of your Apache's root folder, if it's different):

sudo rm -R -f html

Now that that's done, it's time to download Fly! Use the git command to clone the Fly repository to a new html folder (or whatever your Apache's root folder was called):

git clone --depth=1 https://github.com/kitkatzecat/fly.git html

(The --depth=1 parameter is there because you probably don't need the entire version history, but if you want it, feel free to remove that part!)

Now, to make sure the Fly system actually has permission to access its own files, we'll run chmod on the root directory:

chmod -R 777 html

(Using 777 probably isn't technically very secure, but for our purposes, and simplicity's sake, it works for what we're doing)

Once that's all done, all you have to do is restart Apache to apply the changes:

sudo service apache2 restart

...and you're done! If you're running the server on WSL, there might be some Windows Firewall prompts at some points during Apache setup, make sure to allow those.

Using Fly

Now that all the boring installation stuff is out of the way, you can use Fly! Use your favorite web browser (Fly tends to work best in Edge or Chromium-based browsers, though it mostly works in Firefox, too) and navigate to the IP of the Apache server (if you're using WSL or a native Linux desktop environment, you can access it with http://localhost or http://127.0.0.1) and hopefully you'll be greeted with the Fly login screen! The default user does not have a password set.

Using Fly on a Virtual/Physical Machine

If you want to use Fly as the main interface of a virtual or physical machine, there are a few more steps to make sure the system boots directly to Fly. Another wiki page will be coming soon with more details on how to do this!

Optional: Elevated Privileges for Apache

This isn't usually necessary, so if you're not running Fly as the main interface on a physical or virtual machine, you can probably ignore this section. If you are running Fly as the main interface, certain computer actions, such as interacting with devices (changing volume, etc.) and managing the computer (shutting down, restarting) require sudo access. To make sure these functions work properly, you'll need to add the Apache user to the sudoers file.

To add the Apache user to the sudoers file, you first need to be signed in as the root user or a user that already has sudo permissions. The Apache server is usually run under the user "www-data" in Debian and Ubuntu, so the command to add that user to sudoers would look like this:

sudo adduser www-data sudo

If you're not sure which user the Apache user is running as in your installation, run the command ps aux | egrep '(apache|httpd)' and check which user (listed in the far right column) is running the majority of Apache-related processes.

⚠️ **GitHub.com Fallback** ⚠️