Install Mac Apps On Freebsd

On FreeBSD, Xorg can be installed as a package or port. The binary package can be installed quickly but with fewer options for customization: # pkg install xorg. To build and install from the Ports Collection: # cd /usr/ports/x11/xorg # make install clean. Either of these installations results in the complete Xorg system being installed. Install all 4 packages at once with the following steps: Open a terminal. Enter (with a space between every library name, or copy the line as-is, and right-click in terminal to paste) sudo apt-get install ia32-libs libstdc6 libstdc5 freeglut3.

  1. Freebsd Install Source
  2. Freebsd Usb Install

The quickest way to install Elixir is through a distribution or using one of the available installers. If not available, then we recommend the precompiled packages or compiling it.

Freebsd install software

Note that Elixir v1.11 requires Erlang 21.0 or later. Many of the instructions below will automatically install Erlang for you. In case they do not, read the “Installing Erlang” section below.

Distributions

The preferred option for installing Elixir. Choose your operating system and tool.

If your distribution contains an old Elixir/Erlang version, see the sections below for installing Elixir/Erlang from version managers or from source.

macOS

  • Using Homebrew:
    • Update your homebrew to latest: brew update
    • Run: brew install elixir
  • Using Macports:
    • Run: sudo port install elixir

GNU/Linux

  • Alpine Linux (Community repository)
    • Run: apk add elixir
  • Arch Linux (Community repository)
    • Run: pacman -S elixir
  • Debian
    • See below the instructions for Ubuntu
  • Fedora 21 (and older)
    • Run: yum install elixir
  • Fedora 22 (and newer)
    • Run dnf install elixir
  • Gentoo
    • Run: emerge --ask dev-lang/elixir
  • GNU Guix
    • Run: guix package -i elixir
  • openSUSE (and SLES)
    • Add Elixir/Erlang repository: zypper ar -f obs://devel:languages:erlang/ Elixir-Factory
    • Run: zypper in elixir
    • Optional: if you want to use the latest Erlang, you can use this repository: zypper ar -f obs://devel:languages:erlang:Factory Erlang-Factory
  • Slackware
    • Using Sbopkg:
      • Run: sbopkg -ki 'erlang-otp elixir'
    • Manually:
      • Download, build and install from SlackBuilds.org: erlang-otp, and elixir
  • Solus
    • Run: eopkg install elixir
  • Ubuntu 14.04/16.04/17.04/18.04/19.04 or Debian 7/8/9/10
    • Add Erlang Solutions repository: wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && sudo dpkg -i erlang-solutions_2.0_all.deb
    • Run: sudo apt-get update
    • Install the Erlang/OTP platform and all of its applications: sudo apt-get install esl-erlang
    • Install Elixir: sudo apt-get install elixir

BSD

  • FreeBSD
    • Using ports:
      • Run: cd /usr/ports/lang/elixir && make install clean
    • Using pkg:
      • Run: pkg install elixir
  • OpenBSD
    • Run: pkg_add elixir

Windows

  • Using our web installer:
    • Click next, next, …, finish
  • Using Chocolatey:
    • Run: cinst elixir

Raspberry Pi

If necessary, replace “buster” with the name of your Raspbian release.

  • The Erlang Solutions repository has a prebuilt package for armhf. This saves a significant amount of time in comparison to recompiling natively
  • Get Erlang key and add it to the keychain:
    • Run: echo 'deb https://packages.erlang-solutions.com/debian buster contrib' | sudo tee /etc/apt/sources.list.d/erlang-solutions.list
    • Run: wget https://packages.erlang-solutions.com/debian/erlang_solutions.asc
    • Run: sudo apt-key add erlang_solutions.asc
  • Install Elixir:
    • Update apt to latest: sudo apt update
    • Run: sudo apt install elixir

Docker

If you are familiar with Docker you can use the official Docker image to get started quickly with Elixir.

  • Enter interactive mode
    • Run: docker run -it --rm elixir
  • Enter bash within container with installed elixir
    • Run: docker run -it --rm elixir bash

Those distributions will likely install Erlang automatically for you too. In case they don’t, check the Installing Erlang section below.

If you need to programmatically fetch the list of Elixir precompiled packages alongside their checksums, access https://elixir-lang.org/elixir.csv.

Precompiled package

Elixir provides a precompiled package for every release. First install Erlang and then download and unzip the Precompiled.zip file for the latest release.

Once the release is unpacked, you are ready to run the elixir and iex commands from the bin directory, but we recommend you to add Elixir’s bin path to your PATH environment variable to ease development.

Compiling with version managers

There are many tools that allow developers to install and manage multiple Erlang and Elixir versions. They are useful if you can’t install Erlang or Elixir as mentioned above or if your package manager is simply outdated. Here are some of those tools:

  • asdf - install and manage different Elixir and Erlang versions
  • exenv - install and manage different Elixir versions
  • kiex - install and manage different Elixir versions
  • kerl - install and manage different Erlang versions

Keep in mind that each Elixir version supports specific Erlang/OTP versions. Check the compatibility table if you have questions or run into issues.

If you would prefer to compile from source manually, don’t worry, we got your back too.

Compiling from source (Unix and MinGW)

You can download and compile Elixir in few steps. The first one is to install Erlang.

Next you should download source code (.zip, .tar.gz) of the latest release, unpack it and then run make inside the unpacked directory (note: if you are running on Windows, read this page on setting up your environment for compiling Elixir).

After compiling, you are ready to run the elixir and iex commands from the bin directory. It is recommended that you add Elixir’s bin path to your PATH environment variable to ease development.

In case you are feeling a bit more adventurous, you can also compile from master:

If the tests pass, you are ready to go. Otherwise, feel free to open an issue in the issues tracker on Github.

Installing Erlang

The only prerequisite for Elixir is Erlang, version 21.0 or later. When installing Elixir, Erlang is generally installed automatically for you. However, if you want to install Erlang manually, you might check:

  • A general list of installation methods from the Riak documentation.

After Erlang is installed, you should be able to open up the command line (or command prompt) and check the Erlang version by typing erl. You will see some information similar to:

Notice that depending on how you installed Erlang, Erlang binaries might not be available in your PATH. Be sure to have Erlang binaries in your PATH, otherwise Elixir won’t work!

Setting PATH environment variable

It is highly recommended to add Elixir’s bin path to your PATH environment variable to ease development.

On Windows, there are instructions for different versions explaining the process.

Install Mac Apps On Freebsd

On Unix systems, you need to find your shell profile file, and then add to the end of this file the following line reflecting the path to your Elixir installation:

QNAP NAS brings full compatibility to your iOS devices. Directly access your iPhone or iPad photos and videos right from your QNAP NAS. With QTS 4.3.4, importing media from iOS devices isn’t just easy and uncomplicated- you can bypass the Photos app or syncing with iTunes altogether. Qnap photo app mac. Qphoto is a mobile app designed for remote photo management. You can instantly upload photos from mobile devices to your QNAP NAS and browse photos using timeline, thumbnails, detailed list and folder views. Searching for specific photos or videos is easy by using keyword or tags.

In the pop-up menu, choose the icons that you want to appear on your desktop from the checklist, then click 'Apply.' After the process is complete, click 'OK.' Choose the icons that you want on. How to put app icon on mac desktop.

Checking the installed version of Elixir

Freebsd Install Source

Once you have Elixir installed, you can check its version by running elixir --version.

What do all programmers like to do after work? Ok, what do most programers like to do after work? The answer is simple: play a good game! Recently at the Polish BSD User Group meetup mulander was telling us how you can play games on OpenBSD. Today let’s discuss how this looks in the FreeBSD world using the “server only” operating system.

XNA based games

One of the ways of playing natively is to play indie games which use XNA. XNA is a framework from Microsoft which uses .NET, for creating games. Fortunately, in the BSD world we have Mono, an open source implementation of Microsoft's .NET Framework which you can use to run games. There is also FNA framework which is a reimplementation of XNA which allows you to run the games under Linux. Thomas Frohwein, from OpenBSD, prepared a script, fnaify. Fnaify translate all dependencies used by an FNA game to OpenBSD dependencies.

I decided to port the script to FreeBSD. The script is using /bin/sh which in the case of OpenBSD is a Korn Shell.

openbsd# sh
openbsd# echo $SHELL
/bin/ksh
openbsd# sha256 /bin/ksh /bin/sh
SHA256 (/bin/ksh) = 5eff26713d74e0363e7d912767f8139f79dfb51025a7ac1b6678dfb7a3d0d389
SHA256 (/bin/sh) = 5eff26713d74e0363e7d912767f8139f79dfb51025a7ac1b6678dfb7a3d0d389

Korn shell has two main features which are used by the script and which are not supported in the Bourne shell, but used by fnaify:

  • Arrays:
    • iterating array_name[index]
    • size array_name[]
    • ${array_name[*]} - accessing all elements
    • ${#ignoredarray[*]} - the size of the array
    • set -a for setting the multiple value in the array
  • The new test command (The ‘[[‘ construction)

I could just use another shell, like bash, to accomplish this task but I decided to rewrite the whole script in Bourne shell which should make it simpler to port across other operating systems as well. Another problem was the difference between sed’s in OpenBSD and FreeBSD. I simplified the commands so it should work on both platforms. I also reduced the code size of the script by about 20%.

Freebsd Usb Install

The official version support FreeBSD and you can find it here. I tested it with Stardew Valley. You can see a demo of it here.

I didn't test it with many games, but I don’t see any reason why it shouldn’t work with all the games tested by the OpenBSD guys. For example, with:

  • Cryptark
  • Rouge Legacy
  • Apotheon
  • Escape Goat
  • Bastion
  • CrossCode
  • Atom Zombie Smasher

Open-Source games

In FreeBSD and OpenBSD we also will find popular games which were open sourced. For example, I spend a lot of time playing in Quake 3 Arena on my FreeBSD machine. You can very simply install it using pkg:

# pkg install ioquake3

Then move the files for the skins and maps to the .ioquake3 directory from your copy of Quake. In the past I also played UrbanTerror which is a fully open source shooter based on the Quake 3 Arena engine. It’s is also very easy to install it from ports:

# pkg install iourbanterror

In the ports tree in the games directory you can find over 1000 directories, many of them with fully implemented games. I didn’t test many games in this category, but you can find some interesting titles like:

  • openxcom (Open-source re-implementation of the original X-Com)
  • openjazz (Free re-implementation of the Jazz Jackrabbit(tm) game engine)
  • corsixth (Open source re-implementation of Theme Hospital)
  • quake2
  • openra (Red Alert)
  • openrct2 (Open source re-implementation of RollerCoaster Tycoon 2)
  • openmw (Open source engine reimplementation of the game Morrowind)

All those titles are simply installed through the packages. In that case I don’t think FreeBSD has any difference from OpenBSD.

Wine

One of the big advantages of FreeBSD over OpenBSD is that FreeBSD supports wine. Wine allows you to run Windows applications under other operating systems (including mac). If you are a FreeBSD 11 user, you can simply fetch wine from packages:

# pkg install i386-wine

To run Windows games, you need to have a 32-bit wine because most of the games on Windows are built on 32-bits (maybe this has changed – I don’t play so much these days). In my case, because I run FreeBSD-CURRENT I needed to build wine from ports. It wasn’t nice, but it also wasn’t unpleasant. The whole step-by-step building process of a wine from ports can be found here. What I loved about FreeBSD is that you can easily configure additional interpreters for PE32 executables:

# binmiscctl add wine32 --interpreter /usr/local/bin32/wine
--magic 'x4dx5ax90x00x03x00x00x00x04x00x00x00xffxffx00x00xb8x00x00x00'
--mask 'xffxffxffxffxffxffxffxffxffxffxffxffxffxffxffxffxffxffxffxff'
--size 20 --set-enabled

In this hex magic value, you can see MZ letters which is a signature for Windows executables.

In theory, wine allows you to play many, many games – you can see the wine database for a whole list. Unfortunately, running games under wine can be challenging and different games can have different issues. If you are thinking about buying a game and running it under FreeBSD I would recommend first checking the game in the wine database. If there is no known error running it under Linux, then feel free to try it under FreeBSD.

I didn’t test many games on FreeBSD. The game I tested was Septerra Core: Legacy of the Creator, an old cRPG from 1999. When I was a kid I spent many hours playing it, and it turns out that I bought it on GOG.com some time ago. GOG released the ‘Linux version of game’ which means that there are some scripts which allow to run it under Linux using wine. The first problem is that all scripts have a shebang set to `/bin/bash`. It’s not a big problem to change this but still people should understand that not everybody has a bash installed in `/bin/`.

Similarly, for Windows, you can use which uses Gifsicle to power its GIF compression.Reduce GIF Size Online ResizeImage.netis a no-nonsense online tool that helps you resize all types of images. It applies lossy compression not only to JPEG, PNG, but animated GIF as well. The tool will accept GIF files of up to 30MB in size and 10MP in resolution. The tool lets you crop images, rotate images and also resize the image by specifying quality and aspect ratio. Amongst all the tools that we have listed above the ScreenToGif possesses an exceptional ability to compress GIF files without losing quality and is definitely a notch above others.If you are just looking for a way to compress GIF on macOS (while keeping the original size), then try. How to compress gif files.

Multiply Setapp with iOS apps We make Setapp synced and sound for you. Now, you can unlock the full potential of curated apps on both Mac and iPhone. Get Setapp for $9.99/mo and add iOS device for $2.49/mo to expand favorite software to mobile. Hands-off savings, 2X Setapp. Perfect mac apps setup.

The scripts from GOG.com are using some Linux libraries which were attached to the game.

$ file g17_wine
g17_wine: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=34ddab73835550d9f80f07ed85a9de25c430f9ce, with debug_info, not stripped

On FreeBSD you can try to run Linux binaries because you have a compatibility layer called Linuxulator. I spent a couple of minutes playing with those scripts and they started to run under my machine. So, I tried to run the game:

DEBUG: ********************STARTING Septerra Core ********************
DEBUG: curernt variables are:
DEBUG: PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/oshogbo/bin:/usr/local/bin:/home/oshogbo/bin
DEBUG: pwd: /home/oshogbo/GOG Games/Septerra Core Legacy of the Creator/game
DEBUG: startDir: /usr/home/oshogbo/GOG Games/Septerra Core Legacy of the Creator/game
DEBUG: gameDir: /usr/home/oshogbo/GOG Games/Septerra Core Legacy of the Creator/game/Game/
DEBUG: wineBinDir: /usr/home/oshogbo/GOG Games/Septerra Core Legacy of the Creator/game/Wine/bin
DEBUG: wineConfig: /usr/home/oshogbo/GOG Games/Septerra Core Legacy of the Creator/game/Wine/prefix/.config
DEBUG: wine binary shoult be at: /usr/home/oshogbo/GOG Games/Septerra Core Legacy of the Creator/game/Wine/bin/g17_wine
DEBUG: done!
DEBUG: *********************************************************
Starting the game now..
DEBUG: adding wineBinDir to PATH, PATH is now: /usr/home/oshogbo/GOG Games/Septerra Core Legacy of the Creator/game/Wine/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/oshogbo/bin:/usr/local/bin:/home/oshogbo/bin
DEBUG: adding wineLibDir to LD_LIBRARY_PATH, LD_LIBRARY_PATH is now: /usr/home/oshogbo/GOG Games/Septerra Core Legacy of the Creator/game/Wine/lib::/usr/local/lib/
DEBUG: entering game directory using cd /usr/home/oshogbo/GOG Games/Septerra Core Legacy of the Creator/game/Game/
DEBUG: calling wine septerra.exe ..
wine: failed to initialize: /home/Projects/wine-1.8.1/wineBuild/lib/wine/ntdll.dll.so: cannot open shared object file: No such file or directory

As you can see, wine is trying to look for ntdll.dll in the `/home/Projects/wine-1.8.1/wineBuild/` which I obviously don’t have. I looked inside the binaries and I discovered that there are multiple libraries hardcoded there. This doesn't really mean anything because there is maybe one magic environment which allows me to run the game, but I couldn’t find it, so I gave up on this path.

GOG allows you to download a Windows games in two ways. One of them is using their fancy installer, which does not work if you are trying to run it on a too old Windows. The second way is through the ‘offline backup’ which allows you to download a normal game installer. When I downloaded the ‘Windows’ version of the game and tried to run under wine, everything looked pretty good. The intro played. The sound was working. And when I clicked the ‘new game button’, my game crashed.

The error mentioned using uninitialized memory. I was devastated for a couple of minutes. After disconnecting additional monitors and leaving only the primary (I use 4 monitors) from my PC and not clicking the ‘new game’ button on the main screen but on the options menu the game seems to work fine…

Summary

As you can see there are many titles available for *BSDs. Thanks to the FNA and fnaify, OpenBSD and FreeBSD can work with indie games which use the XNA framework. There are many interesting games implemented using this framework. Open source is not only for big server machines, and there are many re-implementations of popular games like Theme Hospital or RollerCoaster Tycoon 2. The biggest market is still enabled through wine, although its creates a lot of problems to run the games. Also, if you are an OpenBSD user only this option is not available for you. Please also note that we didn’t discuss any other emulators besides wine. In OpenBSD and FreeBSD there are many of them for GameBoy, SNES, NeoGeo and other games consoles.

That said OpenBSD has a big gaming community in multiple places, so if you want more information don’t hesitate to visit:

  • reddit,
  • irc (#openBSD-gaming @ FreeNODE).

But the most important place is PlayOnBSD.com, the service (which is still under construction) which has a list of popular games available for BSD operating systems.

I would like to thank mulander for showing me how big the gaming market is on BSDs

If any of you tested any of these open source games, or you spent a couple of hours fighting with wine, or you tested the FreeBSD version of fnaify please share your experience in the comments section!
UPDATE 1: All my changes to the fnaify was upstreamed to the official repo by Thomas Frohwein.