sgcUI on Linux64 with FMXLinux: Grids, Charts, Gauges and Full Applications for the Linux Desktop

· Components
sgcUI on Linux64 with FMXLinux: Grids, Charts, Gauges and Full Applications for the Linux Desktop
>_ New · sgcUI on Linux64

Your Delphi desktop application.
Now on Linux.

With FMXLinux installed, the sgcUI FireMonkey controls run in real desktop applications on Linux64. The same forms and the same code you ship on Windows and macOS, with the same look.

  • Delphi
  • FireMonkey
  • FMXLinux
  • Linux64
  • Ubuntu 22.04 or later
A trading desk application built with sgcUI running on a Linux desktop: watchlist grid, candlestick chart, sector treemap and gauges in a dark theme
274Linux64 demos
17UI products
5FireMonkey platforms
1code base

Linux has always been the hard platform for Delphi desktop developers. The compiler targets Linux64, but a visual application needs FireMonkey, and FireMonkey on Linux needs the FMXLinux add-on. Until now sgcUI offered Linux64 only for the non visual parts: data models, import and export, and headless rendering to PNG and SVG.

That changes today. With FMXLinux installed in the IDE, the sgcUI FireMonkey controls compile and run on Linux64: the data grid, the charts, the gauges, the dashboards, the planner, the maps, the diagrams and the rest of the suite. Every screenshot in this article was taken on Ubuntu, from the same demo projects that run on Windows and macOS.

sgcUI on Linux64 in one minute, recorded from the real demos running on Ubuntu. Also on YouTube.

Full Applications, Not Just Controls

The best way to judge a UI suite is to look at complete applications. The sgcUI Suite demos are exactly that: each one combines a dozen products into one program with navigation, live data and several pages. All of them now run on Linux64, unchanged.

A Trading Desk

The Markets demo is fed by a simulator that pushes about 1,000 updates per second. The watchlist grid flashes red and green as prices move, the candlestick chart carries Bollinger bands, moving averages, volume and RSI panes, and a sector treemap shows where the market is going.

Candlestick analysis chart with indicators on Linux
Analysis chart with indicators
Market heat map by sector on Linux
Market heat map by sector

A Factory Control Room

The Factory demo is an HMI for a bottling plant. It shows OEE cards, a seven segment bottle counter, the process flow of the line with animated connectors, an annunciator panel, radial and linear gauges and a live trend of twelve sensors with alarm limits.

Factory HMI on Linux: OEE cards, bottle counter, process flow diagram, annunciator panel and gauges in a dark theme
The line overview of the Factory demo on Ubuntu: process diagram, annunciators, gauges and counters.
Asset detail page with three large gauges for a pump
Asset detail with live gauges
Map of the plants with output and energy figures
Plants on the map

Fleet, ERP and Project Portfolio

The Fleet demo follows 48 vehicles on a map of Spain and Portugal, with routes, stops, a vehicle grid and an alert list. The ERP demo opens with a dashboard of KPI cards, charts, a gauge and a customer map, and continues with customers, planning, reports and analytics pages. The Portfolio demo schedules 12 projects and 520 tasks in a Gantt chart with the critical path.

Fleet operations application on Linux: KPI cards, a map with vehicles and routes, a vehicle grid and alerts
Live fleet operations: KPI cards, the map with vehicles and routes, and two grids.
ERP dashboard with KPI cards, charts, a gauge and a map
ERP dashboard
Week calendar of deliveries coloured by driver
Delivery planning calendar
Project portfolio overview with gauges, a bubble chart, a map and a treemap
Portfolio overview
Portfolio Gantt chart with the critical path
Portfolio Gantt with critical path
Hub network drawn as a diagram with coloured lanes
Hub network diagram
Organisation chart bound to a dataset
Organisation chart from a dataset

What sgcUI Brings to the Linux Desktop

sgcUI is a suite of native UI products that share one core, one theme engine and one way of working. On Linux64 the FireMonkey controls of the whole suite are available:

sgcCharts on Linux: range area, line and bars with a target band
sgcCharts
sgcGauges gallery on Linux: radial, ring, compass, clock, digital and LED gauges
sgcGauges
sgcPlanner Gantt on Linux with links, baseline and critical path
sgcPlanner Gantt
sgcPivotGrid on Linux with heat map cells and a field list
sgcPivotGrid
sgcMaps on Linux with a layer panel, zoom buttons and a scale bar
sgcMaps
Treemap and funnel charts on Linux
Treemap and funnel

The grid deserves its own picture. This is the FilterAndFind demo with 100,000 rows on Ubuntu, with filter buttons in the headers, a filter row and the “Ask the grid” box. The mouse wheel scrolls it smoothly and Ctrl+End jumps straight to row 100,000.

sgcGrid with 100,000 rows on Linux, with header filters and a filter row
sgcGrid with 100,000 rows on Ubuntu.

What You Need

sgcUI on Linux64 has been tested with Delphi 13 and FMXLinux 1.84 on Ubuntu 22.04 and Ubuntu 24.04.

Build Your First Linux64 Application

1Install FMXLinuxFrom GetIt, inside the IDE
2Connect LinuxPAServer and the Linux SDK
3Add the platformLinux 64-bit in your FireMonkey project
4RunThe same form, on the Linux desktop
  1. Install FMXLinux from GetIt and restart the IDE.
  2. Start PAServer on the Linux machine, create a connection profile in the IDE and import the Linux SDK, as for any Delphi Linux64 project.
  3. Add the sgcUI Source folder to the Linux 64-bit library path (Tools, Options, Language, Delphi, Library), so the compiler finds the sgcUI units for that platform.
  4. Open or create a FireMonkey application, add the Linux 64-bit target platform in the Projects window and select it.
  5. Drop the sgcUI controls on the form and run. The IDE compiles the project, deploys it through PAServer and starts it on the Linux desktop.

There is no Linux specific code to write. This is the complete source of the Hello Grid quick start, a form with one TsgcFMXGrid whose three columns are defined in the designer:

uses
  System.SysUtils, System.Classes, FMX.Types, FMX.Controls, FMX.Forms,
  // sgc
  sgcGrid_Data, sgcGrid_FMX;

procedure TfrmHelloGrid.FormCreate(Sender: TObject);
begin
  { BeginUpdate / EndUpdate repaint the grid once, after the last row }
  Grid.Data.BeginUpdate;
  try
    { AppendRow(Key, [City, Country, Population]) }
    Grid.Data.AppendRow('Madrid', ['Madrid', 'Spain', 3416771]);
    Grid.Data.AppendRow('Paris', ['Paris', 'France', 2102650]);
    Grid.Data.AppendRow('Berlin', ['Berlin', 'Germany', 3755251]);
    Grid.Data.AppendRow('Rome', ['Rome', 'Italy', 2749031]);
  finally
    Grid.Data.EndUpdate;
  end;
end;

A chart works the same way. A TsgcFMXChart control paints a TsgcChart component, and each series is a component too, here a TsgcChartSeries_Line. The only code adds the points:

uses
  // sgc
  sgcCharts_Chart, sgcCharts_Series, sgcCharts_FMX;

const
  CS_VISITS: array [0 .. 6] of Integer = (420, 515, 480, 610, 590, 380, 350);

procedure TfrmHelloChart.FormCreate(Sender: TObject);
var
  i: Integer;
begin
  { X is the day, Y the visitors. The chart repaints by itself }
  for i := Low(CS_VISITS) to High(CS_VISITS) do
    serVisits.AddXY(i + 1, CS_VISITS[i]);
end;

Select Windows, macOS or Linux 64-bit in the Projects window and the same two forms run on each of them.

From a Form to an Advanced Application

The Suite demos above are built with the same pieces, and their source code ships with sgcUI. These are the ideas that make a large Linux64 application manageable:

Try It Now: 274 Compiled Linux64 Demos

You do not need Delphi, FMXLinux or a licence to see sgcUI running on Linux. The FireMonkey demos of every product, 274 programs in total, are compiled for Linux64 and packed in one archive:

Download sgcUI_bin_linux64.tar.xz

tar -xJf sgcUI_bin_linux64.tar.xz
./run.sh              # choose a demo from the list
./run.sh Charts       # only the demos of one product

# or start one demo directly
cd Grid/FilterAndFind
GDK_BACKEND=x11 ./FilterAndFindFMX

The demos run on Ubuntu 22.04 or later and on other distributions with glibc 2.34 or later and GTK3, on an X11 or XWayland display. The demos with online maps also need libcurl and an Internet connection. The README.txt in the archive has the details.

Good to know. Printing to a printer, screen reader support and the custom window title bar are not available on Linux64, and floating docking panels are disabled there. Everything else in the FireMonkey controls is the same code as on the other platforms. The sgcUI page and the Platforms topic of the help list the details.

One Code Base, Every Desktop

Windows, macOS and now Linux64, with the same FireMonkey forms and the same sgcUI controls. Download the compiled demos and see them run on your own Linux desktop.

Questions or feedback? Get in touch, you will get a reply from the people who wrote the code.