### Start from a specific example ID Source: https://github.com/macpaw/macarena/blob/main/README.md Runs 'macos_test.py' starting from a particular example ID within the 'multi_apps' directory of 'macosworld'. ```bash python3 macos_test.py --id 5 --dir ./evaluation_examples/macosworld/multi_apps/ ``` -------------------------------- ### Install VMware Workstation Pro on Windows Source: https://github.com/macpaw/macarena/blob/main/desktop_env/providers/vmware/INSTALL_VMWARE.md Double-click the executable file to start the installation on Windows. Ensure you have administrator privileges. A reboot may be required. ```powershell VMware-workstation-xxxx-xxxxxxx.exe ``` -------------------------------- ### Combine multiple options for macos_test.py Source: https://github.com/macpaw/macarena/blob/main/README.md Demonstrates running 'macos_test.py' with a combination of options, including specifying the VM name, starting example ID, and evaluation directory. ```bash python3 macos_test.py --vm_name macarena --id 10 --dir ./evaluation_examples/macosworld/multi_apps/ ``` -------------------------------- ### Install python-pptx Library Source: https://github.com/macpaw/macarena/blob/main/desktop_env/evaluators/README.md Install the python-pptx library for working with PowerPoint files. ```shell pip install python-pptx ``` -------------------------------- ### Install noVNC Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Installs noVNC, a web-based VNC client, using snap. ```bash sudo snap install novnc ``` -------------------------------- ### Install Ubuntu Desktop Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Installs the ubuntu-desktop package and sets the default target to graphical mode. ```bash sudo apt update sudo apt install ubuntu-desktop sudo systemctl set-default graphical.target ``` -------------------------------- ### Install ffmpeg Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Install ffmpeg to enable video recording of the virtual machine. This is required for capturing experimental sessions. ```sh sudo apt install ffmpeg ``` -------------------------------- ### Run all examples from macosworld Source: https://github.com/macpaw/macarena/blob/main/README.md Executes all evaluation examples located in the specified 'macosworld' directory using the 'macos_test.py' script. ```bash python3 macos_test.py --dir ./evaluation_examples/macosworld/ ``` -------------------------------- ### Install x11vnc Server Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Installs the x11vnc package, a VNC server that can share an existing X display. ```bash sudo apt update sudo apt install x11vnc ``` -------------------------------- ### Install Dummy Video Driver Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Installs the necessary dummy video driver package using apt-get. This is the first step in configuring Xorg for a virtual display. ```bash sudo apt-get install xserver-xorg-video-dummy ``` -------------------------------- ### Install VS Code Extension Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Installs a custom VS Code extension from a .vsix file. This involves downloading the file and using the VS Code UI to install it. ```bash 1. Download the extension from: https://github.com/xlang-ai/OSWorld/blob/04a9df627c7033fab991806200877a655e895bfd/vscodeEvalExtension/eval-0.0.1.vsix 2. Open VS Code 3. Go to Extensions -> ... -> Install from VSIX... -> choose the downloaded eval-0.0.1.vsix file ``` -------------------------------- ### Install OSWorld Server Dependencies Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Installs necessary Python packages and system utilities for the OSWorld server. Ensure you have pip3 installed and requirements.txt available. ```shell sudo apt install python3 pip3 install -r requirements.txt sudo apt-get install python3-tk python3-dev sudo apt install gnome-screenshot sudo apt install wmctrl sudo apt install ffmpeg sudo apt install socat sudo apt install xclip ``` -------------------------------- ### Install python-docx and odfpy Libraries Source: https://github.com/macpaw/macarena/blob/main/desktop_env/evaluators/README.md Install the python-docx and odfpy libraries for working with Word documents and ODF files. ```shell pip install python-docx pip install odfpy ``` -------------------------------- ### Install wmctrl Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Install wmctrl to enable window manager control within the virtual machine. This is necessary for controlling windows during experiments. ```sh sudo apt install wmctrl ``` -------------------------------- ### Enable and Start VNC Services Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Reloads systemd user daemon, enables and starts the noVNC and x11vnc services. ```bash systemctl --user daemon-reload systemctl --user enable novnc.service systemctl --user enable x11vnc.service systemctl --user start x11vnc.service systemctl --user start novnc.service ``` -------------------------------- ### Install socat Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Install socat to enable port forwarding. This is a prerequisite for certain network configurations. ```sh sudo apt install socat ``` -------------------------------- ### Install VMware Fusion on macOS with Apple chips Source: https://github.com/macpaw/macarena/blob/main/desktop_env/providers/vmware/INSTALL_VMWARE.md Open the DMG file and double-click the 'Install Fusion' icon to begin the installation on macOS. You will be prompted for your administrator credentials. ```bash VMware-Fusion-xxxx-xxxxxxx.dmg ``` -------------------------------- ### OSWorld Example Structure Source: https://github.com/macpaw/macarena/blob/main/evaluation_examples/README.md Defines the structure for OSWorld evaluation examples, including task instructions, environment configuration, and evaluation criteria. ```jsonc { "id": "uuid", "snapshot": "snapshot_name", // not used in macOS implementation "instruction": "natural language instruction", "source": "source", // source of the task. maybe some link to the original task description or "own" "config": [{...}, {...}], // list of config steps to prepare the environment before running the trajectory "trajectory": "trajectories/", // path to the trajectory file. OSWorld promised to add it in the future. "related_apps": ["app1", "app2"], // list of related applications "evaluator": { "postconfig": [{...}, {...}], // list of config steps to prepare the environment before running the evaluation "func": "evaluator_function_name", // name of the evaluator function "result": {...}, // expected result for the evaluator function "expected": {...} // expected additional information for the evaluator function }, "proxy": bool, // whether to use proxy (not used in this implementation) "fixed_ip": bool, // whether to use fixed IP (not used in this implementation) "possibility_of_env_change": "low/medium/high" // possibility of environment change during the task (not used in this implementation) } ``` -------------------------------- ### Install pyastpi2 for Accessibility Tree Support Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Installs the pyastpi2 package, which is required for accessing accessibility information and tree structures. Updates package lists and ensures pip is installed. ```bash # Update package list and ensure pip is installed sudo apt-get update sudo apt-get install python3-pip # Install pyastpi2 using pip pip3 install pyastpi2 ``` -------------------------------- ### Example Accessibility Tree Structure Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md A high-level example of the structure of an accessibility tree for a desktop application. ```xml ... ... ``` -------------------------------- ### Manage System Services (Optional) Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Demonstrates how to check the status, disable, and stop system services like unattended-upgrades. This is useful for preventing interference with benchmark examples. ```bash # Check service status sudo systemctl status unattended-upgrades.service # Disable and stop the service sudo systemctl disable unattended-upgrades sudo systemctl stop unattended-upgrades ``` -------------------------------- ### Verify VMware Workstation Pro Installation Source: https://github.com/macpaw/macarena/blob/main/desktop_env/providers/vmware/INSTALL_VMWARE.md Run this command after installation to check if VMware Workstation Pro is installed correctly and the environment variable is set. Successful output lists running virtual machines. ```bash vmrun -T ws list ``` -------------------------------- ### Install Playwright Browser Binaries Source: https://github.com/macpaw/macarena/blob/main/desktop_env/evaluators/README.md After installing the Playwright library, run this command to download the necessary browser binaries required for Playwright to function. ```bash playwright install ``` -------------------------------- ### Copy and Manage OSWorld Service Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Copies the configured service file to the systemd directory, reloads the daemon, enables the service to start on boot, and starts the service. ```shell sudo cp osworld_server.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable osworld_server.service sudo systemctl start osworld_server.service ``` -------------------------------- ### Get Help for macos_test.py Source: https://github.com/macpaw/macarena/blob/main/README.md Displays the help message for the 'macos_test.py' script, showing all available command-line options and their descriptions. ```bash python3 macos_test.py --help ``` -------------------------------- ### Install Accerciser for Manual Accessibility Check Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Install the accerciser tool for manually inspecting the accessibility tree on a GNOME virtual machine. ```sh sudo apt install accerciser ``` -------------------------------- ### macOSWorld Example Structure Source: https://github.com/macpaw/macarena/blob/main/evaluation_examples/README.md Defines the structure for macOSWorld evaluation examples, including pre-task commands, delays, instructions, and evaluator configurations. ```jsonc { "id": "uuid", "snapshot": {...}, // snapshot configuration (not used in this implementation) "force_snapshot_recovery": false, // whether to force snapshot recovery (we always do it in this implementation) "pre_command": "command to run before the task", // command to prepare the environment before running the task "before_action_delay_seconds": int, // delay before starting the task "before_grading_delay_seconds": int, // delay before starting the evaluation "instruction": "natural language instruction", "source": "macosworld", // source of the task "evaluator": [[str, int], ...] // list of evaluators and their rewards. } ``` -------------------------------- ### Run Benchmark with Default Settings Source: https://github.com/macpaw/macarena/blob/main/README.md Executes the main benchmark script 'macos_test.py' with default settings, specifying the directory for evaluation examples. ```bash python3 macos_test.py --dir ./evaluation_examples/osworld/ ``` -------------------------------- ### Install VMware Workstation Pro on Linux Source: https://github.com/macpaw/macarena/blob/main/desktop_env/providers/vmware/INSTALL_VMWARE.md Run this command in the terminal to install VMware Workstation Pro on a Linux system. Replace 'xxxx-xxxxxxx' with the actual version and internal version numbers. ```bash sudo sh VMware-Workstation-xxxx-xxxxxxx.architecture.bundle --console ``` -------------------------------- ### Install UTM using Homebrew Source: https://github.com/macpaw/macarena/blob/main/README.md Installs the UTM application, a virtual machine manager for macOS, using the Homebrew package manager. ```bash brew install --cask utm ``` -------------------------------- ### Verify VirtualBox Installation Source: https://github.com/macpaw/macarena/blob/main/desktop_env/providers/virtualbox/INSTALL_VITUALBOX.md Run this command in your terminal to check if VirtualBox is installed correctly and the VBoxManage command is accessible. ```bash VBoxManage --version ``` -------------------------------- ### Example Accessibility Tree Node Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md An example of a single node within an accessibility tree, showing attributes and content. ```xml
歡迎使用新的 Outlook.com 帳戶
``` -------------------------------- ### Install Playwright for Python Source: https://github.com/macpaw/macarena/blob/main/desktop_env/evaluators/README.md Install the Playwright library for Python using pip. This is the first step to using Playwright for browser automation. ```bash pip install playwright ``` -------------------------------- ### Run CogAgent Server Source: https://github.com/macpaw/macarena/blob/main/mm_agents/llm_server/CogAgent/README.md Execute this command to start the CogAgent LLM server. The server will be accessible at http://127.0.0.1:8000. ```bash python CogAgent.py ``` -------------------------------- ### Get Help for run_general Source: https://github.com/macpaw/macarena/blob/main/README.md Displays the help message for the 'run_general' module, detailing its command-line arguments and usage. ```bash python3 -m runners.run_general --help ``` -------------------------------- ### Install LibreOffice Fonts Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Unzips font files to the system fonts directory. Ensure you have the 'fonts.zip' file downloaded. ```bash unzip fonts.zip -d /usr/share/fonts/ ``` -------------------------------- ### Use a different evaluation directory Source: https://github.com/macpaw/macarena/blob/main/README.md Executes 'macos_test.py' using evaluation examples from a different directory, 'productivity/'. ```bash python3 macos_test.py --dir ./evaluation_examples/macosworld/productivity/ ``` -------------------------------- ### Install Python Packages for Image Processing Source: https://github.com/macpaw/macarena/blob/main/desktop_env/evaluators/README.md Installs necessary Python packages for image processing tasks, including OpenCV, Pillow, and imagehash. ```bash pip install opencv-python-headless Pillow imagehash ``` -------------------------------- ### Setup Conda Environment Source: https://github.com/macpaw/macarena/blob/main/README.md Creates and activates a Conda environment named 'macarena' using the 'environment.yml' file. This isolates project dependencies. ```bash # Create and activate conda environment conda env create --name macarena --file environment.yml conda activate macarena ``` -------------------------------- ### Configure VLC HTTP Interface Settings Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Configure the Lua HTTP settings for VLC's web interface, including setting a password. This is part of the remote control setup. ```sh # Still in Preferences # Navigate to Interface -> Main interfaces -> Lua # Under Lua HTTP: # - Set Password to 'password' ``` -------------------------------- ### Example CSS Selector for Accessibility Tree Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md An example of a CSS selector used to target a specific node within an accessibility tree, demonstrating how to reference elements by attributes. ```css application[name=Thunderbird] page-tab-list[attr|id="tabmail-tabs"]>page-tab[name="About Profiles"] ``` -------------------------------- ### Refresh Font Cache Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Refreshes the system's font cache after installing new fonts. This command requires superuser privileges. ```bash sudo fc-cache -fv ``` -------------------------------- ### Export AWS Subnet ID Environment Variable Source: https://github.com/macpaw/macarena/blob/main/desktop_env/providers/aws/AWS_GUIDELINE.md Export the Subnet ID as an environment variable before starting client code. Both client and host must reside in this subnet. ```bash export AWS_SUBNET_ID=subnet-xxxxxxxxxxxxxxxxx ``` -------------------------------- ### Download Aliyun OSWorld Configuration Script with Passwords Source: https://github.com/macpaw/macarena/blob/main/desktop_env/providers/aliyun/ALIYUN_GUIDELINE.md Use this URL to download the Aliyun configuration script that also sets up SSH and VNC passwords. This script is crucial for a fully configured OSWorld environment on Aliyun ECS. ```bash https://huggingface.co/datasets/xlangai/ubuntu_osworld/resolve/main/aliyun_config.sh?download=true ``` -------------------------------- ### Dummy Driver Configuration (10-dummy.conf) Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md This configuration file specifically sets up the dummy driver for Xorg, defining its device, monitor, and screen settings, including a specific modeline for the desired resolution. ```xorg.conf.d Section "Device" Identifier "DummyDevice" Driver "dummy" VideoRam 32768 EndSection Section "Monitor" Identifier "DummyMonitor" HorizSync 28.0-80.0 VertRefresh 48.0-75.0 Modeline "1920x1080" 172.80 1920 2048 2248 2576 1080 1083 1088 1120 EndSection Section "Screen" Identifier "DummyScreen" Device "DummyDevice" Monitor "DummyMonitor" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1920x1080" EndSubSection EndSection ``` -------------------------------- ### Run General Runner for Automatic Benchmarking Source: https://github.com/macpaw/macarena/blob/main/README.md Launches the 'run_general' module for automatic benchmarking. This command requires specifying VM path, step limits, model details, and API keys. ```bash python3 -m runners.run_general \ --path_to_vm "macarena" \ --max_steps 15 \ --max_trajectory_length 15 \ --history_n 15 \ --test_all_meta_path "evaluation_examples/test_macarena_second_half.json" \ --base_url "" \ --model "ByteDance-Seed/UI-TARS-1.5-7B" \ --sleep_after_execution 3.0 \ --max_pixels 2352000 ; # 3000 * 28 * 28 ``` -------------------------------- ### Xorg Server Configuration (xorg.conf) Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md This configuration file sets up the Xorg server layout, input devices, monitor, and device sections. It specifies the 'modesetting' driver and a default screen resolution. ```xorg.conf Section "ServerLayout" Identifier "X.org Configured" Screen 0 "Screen0" 0 0 InputDevice "Mouse0" "CorePointer" InputDevice "Keyboard0" "CoreKeyboard" EndSection Section "Files" ModulePath "/usr/lib/xorg/modules" FontPath "/usr/share/fonts/X11/misc" FontPath "/usr/share/fonts/X11/cyrillic" FontPath "/usr/share/fonts/X11/100dpi/:unscaled" FontPath "/usr/share/fonts/X11/75dpi/:unscaled" FontPath "/usr/share/fonts/X11/Type1" FontPath "/usr/share/fonts/X11/100dpi" FontPath "/usr/share/fonts/X11/75dpi" FontPath "built-ins" EndSection Section "Module" Load "glx" EndSection Section "InputDevice" Identifier "Keyboard0" Driver "kbd" EndSection Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/input/mice" Option "ZAxisMapping" "4 5 6 7" EndSection Section "Monitor" Identifier "Monitor0" VendorName "Monitor Vendor" ModelName "Monitor Model" HorizSync 28.0-80.0 VertRefresh 48.0-75.0 EndSection Section "Device" ### Available Driver options are:- ### Values: : integer, : float, : "True"/"False", ### : "String", : " Hz/kHz/MHz", ### : "%" ### [arg]: arg optional #Option "SWcursor" # [] #Option "kmsdev" # #Option "ShadowFB" # [] #Option "AccelMethod" # #Option "PageFlip" # [] #Option "ZaphodHeads" # #Option "DoubleShadow" # [] #Option "Atomic" # [] #Option "VariableRefresh" # [] #Option "UseGammaLUT" # [] #Option "AsyncFlipSecondaries" # [] Identifier "Card0" Driver "modesetting" BusID "PCI:0:30:0" VideoRam 256000 EndSection Section "Screen" Identifier "Screen0" Device "Device0" Monitor "Monitor0" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1920x1080" EndSubSection EndSection ``` -------------------------------- ### Download OSWorld Configuration Script Source: https://github.com/macpaw/macarena/blob/main/desktop_env/providers/aliyun/ALIYUN_GUIDELINE.md Download the configuration script to set up SSH and VNC passwords on your Aliyun ECS instance. This script is essential for preparing the instance for OSWorld. ```bash https://gist.githubusercontent.com/qykong/bea58ff98f20057d3a69921276dd4553/raw/cd1a91a0840c4192d793f43cfb90553370343b08/config.sh ``` -------------------------------- ### Check KVM Support on Linux Source: https://github.com/macpaw/macarena/blob/main/desktop_env/providers/docker/DOCKER_GUIDELINE.md Run this command on Linux to verify if your processor supports KVM virtualization. A return value greater than zero indicates support. ```bash egrep -c '(vmx|svm)' /proc/cpuinfo ``` -------------------------------- ### Create User and Grant Sudo Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Adds a new user named 'user' and assigns them to the 'sudo' group for administrative privileges. ```bash sudo adduser user usermod -aG sudo user ``` -------------------------------- ### Initialize and Use PromptAgent Source: https://github.com/macpaw/macarena/blob/main/mm_agents/README.md Initializes a PromptAgent with a specified model and observation type, resets its state, and then predicts a response and actions based on an instruction and observation. Ensure the observation file exists at the specified path. ```python from mm_agents.agent import PromptAgent agent = PromptAgent( model="gpt-4-vision-preview", observation_type="screenshot", ) agent.reset() # say we have an instruction and observation instruction = "Please help me to find the nearest restaurant." obs = {"screenshot": open("path/to/observation.jpg", 'rb').read()} response, actions = agent.predict( instruction, obs ) ``` -------------------------------- ### Modify OSWorld Server Service File Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Updates the osworld_server.service file to correctly set the DISPLAY environment variable and enable DBUS for wallpaper changes. This is necessary due to default X server configurations. ```shell Environment="DISPLAY=:1" Environment="DISPLAY=:0" ``` ```shell Environment="DISPLAY=:0;DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus" ``` -------------------------------- ### Configure LibreOffice Default Save Formats Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Sets default file formats for LibreOffice Writer, Calc, and Impress to modern Microsoft Office formats (.docx, .xlsx, .pptx). Access these settings via Tools -> Options. ```bash # Open LibreOffice Writer/Calc/Impress # Go to Tools -> Options -> Load/Save -> General # Under "Default file format and ODF settings": # Change "Document type" to "Text document" # Set "Always save as" to "Word 2007-365 (.docx)" # Change "Document type" to "Spreadsheet" # Set "Always save as" to "Excel 2007-365 (.xlsx)" # Change "Document type" to "Presentation" # Set "Always save as" to "PowerPoint 2007-365 (.pptx)" ``` -------------------------------- ### Configure Automatic Login (Command Line) Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Enables automatic login for a specified user by editing the GDM3 configuration file. ```bash # Edit the custom configuration file sudo nano /etc/gdm3/custom.conf # Under [daemon] section, add or modify these lines: AutomaticLoginEnable=true AutomaticLogin=user # Save the file and restart the system sudo systemctl restart gdm3 ``` -------------------------------- ### Check APT Periodic Configurations Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Displays the current APT periodic configurations for package list updates and unattended upgrades. This helps in understanding automatic update settings. ```bash # Check current configurations apt-config dump APT::Periodic::Update-Package-Lists apt-config dump APT::Periodic::Unattended-Upgrade ``` -------------------------------- ### Create Python Symlink Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Creates a symbolic link for python to point to python3 if 'python' command is not found. This is a workaround for environments where 'python' is not recognized. ```shell sudo ln -s /usr/bin/python3 /usr/bin/python ``` -------------------------------- ### Aliyun ECS Environment Variables Source: https://github.com/macpaw/macarena/blob/main/desktop_env/providers/aliyun/ALIYUN_GUIDELINE.md Set these environment variables in your .env file for Aliyun ECS configuration. Ensure your Aliyun Access Key ID and Secret are valid and that the region, image ID, instance type, VSwitch ID, and Security Group ID are correctly specified. ```bash # Aliyun Access Credentials ALIYUN_ACCESS_KEY_ID=your_access_key_id ALIYUN_ACCESS_KEY_SECRET=your_access_key_secret # ECS Configuration Information ALIYUN_REGION=eu-central-1 ALIYUN_IMAGE_ID=your_image_id ALIYUN_INSTANCE_TYPE=ecs.e-c1m2.large ALIYUN_VSWITCH_ID=vsw-xxxxxxxxx ALIYUN_SECURITY_GROUP_ID=sg-xxxxxxxxx ``` -------------------------------- ### Check Xorg Session Type Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Verifies if the current session is using Xorg. An output of 'x11' indicates Xorg is active, which is required for certain display functionalities. ```bash echo $XDG_SESSION_TYPE ``` -------------------------------- ### Enable VLC HTTP Interface Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Steps to enable the HTTP interface for remote control of VLC media player. This involves changing settings within VLC's preferences. ```sh # Open VLC # Go to Tools -> Preferences # Show Settings: All (bottom left) # Navigate to Interface -> Main interfaces # Check 'Web' option ``` -------------------------------- ### Edit OSWorld Service Configuration Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Opens the OSWorld service configuration file in nano for editing. Remember to reload the daemon and restart the service after making changes. ```shell sudo nano /etc/systemd/system/osworld_server.service ``` -------------------------------- ### Environment Variable Configuration Source: https://github.com/macpaw/macarena/blob/main/README.md Specifies the content for a '.env' file, which should be placed in the root directory. It includes an API key for accessing models if needed. ```env API_KEY= ``` -------------------------------- ### AWS CLI Configuration Command Source: https://github.com/macpaw/macarena/blob/main/desktop_env/providers/aws/AWS_GUIDELINE.md Configure your AWS CLI with credentials by running the 'aws configure' command and following the prompts for access key ID and secret access key. ```bash aws configure ``` -------------------------------- ### Python IMAGE_ID_MAP Configuration Source: https://github.com/macpaw/macarena/blob/main/desktop_env/providers/aws/AWS_GUIDELINE.md Define a dictionary mapping AWS regions to specific AMI IDs for instance creation. Ensure AMI images are accessible and permissioned. ```python IMAGE_ID_MAP = { "us-east-1": "ami-0d23263edb96951d8" # Add other regions and corresponding AMIs } ``` -------------------------------- ### Basic Playwright Python Script Source: https://github.com/macpaw/macarena/blob/main/desktop_env/evaluators/README.md A simple Python script demonstrating how to launch Chromium, navigate to a URL, and close the browser using Playwright. ```python from playwright.sync_api import sync_playwright def run(playwright): browser = playwright.chromium.launch() page = browser.new_page() page.goto("http://example.com") ## other actions... browser.close() with sync_playwright() as playwright: run(playwright) ``` -------------------------------- ### Enable GNOME Toolkit Accessibility Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Enable toolkit accessibility for applications like Firefox and Thunderbird to view their accessibility tree. This is done using gsettings. ```sh gsettings set org.gnome.desktop.interface toolkit-accessibility true ``` -------------------------------- ### Disable Chrome Keyring Service Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Prevents Chrome from requesting a password on startup by creating an empty keyring file. This ensures uninterrupted experiments. ```bash # Prevent Chrome from using keyring mkdir -p ~/.local/share/keyrings touch ~/.local/share/keyrings/login.keyring ``` -------------------------------- ### Provide Observation with Screenshot and Accessibility Tree Source: https://github.com/macpaw/macarena/blob/main/mm_agents/README.md Updates the observation dictionary to include both a screenshot and accessibility tree data. This is used when the agent's observation type supports multiple data sources. Ensure the observation file exists at the specified path. ```python # continue from the previous code snippet obs = { "screenshot": open("path/to/observation.jpg", 'rb').read(), "a11y_tree": "" # [a11y_tree data] } response, actions = agent.predict( instruction, obs ) ``` -------------------------------- ### x11vnc Systemd Service Configuration Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Defines a systemd user service for x11vnc, specifying its dependencies, execution command, and environment variables to share the display. ```systemd [Unit] Description=X11 VNC Server After=display-manager.service network.target Wants=display-manager.service [Service] Type=simple ExecStart=x11vnc -display :0 -rfbport 5900 -forever Restart=on-failure RestartSec=3 Environment=DISPLAY=:0 Environment=XAUTHORITY=/home/user/.Xauthority [Install] WantedBy=default.target ``` -------------------------------- ### Reload Display Manager Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Restarts the system's display manager service to apply the new Xorg configuration. This command is crucial for the changes to take effect. ```bash sudo systemctl restart display-manager ``` -------------------------------- ### Required Network Ports Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md These ports must be open in the firewall for the virtual machine to function correctly. ```text server_port = 5000 chromium_port = 9222 vnc_port = 8006 vlc_port = 8080 novnc_port = 5910 ``` -------------------------------- ### Fetch URLs from Majestic Million Source: https://github.com/macpaw/macarena/blob/main/mm_agents/gui_som/data_preparation/README.md Execute the Python script to retrieve URLs from Majestic Million and save them to a CSV file. Ensure Python 3 is used. ```bash python3 majestic_million.py ``` -------------------------------- ### Run Scrapy Spider for Data Crawling Source: https://github.com/macpaw/macarena/blob/main/mm_agents/gui_som/data_preparation/README.md Use the Scrapy spider to crawl and collect data from the previously obtained URLs. This script should be executed after the URL fetching step. ```bash python scrapy_crawler.py ``` -------------------------------- ### Environment Variables for AWS Network Interfaces Source: https://github.com/macpaw/macarena/blob/main/desktop_env/providers/aws/AWS_GUIDELINE.md Configure network interface settings including region, subnet ID, and security group ID in a .env file. ```dotenv AWS_REGION=us-east-1 AWS_SUBNET_ID=subnet-xxxx AWS_SECURITY_GROUP_ID=sg-xxxx ``` -------------------------------- ### Verify OSWorld Service Status Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Checks the status of the OSWorld server service to ensure it is running correctly. Use 'journalctl -xe' for troubleshooting if errors occur. ```shell sudo systemctl status osworld_server.service ``` -------------------------------- ### noVNC Systemd Service Configuration Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Defines a systemd user service for noVNC, specifying its dependencies, execution command, and environment variables. ```systemd [Unit] Description=noVNC Service After=x11vnc.service network.target snap.novnc.daemon.service Wants=x11vnc.service [Service] Type=simple ExecStart=/snap/bin/novnc --vnc localhost:5900 --listen 5910 Restart=on-failure RestartSec=3 Environment=DISPLAY=:0 Environment=XAUTHORITY=/home/user/.Xauthority Environment=SNAP_COOKIE=/run/snap.cookie Environment=SNAP_NAME=novnc Environment=SNAP_REVISION=current [Install] WantedBy=default.target ``` -------------------------------- ### Configure Chrome for Remote Debugging Source: https://github.com/macpaw/macarena/blob/main/vm_files/server/README.md Modify Chrome's desktop entry to enable remote debugging on a specific port and address. This ensures consistent debugging port usage. ```sh sudo nano /usr/share/applications/google-chrome.desktop ``` ```sh # Find lines starting with "Exec=" and add the following flags: --remote-debugging-port=1337 --remote-debugging-address=0.0.0.0 ``` -------------------------------- ### Convert XLSX to CSV using LibreOffice Source: https://github.com/macpaw/macarena/blob/main/desktop_env/evaluators/README.md Convert an XLSX file to CSV format using LibreOffice, specifying output directory and sheet number. ```shell libreoffice --convert-to "csv:Text - txt - csv (StarCalc):44,34,UTF8,,,,false,true,true,false,false,1" --out-dir /home/user /home/user/abc.xlsx ``` -------------------------------- ### MacArena Research Citation (BibTeX) Source: https://github.com/macpaw/macarena/blob/main/README.md Use this BibTeX entry to cite the MacArena paper in your academic research. Ensure your citation manager supports BibTeX format. ```bibtex @misc{muryn-etal-2026-aiwild-macarena, author = {Victor Muryn and Maksym Shamrai and Sofiia Mazepa and Yehor Khodysko}, title = {MacArena: Benchmarking Computer Use Agents on an Online macOS Environment}, month = {June}, year = {2026}, eprint = {2606.06560}, eprinttype = {arxiv}, eprintclass = {cs.LG}, url = {https://arxiv.org/abs/2606.06560}, urldate = {2026-06-08}, note = {\emph{Accepted to AIWILD @ ICML 2026}}, } ``` -------------------------------- ### Disable System Crash Report Source: https://github.com/macpaw/macarena/blob/main/desktop_env/evaluators/README.md Disable the system crash report by editing the apport configuration file. ```shell sudo vim /etc/default/apport and then change the `enabled` to `0`. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.