diff --git a/docs/secure-connections/sauce-connect-5/installation/linux.md b/docs/secure-connections/sauce-connect-5/installation/linux.md index d643955842..b89e0cd753 100644 --- a/docs/secure-connections/sauce-connect-5/installation/linux.md +++ b/docs/secure-connections/sauce-connect-5/installation/linux.md @@ -21,7 +21,7 @@ defaultValue="ARM64"     {label: 'ARM64', value: 'ARM64'},     {label: 'x86-64', value: 'x86-64'},   ]}> - + ```bash curl -L -o sauce-connect.deb https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect_5.1.1.linux_arm64.deb @@ -41,6 +41,8 @@ sudo dpkg -i sauce-connect.deb ### Edit config file +Edit the configuration file with your favorite editor: + ```bash sudo vim /etc/sauce-connect/sauce-connect.yaml ``` @@ -78,7 +80,7 @@ defaultValue="ARM64"     {label: 'ARM64', value: 'ARM64'},     {label: 'x86-64', value: 'x86-64'},   ]}> - + ```bash sudo rpm -i https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_linux.aarch64.rpm @@ -96,6 +98,8 @@ sudo rpm -i https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5. ### Edit config file +Edit the configuration file with your favorite editor: + ```bash sudo vim /etc/sauce-connect/sauce-connect.yaml ``` @@ -129,7 +133,7 @@ defaultValue="ARM64"     {label: 'ARM64', value: 'ARM64'},     {label: 'x86-64', value: 'x86-64'},   ]}> - + ```bash curl -L -o sauce-connect.tar.gz https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_linux.aarch64.tar.gz @@ -149,7 +153,6 @@ sudo tar -C /opt/sauce-connect -xzf sauce-connect.tar.gz - ### Link the binary ```bash @@ -186,6 +189,7 @@ sudo ln -s /opt/sauce-connect/completions/sc.bash /etc/bash_completion.d/sc This step is optional. You can use default configuration or configure Sauce Connect with flags or environment variables. See [CLI reference](/dev/cli/sauce-connect-5/) for more details. +Edit the configuration file with your favorite editor: ```bash vim /opt/sauce-connect/sauce-connect.yaml diff --git a/docs/secure-connections/sauce-connect-5/installation/macos.md b/docs/secure-connections/sauce-connect-5/installation/macos.md index 6aa75331e5..a746fa9869 100644 --- a/docs/secure-connections/sauce-connect-5/installation/macos.md +++ b/docs/secure-connections/sauce-connect-5/installation/macos.md @@ -24,6 +24,14 @@ brew install sauce-connect This step is optional. You can use default configuration or configure Sauce Connect with flags or environment variables. See [CLI reference](/dev/cli/sauce-connect-5/) for more details. +Get the default configuration file: + +```bash +sc run config-file > sauce-connect.yaml +``` + +Edit the configuration file with your favorite editor: + ```bash vim sauce-connect.yaml ``` @@ -61,7 +69,6 @@ sudo ln -s /opt/sauce-connect/sc /usr/local/bin/sc ### Add completion - >~/.bash_profile This step is optional. You can use default configuration or configure Sauce Connect with flags or environment variables. See [CLI reference](/dev/cli/sauce-connect-5/) for more details. +Edit the configuration file with your favorite editor: + ```bash vim /opt/sauce-connect/sauce-connect.yaml ``` diff --git a/docs/secure-connections/sauce-connect-5/installation/windows.md b/docs/secure-connections/sauce-connect-5/installation/windows.md index 115ae58ba1..510d62247b 100644 --- a/docs/secure-connections/sauce-connect-5/installation/windows.md +++ b/docs/secure-connections/sauce-connect-5/installation/windows.md @@ -8,62 +8,83 @@ import useBaseUrl from '@docusaurus/useBaseUrl'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -### Unpack the zip file +## With winget - - +On Windows 10 and newer you can install Sauce Connect with the builtin [winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/) package manager. +This is the recommended way to install Sauce Connect on Windows. -```bash -mkdir C:\sauce-connect -Invoke-WebRequest -Uri https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_windows.aarch64.zip -OutFile sauce-connect.zip -Expand-Archive -Path sauce-connect.zip -DestinationPath C:\sauce-connect +### Install + +Open Terminal and run the following command to install Sauce Connect: + +```powershell +winget install SauceLabs.SauceConnect ``` - - +### Set sc alias -```bash -mkdir C:\sauce-connect -Invoke-WebRequest -Uri https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_windows.x86_64.zip -OutFile sauce-connect.zip -Expand-Archive -Path sauce-connect.zip -DestinationPath C:\sauce-connect +Sauce Connect for Windows installs the `sauce-connect` command not `sc`. +This is due to the fact that the `sc` command is already used by the system. +To work around this issue, you can set an alias for the `sauce-connect` command. + +In Terminal run the following command to permanently set the `sc` alias for `sauce-connect`: + +```powershell +if (-Not (Test-Path -Path $PROFILE)) { + New-Item -ItemType File -Path $PROFILE -Force +} +Add-Content -Path $PROFILE -Value "Set-Alias -Name 'sc' -Value 'sauce-connect' -Option 'AllScope' -Force" ``` - - +Open a new Terminal window to use the `sc` command for Sauce Connect. -### Add the binary to PATH +### Add command completion -Add `C:\sauce-connect` to `PATH` environment variable. +In Terminal run the following script to add `sc` command completion to PowerShell: -```bash -$currentPath = [System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine) -$newPath = "$currentPath;C:\sauce-connect" -[System.Environment]::SetEnvironmentVariable('PATH', $newPath, [System.EnvironmentVariableTarget]::Machine) +```powershell +if (-Not (Test-Path -Path $PROFILE)) { + New-Item -ItemType File -Path $PROFILE -Force +} +Add-Content -Path $PROFILE -Value "Invoke-Expression (sauce-connect completion powershell | Out-String)" ``` -### Add completion +Open a new Terminal window to use the `sc` command with completion. + +### Edit config file + +This step is optional. You can use default configuration or configure Sauce Connect with flags or environment variables. +See [CLI reference](/dev/cli/sauce-connect-5/) for more details. -Open PowerShell and check if you already have a profile. +Get the default configuration file: -```bash -Test-Path $PROFILE +```powershell +sc run config-file > sauce-connect.yaml ``` -If the command returns `False`, create a new profile. +Edit the configuration file with your favorite editor: -```bash -New-Item -ItemType File -Path $PROFILE -Force +```powershell +notepad sauce-connect.yaml ``` -Add PowerShell completion to the profile. +### Start Sauce Connect + +```powershell +sc run --config-file sauce-connect.yaml +``` + +## With zip package + +Sauce Connect provides `.zip` package that can be used on older Windows versions that do not support winget. + +### Unpack the zip file -```bash -Add-Content -Path $PROFILE -Value ". C:\sauce-connect\completions\sc.ps1" +```powershell +mkdir C:\sauce-connect +Invoke-WebRequest -Uri https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_windows.x86_64.zip -OutFile sauce-connect.zip +Expand-Archive -Path sauce-connect.zip -DestinationPath C:\sauce-connect +Rename-Item -Path C:\sauce-connect\sauce-connect.exe -NewName C:\sauce-connect\sc.exe ``` ### Edit config file @@ -71,12 +92,21 @@ Add-Content -Path $PROFILE -Value ". C:\sauce-connect\completions\sc.ps1" This step is optional. You can use default configuration or configure Sauce Connect with flags or environment variables. See [CLI reference](/dev/cli/sauce-connect-5/) for more details. -```bash -notepad C:\sauce-connect\sauce-connect.yaml +Get the default configuration file: + +```powershell +cd C:\sauce-connect +./sc.exe run config-file > sauce-connect.yaml +``` + +Edit the configuration file with your favorite editor: + +```powershell +notepad sauce-connect.yaml ``` ### Start Sauce Connect -```bash -sc.exe run --config-file C:\sauce-connect\sauce-connect.yaml +```powershell +./sc.exe run --config-file sauce-connect.yaml ```