Recursive AI

Install a C# desktop app in the Linux application launcher

OneApp is a free, open-source framework for apps in .NET whose UI is HTML and CSS, drawn natively with no web view on Windows, macOS, Linux, iOS and Android, and run in the browser, from Recursive AI. MIT or Apache-2.0.

Add an app to the current user’s Linux launcher without sudo. On desktop, OneApp runs on Linux (Wayland and X11), macOS (Apple silicon), and Windows.

1. Unzip the example and cd into the extracted folder. It contains Desk Notes, a sample app with one heading.

2. Install the CLI:

Terminal
dotnet tool install -g RecursiveAI.OneApp.Cli

Requires .NET 10 (net10.0); .NET 9 and earlier aren’t supported. If oneapp isn’t on your PATH, add $HOME/.dotnet/tools.

3. Optional: preview the app. Run dotnet run and close the window before continuing.

4. Install the app:

Terminal
oneapp install . --no-aot

--no-aot skips native ahead-of-time compilation and publishes a self-contained managed build. On Linux, the project doesn’t need to reference OneApp, but it must publish a Linux executable and set OneAppId.

The install command prints JSON with appId, version, dir, exec, desktopFile, and icon. For this example it reports "appId":"org.example.DeskNotes" and "version":"1.0.0". That’s the app version, not the CLI version.

Checked on Linux (X11): launching the installed entry opens a window and prints:

Text
Desk Notes opened.

Full program

The zip’s Example.csproj pins OneApp and sets the launcher metadata:

XML
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net10.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <OneAppId>org.example.DeskNotes</OneAppId>
    <OneAppName>Desk Notes</OneAppName>
    <OneAppCategories>Office;</OneAppCategories>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference
      Include="RecursiveAI.OneApp"
      Version="1.1.1" />
  </ItemGroup>
</Project>
C#
using OneApp;
 
var options = new AppOptions(
    "<h1>Desk Notes</h1>")
{
    AppId = "org.example.DeskNotes",
    Title = "Desk Notes",
    Width = 400,
    Height = 240
};
using var host = AppHost.Create(options);
Console.WriteLine("Desk Notes opened.");
host.Run();

Look for Desk Notes in the launcher. If gtk-launch is available, you can also open that entry by ID:

Terminal
gtk-launch org.example.DeskNotes

If the CLI reports that OneAppId is missing, set it inside a <PropertyGroup> and run the install again. The zip already sets it.

Variations

Remove the launcher entry and the installed files without deleting your project:

Terminal
oneapp uninstall org.example.DeskNotes

The short answer

Set a reverse-DNS OneAppId in the project file, then run oneapp install . --no-aot. OneApp publishes a self-contained managed build for Linux and writes a .desktop entry for the current user. You don’t need to build a .deb or install the app system-wide.

How do I add an app to the Linux application menu?

The Desktop Entry specification defines the .desktop file that the launcher reads. OneApp puts it in applications/ under $XDG_DATA_HOME, or ~/.local/share if that variable is unset. The Name key is what you search for in the launcher. The Exec key points at the published executable, not at dotnet run or a copy of the project. That’s why moving your source folder after installation doesn’t move the installed app.

Use the same AppOptions.AppId at runtime as OneAppId in the project. This lets the desktop associate the running window with its launcher entry. You can change the display name without changing the ID. Keep the ID stable when reinstalling an updated build; changing it makes a separate entry.

Can you run .NET desktop apps on Linux without the SDK?

The SDK is needed to run the CLI and publish the project. The result from --no-aot includes the .NET runtime for the target so the launcher doesn’t need the SDK to open it. Self-contained doesn’t mean independent of Linux’s desktop or graphics services: the OneApp example still needs a supported graphical session and its system libraries. If you’re preparing an artifact to send to someone else instead of installing locally, build a distribution package or AppImage rather than copying the personal launcher entry, whose executable path is absolute.

All oneapp recipes