LinuxCommandLibrary

xcowsay

Display a message with an animated cow

TLDR

Display a cow saying "hello, world"

$ xcowsay "[hello, world]"
copy

Display a cow with output from another command
$ ls | xcowsay
copy

Display a cow at the specified X and Y coordinates
$ xcowsay --at [X],[Y]
copy

Display a different sized cow
$ xcowsay --cow-size [small|med|large]
copy

Display a thought bubble instead of a speech bubble
$ xcowsay --think
copy

Display a different image instead of the default cow
$ xcowsay --image [path/to/file]
copy

SYNOPSIS

xcowsay [options] [message]

PARAMETERS

-c cowfile
    Specifies the cowfile to use. Cowfiles are usually located in /usr/share/xcowsay.

-d
    Disable word wrapping.

-f font
    Specifies the font to use for the message.

-h
    Display help message.

-l
    List available cowfiles.

-n
    Don't display the cow, only the bubble.

-t time
    Specifies the time (in seconds) the window should be displayed. Defaults to 3 seconds.

-w width
    Specifies the maximum width of the bubble in characters. Defaults to 80.

-x xpos
    Specifies the X position of the window. Defaults to centered.

-y ypos
    Specifies the Y position of the window. Defaults to centered.

-V
    Display version information.

message
    The message to display in the speech bubble. If no message is provided, xcowsay reads from standard input.

DESCRIPTION

xcowsay is a graphical version of the classic `cowsay` command. Instead of printing the speech bubble and cow in the terminal, xcowsay displays them in a separate X window. This window, featuring a cow image and the message, appears on the user's desktop. It supports various options to customize the appearance of the cow and the bubble, allowing users to control the cow's image, color, and the style of the speech bubble.

xcowsay is especially useful in scripts or environments where a visual notification or message is desired, providing a more engaging alternative to terminal-based output. It can be configured to use custom cow images, making it a fun and personalized tool for displaying messages, alerts, or even program output. The program offers a graphical interface which increases usability.

CAVEATS

xcowsay requires an X server to be running in order to display the window. It might not function correctly in environments without a graphical display. The appearance of the cow and bubble might vary depending on the font and window manager used.

ENVIRONMENT VARIABLES

xcowsay respects the DISPLAY environment variable to determine which X server to connect to. If DISPLAY is not set, xcowsay will attempt to connect to the default X server.

COWFILE FORMAT

Cowfiles are text files that define the appearance of the cow. They contain ASCII art representing the cow image, and can also include variables for custom cow features. Users can create or modify cowfiles to personalize the appearance of xcowsay.

HISTORY

xcowsay was developed as a graphical alternative to the classic `cowsay` command. It provides a way to display messages with a cow image in a separate window on the desktop, offering a visual notification method that is more noticeable than terminal output. The command gained popularity due to its fun and customizable nature, making it a favorite for displaying system messages or personal notifications.

SEE ALSO

cowsay(1), cowthink(1)

Copied to clipboard