How to use the command 'xeyes' (with examples)
- Linux
- November 5, 2023
The ‘xeyes’ command is a simple graphical application that displays a pair of eyes on the screen. These eyes will follow the movement of the mouse cursor, providing a fun and interactive visual experience.
Use case 1: Launching xeyes on the local machine’s default display
Code:
xeyes
Motivation: The motivation for launching xeyes on the local machine’s default display is to observe the eyes following the movement of the mouse cursor in real-time. It can be an entertaining visual display that adds a touch of whimsy to the desktop environment.
Explanation: The command ‘xeyes’ alone is sufficient to launch the application on the local machine’s default display. It utilizes the default display environment settings.
Example Output: Once the command is executed, a window will appear on the screen showing a pair of eyes. These eyes will follow the movement of the mouse cursor as it moves around the screen.
Use case 2: Launching xeyes on a remote machine’s display 0, screen 0
Code:
xeyes -display remote_host:0.0
Motivation: The motivation for using this example is to launch xeyes on a remote machine’s display to observe the eyes following the mouse cursor remotely. This can be useful in situations where you want to showcase xeyes on a different machine or provide a visual demonstration to remote participants.
Explanation: The ‘-display’ argument is used in conjunction with the hostname and the corresponding display number to specify the remote machine’s display to use. In this case, ‘remote_host’ represents the hostname or IP address of the remote machine, and ‘0.0’ represents the display and screen numbers.
Example Output: Once the command is executed, a window will appear on the remote machine’s display. The pair of eyes within the window will then follow the movement of the mouse cursor on the remote machine.
Conclusion:
The ‘xeyes’ command is a fun and interactive graphical application that displays a pair of eyes on the screen, following the movement of the mouse cursor. It can be launched on the local machine’s default display or on a remote machine’s display using the ‘-display’ argument. Whether for entertainment purposes or visual demonstrations, ‘xeyes’ adds a touch of whimsy to the user’s desktop environment.