Added Linux Helper
ADD
WalletWasabi.Fluent/Helpers/LinuxStartUpHelper.cs
+using System;
+using System.IO;
+using System.Threading.Tasks;
+using WalletWasabi.Helpers;
+
+namespace WalletWasabi.Fluent.Helpers
+{
+ public static class LinuxStartUpHelper
+ {
+ public static async Task StartOnLinuxStartupAsync(bool runOnSystemStartup)
+ {
+ string pathToDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".config", "autostart");
+ string pathToDesktopFile = Path.Combine(pathToDir, "Wasabi.desktop");
+
+ IoHelpers.EnsureContainingDirectoryExists(pathToDesktopFile);
+
+ if (runOnSystemStartup)
+ {
+ string pathToExec = EnvironmentHelpers.GetExecutablePath();
+ string fileContents = string.Join(
+ "\n",
+ "[Desktop Entry]",
+ $"Name={Constants.AppName}",
+ "Type=Application",
+ $"Exec={pathToExec}",
+ "Hidden=false",
+ "Terminal=false",
+ "X-GNOME-Autostart-enabled=true");
+
+ await File.WriteAllTextAsync(pathToDesktopFile, fileContents).ConfigureAwait(false);
+ }
+ else
+ {
+ File.Delete(pathToDesktopFile);
+ }
+ }
+ }
+}

MODIFY
WalletWasabi.Fluent/Helpers/StartupHelper.cs
WalletWasabi.Fluent/Helpers/StartupHelper.cs
@@ -24,7 +24,7 @@ namespace WalletWasabi.Fluent.Helpers
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
- await StartOnLinuxStartupAsync(runOnSystemStartup);
+ await LinuxStartUpHelper.StartOnLinuxStartupAsync(runOnSystemStartup);
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
@@ -49,33 +49,5 @@ namespace WalletWasabi.Fluent.Helpers
key.DeleteValue(nameof(WalletWasabi), false);
}
}
-
- private static async Task StartOnLinuxStartupAsync(bool runOnSystemStartup)
- {
- string pathToDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".config", "autostart");
- string pathToDesktopFile = Path.Combine(pathToDir, "Wasabi.desktop");
-
- IoHelpers.EnsureContainingDirectoryExists(pathToDesktopFile);
-
- if (runOnSystemStartup)
- {
- string pathToExec = EnvironmentHelpers.GetExecutablePath();
- string fileContents = string.Join(
- "\n",
- "[Desktop Entry]",
- $"Name={Constants.AppName}",
- "Type=Application",
- $"Exec={pathToExec}",
- "Hidden=false",
- "Terminal=false",
- "X-GNOME-Autostart-enabled=true");
-
- await File.WriteAllTextAsync(pathToDesktopFile, fileContents).ConfigureAwait(false);
- }
- else
- {
- File.Delete(pathToDesktopFile);
- }
- }
}
}

Added Linux Helper