diff --git a/Desktop.Linux/ViewModels/MainWindowViewModel.cs b/Desktop.Linux/ViewModels/MainWindowViewModel.cs index 59dc4e6bf..6bfa4240d 100644 --- a/Desktop.Linux/ViewModels/MainWindowViewModel.cs +++ b/Desktop.Linux/ViewModels/MainWindowViewModel.cs @@ -142,9 +142,7 @@ public async Task Init() { try { - SessionID = "Installing dependencies..."; - - await Task.Run(InstallDependencies); + await Task.Run(CheckDependencies); SessionID = "Retrieving..."; @@ -236,20 +234,29 @@ private void BuildServices() ServiceContainer.Instance = serviceCollection.BuildServiceProvider(); } - - private void InstallDependencies() + private async Task CheckDependencies() { - var psi = new ProcessStartInfo() + var result = EnvironmentHelper.StartProcessWithResults("bash", "-c \"dpkg -s libc6-dev ; " + + "dpkg -s libgdiplus ; " + + "dpkg -s libxtst-dev ; " + + "dpkg -s xclip\""); + + if (result?.Contains("is not installed", StringComparison.OrdinalIgnoreCase) == true) { - FileName = "bash", - Arguments = "-c \"apt-get -y install libc6-dev ; " + - "apt-get -y install libgdiplus ; " + - "apt-get -y install libxtst-dev ; " + - "apt-get -y install xclip\"", - CreateNoWindow = true, - WindowStyle = ProcessWindowStyle.Hidden - }; - Process.Start(psi); + var commands = "sudo apt-get -y install libc6-dev" + Environment.NewLine + + "sudo apt-get -y install libgdiplus" + Environment.NewLine + + "sudo apt-get -y install libxtst-dev" + Environment.NewLine + + "sudo apt-get -y install xclip" + Environment.NewLine; + + ServiceContainer.Instance.GetRequiredService().SetText(commands); + + var message = "The following commands have been copied to your clipboard. " + + "Please run them to install missing dependencies." + + Environment.NewLine + Environment.NewLine + + commands; + + await MessageBox.Show(message, "Dependencies Required", MessageBoxType.OK); + } } private void ScreenCastRequested(object sender, ScreenCastRequest screenCastRequest) { diff --git a/README.md b/README.md index 3fdb3107b..a1378e2ed 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,6 @@ A remote control and remote scripting solution, built with .NET Core, SignalR Co Website: https://remotely.one Multi-Tenant Demo Server: https://app.remotely.one -## Notice: Work on Remotely will be temporarily stopped. -Recently, I've been overwhelmed with questions and support requests, and Remotely is taking up almost all of my free time. It's been especially taxing with everything that's going in the world right now. I'm taking a break for a while to spend more time with my family. - ## Client Prerequisites: * Endpoint devices require the .NET Core runtime to be installed.