From 16477e7f9ef240acf3e174bd865948761d5fe6f4 Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Sat, 15 Apr 2023 11:43:32 -0700 Subject: [PATCH 1/7] Register missing IMessageBoxViewModel in DI, organize MessageBox-related classes, add FakeMessageBoxViewModel, fix resolution of current Application in AvaloniaDispatcher, and remove unused dependency on libdgiplus. --- README.md | 1 - Server/wwwroot/Content/Install-MacOS-arm64.sh | 3 --- Server/wwwroot/Content/Install-MacOS-x64.sh | 3 --- 3 files changed, 7 deletions(-) diff --git a/README.md b/README.md index 474e3b23..0119f8c7 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,6 @@ You can change database by changing `DBProvider` in `ApplicationOptions` to `SQL * libx11-dev * libxrandr-dev * libc6-dev - * libgdiplus * libxtst-dev * xclip diff --git a/Server/wwwroot/Content/Install-MacOS-arm64.sh b/Server/wwwroot/Content/Install-MacOS-arm64.sh index 6984c2ea..2df6f93b 100644 --- a/Server/wwwroot/Content/Install-MacOS-arm64.sh +++ b/Server/wwwroot/Content/Install-MacOS-arm64.sh @@ -44,9 +44,6 @@ su - $Owner -c "brew update" # Install .NET Runtime su - $Owner -c "brew install --cask dotnet" -# Install dependency for System.Drawing.Common -su - $Owner -c "brew install mono-libgdiplus" - # Install other dependencies su - $Owner -c "brew install curl" su - $Owner -c "brew install jq" diff --git a/Server/wwwroot/Content/Install-MacOS-x64.sh b/Server/wwwroot/Content/Install-MacOS-x64.sh index 7ea6ddf3..d146bcf6 100644 --- a/Server/wwwroot/Content/Install-MacOS-x64.sh +++ b/Server/wwwroot/Content/Install-MacOS-x64.sh @@ -44,9 +44,6 @@ su - $Owner -c "brew update" # Install .NET Runtime su - $Owner -c "brew install --cask dotnet" -# Install dependency for System.Drawing.Common -su - $Owner -c "brew install mono-libgdiplus" - # Install other dependencies su - $Owner -c "brew install curl" su - $Owner -c "brew install jq" From e97eda0c8a06afff3a2ba91772005985e5a60d9a Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Sat, 15 Apr 2023 11:43:40 -0700 Subject: [PATCH 2/7] Update submodule. --- submodules/Immense.RemoteControl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/Immense.RemoteControl b/submodules/Immense.RemoteControl index a2b9a545..e49eb3f8 160000 --- a/submodules/Immense.RemoteControl +++ b/submodules/Immense.RemoteControl @@ -1 +1 @@ -Subproject commit a2b9a545671c05ad156404ca82879c9de0f0c0f8 +Subproject commit e49eb3f8e3cc3212632c81030d6120bf05b57443 From d2dd852a835aad5fba6416af0f66b85017ffb98c Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Sat, 15 Apr 2023 15:15:40 -0700 Subject: [PATCH 3/7] Fix desktop reconnection. Fix crash in Wayland (though still not supported). --- Desktop.Linux/Program.cs | 4 ++-- Server/appsettings.Development.json | 30 +++++++++++++++++++++++++++++ submodules/Immense.RemoteControl | 2 +- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/Desktop.Linux/Program.cs b/Desktop.Linux/Program.cs index 798b6453..a4a931fa 100644 --- a/Desktop.Linux/Program.cs +++ b/Desktop.Linux/Program.cs @@ -16,7 +16,7 @@ using System.Diagnostics; var logger = new FileLogger("Remotely_Deskt", "Program.cs"); var filePath = Process.GetCurrentProcess()?.MainModule?.FileName; -var serverUrl = Debugger.IsAttached ? "https://localhost:5001" : string.Empty; +var serverUrl = Debugger.IsAttached ? "http://localhost:5000" : string.Empty; var getEmbeddedResult = await EmbeddedServerDataSearcher.Instance.TryGetEmbeddedData(filePath); if (getEmbeddedResult.IsSuccess) { @@ -40,7 +40,7 @@ var provider = await Startup.UseRemoteControlClient( #if DEBUG builder.SetMinimumLevel(LogLevel.Debug); #endif - builder.AddProvider(new FileLoggerProvider("Remotely_Deskt")); + builder.AddProvider(new FileLoggerProvider("Remotely_Desktop")); }); services.AddSingleton(); diff --git a/Server/appsettings.Development.json b/Server/appsettings.Development.json index 51737579..a8efe99d 100644 --- a/Server/appsettings.Development.json +++ b/Server/appsettings.Development.json @@ -6,5 +6,35 @@ "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information" } + }, + "ApplicationOptions": { + "AllowApiLogin": false, + "BannedDevices": [], + "DataRetentionInDays": 90, + "DBProvider": "SQLite", + "EnableWindowsEventLog": false, + "EnforceAttendedAccess": false, + "ForceClientHttps": false, + "KnownProxies": [], + "MaxConcurrentUpdates": 10, + "MaxOrganizationCount": 1, + "MessageOfTheDay": "", + "RedirectToHttps": true, + "RemoteControlNotifyUser": true, + "RemoteControlRequiresAuthentication": false, + "RemoteControlSessionLimit": 3, + "Require2FA": false, + "SmtpDisplayName": "", + "SmtpEmail": "", + "SmtpHost": "", + "SmtpLocalDomain": "", + "SmtpCheckCertificateRevocation": true, + "SmtpPassword": "", + "SmtpPort": 587, + "SmtpUserName": "", + "Theme": "Dark", + "TrustedCorsOrigins": [], + "UseHsts": false, + "UseHttpLogging": false } } diff --git a/submodules/Immense.RemoteControl b/submodules/Immense.RemoteControl index e49eb3f8..7b8622db 160000 --- a/submodules/Immense.RemoteControl +++ b/submodules/Immense.RemoteControl @@ -1 +1 @@ -Subproject commit e49eb3f8e3cc3212632c81030d6120bf05b57443 +Subproject commit 7b8622db7c9b11e2ece87a85820587c126ba573c From 8893f19ee4d2f05995a563ed95269a176b871bac Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Sat, 15 Apr 2023 16:30:43 -0700 Subject: [PATCH 4/7] Don't use app manifest when running in debug. --- Desktop.Win/Desktop.Win.csproj | 5 ++++- submodules/Immense.RemoteControl | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Desktop.Win/Desktop.Win.csproj b/Desktop.Win/Desktop.Win.csproj index 4a7134ac..0aba39b7 100644 --- a/Desktop.Win/Desktop.Win.csproj +++ b/Desktop.Win/Desktop.Win.csproj @@ -18,7 +18,10 @@ AnyCPU;x86;x64 True - app.manifest + + + + app.manifest diff --git a/submodules/Immense.RemoteControl b/submodules/Immense.RemoteControl index 7b8622db..ef8d4018 160000 --- a/submodules/Immense.RemoteControl +++ b/submodules/Immense.RemoteControl @@ -1 +1 @@ -Subproject commit 7b8622db7c9b11e2ece87a85820587c126ba573c +Subproject commit ef8d40183c3654d81458eea717d74f6e895f1cc8 From 903eafccc6647ed286bdbf76f6e48ef2ad413b30 Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Sat, 15 Apr 2023 17:15:14 -0700 Subject: [PATCH 5/7] Update submodule. --- submodules/Immense.RemoteControl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/Immense.RemoteControl b/submodules/Immense.RemoteControl index ef8d4018..7de47a5b 160000 --- a/submodules/Immense.RemoteControl +++ b/submodules/Immense.RemoteControl @@ -1 +1 @@ -Subproject commit ef8d40183c3654d81458eea717d74f6e895f1cc8 +Subproject commit 7de47a5b2eb160ff24254bfb6aab4c504b818a99 From 4cba2974a1d4b6955f275f1d32f730e822ade751 Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Sun, 16 Apr 2023 10:49:56 -0700 Subject: [PATCH 6/7] Fix unattended session in Linux. --- .gitignore | 2 ++ .vscode/launch.json | 24 +++++++++++++++++++ .vscode/tasks.json | 41 ++++++++++++++++++++++++++++++++ Desktop.Linux/Program.cs | 4 ++-- submodules/Immense.RemoteControl | 2 +- 5 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.gitignore b/.gitignore index d8b8da9a..7335d555 100644 --- a/.gitignore +++ b/.gitignore @@ -293,3 +293,5 @@ Server/.config/dotnet-tools.json Server.Installer/Properties/launchSettings.json .DS_Store /Server/wwwroot/Content/Linux-x64/Remotely_Desktop +!/.vscode/launch.json +!/.vscode/tasks.json \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..e0a2830a --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,24 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Linux Desktop", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + "program": "${workspaceFolder}/Desktop.Linux/bin/Debug/net6.0/Remotely_Desktop.dll", + "args": [], + "cwd": "${workspaceFolder}/Desktop.Linux", + "console": "internalConsole", + "stopAtEntry": false + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..aecf4a76 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,41 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/Desktop.Linux/Desktop.Linux.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}/Desktop.Linux/Desktop.Linux.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "watch", + "command": "dotnet", + "type": "process", + "args": [ + "watch", + "run", + "--project", + "${workspaceFolder}/Desktop.Linux/Desktop.Linux.csproj" + ], + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file diff --git a/Desktop.Linux/Program.cs b/Desktop.Linux/Program.cs index a4a931fa..44f6d1d0 100644 --- a/Desktop.Linux/Program.cs +++ b/Desktop.Linux/Program.cs @@ -2,7 +2,7 @@ using System.Threading.Tasks; using System.Threading; using System; -using Immense.RemoteControl.Desktop.Windows; +using Immense.RemoteControl.Desktop.Linux; using Remotely.Desktop.Shared.Services; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; @@ -14,7 +14,7 @@ using Immense.RemoteControl.Desktop.UI.Services; using Remotely.Shared; using System.Diagnostics; -var logger = new FileLogger("Remotely_Deskt", "Program.cs"); +var logger = new FileLogger("Remotely_Desktop", "Program.cs"); var filePath = Process.GetCurrentProcess()?.MainModule?.FileName; var serverUrl = Debugger.IsAttached ? "http://localhost:5000" : string.Empty; var getEmbeddedResult = await EmbeddedServerDataSearcher.Instance.TryGetEmbeddedData(filePath); diff --git a/submodules/Immense.RemoteControl b/submodules/Immense.RemoteControl index 7de47a5b..fcbcde90 160000 --- a/submodules/Immense.RemoteControl +++ b/submodules/Immense.RemoteControl @@ -1 +1 @@ -Subproject commit 7de47a5b2eb160ff24254bfb6aab4c504b818a99 +Subproject commit fcbcde9022dea18ab15ba468f2f3d1832f1a2b9e From 5add34338a5e2210133a4fc67cc0df981138aab8 Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Mon, 17 Apr 2023 11:41:21 -0700 Subject: [PATCH 7/7] Update submodule. --- submodules/Immense.RemoteControl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/Immense.RemoteControl b/submodules/Immense.RemoteControl index fcbcde90..345c43e0 160000 --- a/submodules/Immense.RemoteControl +++ b/submodules/Immense.RemoteControl @@ -1 +1 @@ -Subproject commit fcbcde9022dea18ab15ba468f2f3d1832f1a2b9e +Subproject commit 345c43e03dc8e32cb0d3519a9767dd654ad420ba