LinuxCommandLibrary

xteddy

Display a teddy bear destroying your windows

TLDR

Display a cuddly teddy bear on your X desktop

$ xteddy
copy

Use the window manager to display the teddy bear and ignore the "quit" (q) command
$ xteddy -wm -noquit
copy

Make the teddy bear stay on top of all other windows
$ xteddy -float
copy

Display another image [F]ile instead of the cuddly teddy bear
$ xteddy -F [path/to/image]
copy

Set the initial location of the teddy bear (width and height are ignored)
$ xteddy -geometry [width]x[height]+[x]+[y]
copy

SYNOPSIS

xteddy [-display display] [-geometry geometry] [-speed n] [-eyes color] [-nose color] [-belly color] [-body color] [-arms color] [-ears color] [-sleep | -awake] [-reverse] [-name name] [-title title] [-iconic] [-xrm resource] [-help] [-version]

PARAMETERS

-speed n
    Sets the animation speed of the teddy bear. A higher numerical value typically results in faster eye movement.

-eyes color
    Specifies the color of the teddy bear's eyes. Can be a color name (e.g., 'blue') or a hexadecimal RGB value (e.g., '#0000FF').

-nose color
    Defines the color of the teddy bear's nose.

-belly color
    Sets the color of the teddy bear's belly.

-body color
    Specifies the main body color of the teddy bear.

-arms color
    Sets the color of the teddy bear's arms.

-ears color
    Defines the color of the teddy bear's ears.

-sleep
    Starts the teddy bear in a 'sleeping' state with its eyes closed. It will 'wake up' if the mouse cursor passes over it.

-awake
    Starts the teddy bear in an 'awake' state, with its eyes open and actively following the mouse cursor. This is often the default behavior.

-display display
    Specifies the X server display to connect to, useful for remote or multi-display setups.

-geometry WxH+X+Y
    Sets the preferred size and position of the teddy bear on the screen. While its size might be fixed, the position (X,Y) might be respected.

-reverse
    Inverts or mirrors the image of the teddy bear horizontally.

-name name
    Specifies the application's instance name, which can be used by X resource files for customization.

-iconic
    Attempts to start the application in an iconified (minimized) state, though this may have limited effect for root window applications.

-title title
    Sets the window title for the application. Similar to -iconic, its visibility may be limited for root window apps.

-xrm resource
    Specifies an X resource string to be loaded, allowing for direct command-line overrides of X resources.

-help
    Displays a brief help message detailing the available command-line options for xteddy.

-version
    Outputs the version information of the xteddy program.

DESCRIPTION

The xteddy command is a delightful X11 application that displays an animated teddy bear directly on the root window of your X desktop. As you move your mouse cursor, the teddy bear's eyes amusingly follow its movement, adding a playful and interactive element to your traditional X session.

Users have the ability to customize various aspects of the bear's appearance, including its body, eyes, nose, and belly colors, as well as adjusting its animation speed. Originally conceived as a fun novelty program, xteddy serves as a historical example of standalone X applications designed for desktop personalization and lighthearted amusement. It showcases the direct interaction capabilities with the X Window System's fundamental root window, allowing for unique desktop embellishments.

CAVEATS

xteddy is an older X11 application that draws directly onto the X root window. This method of display can lead to compatibility issues or visual anomalies in modern desktop environments that extensively use compositing (e.g., GNOME, KDE Plasma with compositing enabled) or alternative display protocols like Wayland (without XWayland). Its functionality may be limited, or it might not appear as expected on such systems. As it is not actively maintained, its future compatibility with evolving display technologies is uncertain.

Options typically associated with standard windowed applications, such as -geometry, -iconic, and -title, might have little to no discernible effect, as xteddy operates as a desktop overlay rather than a traditional framed window.

ROOT WINDOW OPERATION

Unlike most contemporary applications that reside within their own framed windows, xteddy draws directly onto the 'root window' of the X server. The root window is essentially the desktop background, the fundamental canvas upon which all other application windows are drawn. This design choice allows xteddy to appear as an integral part of the desktop background, seamlessly blending in rather than being perceived as a separate, movable application window.

CUSTOMIZATION WITH X RESOURCES

Beyond command-line options, xteddy supports customization through X resources. Users can specify default settings for colors, speeds, and other attributes within their ~/.Xresources or ~/.Xdefaults file. For instance, to set the bear's body color to 'brown' and its eyes to 'black', you could add the following lines:
XTeddy*body: brown
XTeddy*eyes: black
These resources, typically loaded by the X server at startup via xrdb, would then be applied to xteddy whenever it is launched, providing persistent customization.

HISTORY

xteddy represents a charming piece of X11 history, created by E.M. Sager and often included in collections of X11 utilities. Its original intent was not utilitarian, but rather to demonstrate the graphical capabilities of the X Window System and to provide a touch of amusement and personalization to the user's desktop. Its development and widespread usage were most prominent during the late 1990s and early 2000s, an era when direct manipulation of the X root window was a common practice for desktop embellishments. Although it has not seen active development in recent years, xteddy continues to be available in many Linux distribution repositories, serving as both a nostalgic application and a simple demonstration of classic X windowing principles.

SEE ALSO

xeyes(1), xsnow(6), xfireworks(6), xcalc(1)

Copied to clipboard