# Migrating Robots from Windows to Linux

### Key Points of Migration <a href="#docs-internal-guid-09d8e427-7fff-f1da-07db-e8df11993dcb" id="docs-internal-guid-09d8e427-7fff-f1da-07db-e8df11993dcb"></a>

When migrating a robot from Sherpa Designer in Windows and Linux environments, several important aspects should be considered. If a block is present in Sherpa Designer for both Windows and Linux, no additional actions are required for its migration. The blocks function in PowerShell, which operates the same on both platforms. All classes and functionalities implemented in the robot for Windows are transferred to the Linux environment unchanged.

However, it should be noted that Word and Excel COM objects will not work on Linux-like systems. During migration, it is necessary to check the "Properties Panel" for all blocks related to Word and Excel and uncheck the checkbox: ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdupCiNwd8eGStBBPAjzRQdwQtN3a523jwg63Jj2z4GMOtIQqBNPVc9mr5fB6XEmc31LPd09GyUwJgahmOGNi3DpVeLyLdh4H9MWUtWVipb6xSWAFq3o4YjYcfJrmEpDzILq_vaCg?key=TtSn8mN6zt9mZeisLOBH_ibs). After the user clears the "Use COM" checkboxes, the Word and Excel blocks in the Linux environment will function correctly.

### Differences in File Paths

When working with Linux, it is important to note that file paths have a different format, using a forward slash.

Examples of path separator designations:

* In Linux-like systems, a forward slash is used: /home/user/documents/file.txt
* In Windows, a backslash is used: C:\Users\User\Documents\file.txt

However, absolute paths (such as C: or D:) will not function. Use standard methods to determine the current working directory, such as \`\[Environment]::CurrentDirectory\`. This will allow you to accurately determine where your code is located and help correctly form relative paths. A relative path indicates the location of a file relative to the current working directory. For example, if the current directory is:\
/home/user, then to access the file file.txt in the documents directory, you can use: documents/file.txt.

### Recording Selectors in Browsers and Applications

Regarding recording selectors, the same plugin is used in Yandex Browser/Chromium in the Linux environment as in Windows. It is sufficient to install the plugin following the instructions in the section [Installing the Plugin in Yandex Browser](https://docs.sherparpa.ru/o-platforme-sherpa-rpa/ustanovka-sherpa-rpa/ustanovka-sherpa-rpa-na-astra-linux#ustanovka-plagina-v-yandex-browser).

If the application supports the at-spi (Assistive Technology Service Provider Interface) technology, the robot will work with it directly through selectors, just like in the Windows environment.

### Robot Functionality

There are some limitations related to Sherpa Designer Blocks available in the Linux environment:

| Block Category      | Blocks Not Available in Linux                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| UI Automation       | <p>ClickOnText</p><p>CopyToClipboard</p><p>PasteFromClipboard</p><p>CollectData</p><p>SelectOption</p><p>DragAndDrop</p><p>HighlightElement</p><p>ClearCache</p><p>ControlCache</p><p>GetGridData</p>                                                                                                                                                                                                                                                                                                                                                               |
| Browser Automation  | <p>CopyToClipboardInternet</p><p>PasteFromClipboardInternet</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| HTTP                | <p>InternalBrowserRequest</p><p>GetYandexLinks</p><p>GetGoogleLinks</p><p>InternalAsyncBrowserGet</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| SAP Automation      | <p>SAPCreateConnection</p><p>SAPCloseConnection</p><p>SAPConnectConnection</p><p>SAPSelectWindow</p><p>SAPClick</p><p>SAPPressEnter</p><p>SAPDoubleClick</p><p>SAPSelect</p><p>SAPUnSelect</p><p>SAPState</p><p>SAPCollapse</p><p>SAPExpand</p><p>SAPGetText</p><p>SAPSetText</p><p>SAPColumnCount</p><p>SAPRowCount</p><p>SAPCount</p><p>SAPSapEvent</p><p>SAPExportTable</p><p>SAPImportTable</p><p>SAPGetCellValue</p><p>SAPSetCellValue</p><p>SAPCurrentDate</p><p>SAPSelectRange</p><p>SAPElementExists</p><p>SAPPressF4</p><p>SAPHScroll</p><p>SAPVScroll</p> |
| Dialogs             | <p>ManLoop</p><p>MediaPlayer</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Excel Automation    | FindTextExcel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Outlook Automation  | <p>GetOutlookMailMessages</p><p>SendOutlookMailMessage</p><p>ReSendOutlookMailMessage</p><p>SaveAttachmentsFromOutlookMessage</p><p>SaveMailFromOutlookMessage</p><p>GetOutlookFolders</p><p>MoveOutlookMessage</p><p>ExtractEmailFromOutlookMessage</p><p>LoadMsgFile</p><p>ReplyOutlookMailMessage</p><p>ChangePropertiesMailFromOutlookMessage</p>                                                                                                                                                                                                               |
| Exchange Automation | <p>GetExchangeMailMessages</p><p>SendExchangeMailMessage</p><p>ReSendExchangeMailMessage</p><p>SaveAttachmentsFromExchangeMessage</p><p>SaveMailFromExchangeMessage</p><p>MoveExchangeMessage</p><p>ReplyExchangeMailMessage</p>                                                                                                                                                                                                                                                                                                                                    |
| Clipboard           | <p>GetClipboard</p><p>SetClipboard</p><p>SetFilesClipboard</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Process/Service     | <p>ListServices</p><p>StartService</p><p>StopService</p><p>SetServiceStartupType</p><p>GetWindowState</p><p>SetWindowState</p><p>SetWindowLanguage</p><p>SetWindowPosition</p><p>AttachApplication</p>                                                                                                                                                                                                                                                                                                                                                              |
| Terminal Automation | <p>TerminalConnectSession</p><p>TerminalCloseConnection</p><p>TerminalGetCursor</p><p>TerminalMoveCursor</p><p>TerminalGetTextPosition</p><p>TerminalGetFieldPosition</p><p>TerminalSetTextPosition</p><p>TerminalSetFieldPosition</p><p>TerminalGetField</p><p>TerminalSetField</p><p>TerminalGetScreenArea</p><p>TerminalSendKeys</p><p>TerminalSendControlKey</p><p>TerminalWaitTextPosition</p><p>TerminalWaitFieldPosition</p><p>TerminalGetFieldBetween</p><p>TerminalSetFieldBetween</p>                                                                     |
| Registry            | <p>ReadValueFromRegistry</p><p>WriteValueToRegistry</p><p>ListitemsFromRegistry</p><p>CreatePropertyInRegistry</p><p>RemovePropertyInRegistry</p><p>CreateHiveInRegistry</p><p>RemoveHiveInRegistry</p>                                                                                                                                                                                                                                                                                                                                                             |
| 1C Automation       | <p>1CCreateConnection</p><p>1CCloseConnection</p><p>1CExecuteQuery</p><p>1CExecuteCode</p><p>1CCollectData</p><p>1CTableCellClick</p><p>1CCheckboxControl</p>                                                                                                                                                                                                                                                                                                                                                                                                       |
| RDP                 | <p>RDPGenerateConnection</p><p>RDPCreateConnection</p><p>RDPConnectInstance</p><p>RDPCloseConnection</p><p>RDPDisconnectSession</p><p>RDPOperationFile</p><p>RDPRunScript</p>                                                                                                                                                                                                                                                                                                                                                                                       |
| Windows Credentials | <p>SetWindowsCredentials</p><p>GetWindowsCredentials</p><p>DeleteWindowsCredentials</p><p>GetCyberArkCredentials</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Machine Learning    | <p>RegressionTrain</p><p>RegressionPredict</p><p>ClassificationTrain</p><p>ClassificationPredict</p><p>ClusterTrain</p><p>ClusterPredict</p><p>AnomalydetectionTrain</p><p>AnomalydetectionPredict</p><p>AssistantGenerator</p>                                                                                                                                                                                                                                                                                                                                     |

Some features, such as PiP (Picture-in-Picture) mode, which allows users to view videos or other visual materials in a small window that remains on top of other applications or windows, are not available in Linux, as this is a Microsoft technology.

### Template Engine in Linux

In Linux systems, the Template Engine block works fully. However, if it is necessary to modify the template file, this can only be done in the Windows environment. This is because the Template Engine for Linux is still under development. Currently, some editors, such as Word and specialized tools for designers, use editing features that are temporarily unavailable in Linux. After making changes to the template file in the Windows environment, it will be necessary to create or update a JSON file to reflect these changes in the Template Engine for Linux. After that, the JSON file is uploaded to the system using commands or APIs specific to your environment.

### Web Page Elements

When migrating robots, there may be issues with processing selectors for images, as the robot will not find the images.

In Sherpa Designer, four image recognition methods are used (the "Comparison Type" field):

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdHJVheyJgrSg2EIVsAmN-H_HZTpZ_y4JATYmdRvN_SjMlKUGJUELJi1oIMWwZhV33x8aHdCFD-mBBob-iuuso63cpuX_HBIdlVX8MEsqtF25UAUBBibibGa7755uTr6-UWUminww?key=TtSn8mN6zt9mZeisLOBH_ibs" alt=""><figcaption></figcaption></figure>

* SQDIFF (Squared Difference) - this method calculates the squared difference between the pixels of two images. The smaller the value, the greater the similarity between the images;
* CCORR (Correlation) - this method uses correlation to assess the similarity between images. It gives the best results when the images have the same lighting and contrast;
* CCOEFF (Correlation Coefficient) - this method measures the degree to which two images can be matched based on the correlation coefficient, normalizing the results by their averages;
* NATIVE (default) - this method is preset and is used for quick comparisons using built-in algorithms based on platform features.

If the NATIVE method does not work, it is recommended to use SQDIFF, as Linux-like systems do not have the bitmap of the window image available in Windows.

It is also important that the recording location of the controls matches the screen resolution and color depth; otherwise, the images may be scaled, and the robot will not be able to find them.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sherparpa.ru/en/sherpa-rpa/sherpa-designer/perenos-robotov-s-windows-na-linux.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
