Skip to content

Commit

Permalink
Ubuntu fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Apr 18, 2020
1 parent 54d9442 commit 2626231
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
37 changes: 22 additions & 15 deletions Desktop.Linux/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,7 @@ public async Task Init()
{
try
{
SessionID = "Installing dependencies...";

await Task.Run(InstallDependencies);
await Task.Run(CheckDependencies);

SessionID = "Retrieving...";

Expand Down Expand Up @@ -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<IClipboardService>().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)
{
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2626231

Please sign in to comment.