ENDEBook a demo
← Back to all tasks

Multi-application workflows

I am currently utilizing LibreOffice Writer to compose a Linux tutorial, and I intend to display the outcomes generated by executing the "ls" command in /home/user. Kindly execute this command and save the screenshot of the terminal as 'ls.png' on the Desktop.

Result
Solved
Points
1 / 1
Steps
6
Duration
5 min 33 s

Evaluation criteria

  • Checks that the text recognised in the image contains the expected text.
View the task definition in the OSWorld repository

Final response

Done! I opened a terminal in /home/user, ran `ls` (showing: Desktop, Documents, Downloads, Music, Pictures, Public, requirement.txt, server, snap, Templates, Videos), and captured a screenshot of the terminal window saved as ~/Desktop/ls.png.

Trajectory

  1. Step 10:01

    The task: run `ls` in /home/user, then screenshot the terminal and save as ~/Desktop/ls.png. No terminal is currently open (only LibreOffice Writer is visible). I'll open a terminal, run the command, then capture the window. This is straightforward, so I'll draft and commit the plan in one batch.

    • Plan created
      1. Open a terminal window
      2. Run `ls` in /home/user so its output is visible in the terminal
      3. Capture a screenshot of the terminal window and save it as ~/Desktop/ls.png
    • Plan confirmed3 subgoals
  2. Step 20:37

    I need to open a terminal window first. I'll use the shell tool to launch gnome-terminal in the background so it appears as a visible window. I'll set the working directory to /home/user so that running `ls` there shows the correct listing.

    • Shell commandgnome-terminal --working-directory=/home/user &
    • Wait
  3. Step 31:16

    The terminal is open and showing the prompt at ~ (which is /home/user). I need to type 'ls' and press Enter to run the command.

    • Clickthe terminal window showing the prompt user@user-virtual-machine: ~$
    • Type[typed into password field: 3 characters]
  4. Step 41:49

    Subgoals 1 and 2 are done. Now I need to capture a screenshot of the terminal window and save it as ~/Desktop/ls.png. I'll click the terminal to ensure it's focused, then use gnome-screenshot -w to capture the active window. I'll add a small sleep to ensure focus is established before the screenshot fires.

    • Subgoal completedGNOME Terminal opened in /home/user
    • Subgoal completedls output visible: Desktop, Documents, Downloads, Music, Pictures, Public, requirement.txt, server, snap, Templates, Videos
    • Clickthe terminal window title bar
    • Shell commandsleep 1 && gnome-screenshot -w -f ~/Desktop/ls.png
  5. Step 52:53

    Let me verify the file was created by checking if ~/Desktop/ls.png exists.

    • Shell commandls -la ~/Desktop/ls.png
  6. Step 63:17

    All three subgoals are complete: terminal opened, ls executed in /home/user, and screenshot saved as ~/Desktop/ls.png. Time to finish.

    • Subgoal completedScreenshot saved as ~/Desktop/ls.png (26444 bytes)
    • Reported as completed