XWD(1)

๐Ÿ“ฆ
version 7.7+11build4 ยท 4 versions
, in alpine 3.24, debian trixie, fedora 43, fedora 44, nixos 26.05, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’… XWD(1) โ€” the girlies' guide to xwd

okay so real talk, the full name of this page is XWD(1) from the General Commands Manual, and the command itself is xwd. it dumps an image of an X window. that's the whole vibe. let's get into it bestie ๐Ÿซถ


โœจ NAME โœจ

xwd โ€” dump an image of an X window


๐ŸŒธ SYNOPSIS ๐ŸŒธ

xwd [-debug] [-help] [-nobdrs] [-out file] [-xy] [-frame] [-add value]
[-root | -id wdid | -name wdname ] [-icmap] [-screen] [-silent]
[-display host:dpy] [-version]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so xwd is an X Window System window dumping utility. it lets X users store window images into a specially formatted dump file โœจ and likeโ€ฆ that file can then be read by a bunch of other X utilities for redisplay, printing, editing, formatting, archiving, image processing, etc. the range?? iconic.

the target window gets selected by clicking the pointer in the desired window. and here's the lil audio cue nobody asked about: the keyboard bell gets rung once at the beginning of the dump and twice when the dump is completed. it's giving notification system from 1987 and honestly? we respect it ๐Ÿ’€


๐ŸŽ€ OPTIONS ๐ŸŽ€

  • -debug โ€” turns on debug mode. that's it, that's the whole thing ๐Ÿ”ฅ
  • -d, -display host:dpy โ€” lets you pick which server to connect to. go read X(7) if you want the deets bestie ๐Ÿ’œ
  • -help โ€” prints out the Usage: command syntax summary. a lil cheat sheet, love that for us โœจ
  • -nobdrs โ€” says the window dump should NOT include the pixels that make up the X window border. super useful when you wanna drop the window contents into a document as an illustration ๐Ÿ–ผ๏ธ
  • -out file โ€” you explicitly name the output file right there on the command line. the default (iykyk) is to output to standard out ๐Ÿ“ค
  • -xy โ€” color displays only!! this one selects XY format dumping instead of the default Z format. pick your fighter ๐ŸŽจ
  • -add value โ€” specifies a signed value to be added to every pixel. every. single. pixel. ๐Ÿ˜Œ
  • -frame โ€” indicates the window manager frame should be included when you're manually selecting a window. frame included, no gatekeeping ๐ŸชŸ
  • -root โ€” the root window gets selected for the dump, no pointer-clicking required. the whole desktop said "I'll go" ๐Ÿ‘‘
  • -id wdid โ€” selects the window with the specified resource id for the dump. again, no pointer selection needed ๐Ÿ†”
  • -name wdname โ€” selects the window with the specified WM_NAME property for the dump. still no pointer action. she's efficient ๐Ÿ’…
  • -icmap โ€” normally the colormap of the chosen window is what's used to obtain RGB values. this option forces the first installed colormap of the screen to be used instead. plot twist ๐ŸŒˆ
  • -screen โ€” indicates the GetImage request used to grab the image should happen on the root window instead of directly on the specified window. why do we care?? because this way you can grab pieces of other windows that overlap the specified window โ€” and more importantly, you can capture menus or other popups that are independent windows but still appear over the specified window. popup capture supremacy fr fr ๐Ÿซถ
  • -silent โ€” operate silently, meaning don't ring any bells before or after dumping the window. peace and quiet, we stan ๐Ÿคซ
  • -version โ€” says xwd should print its version info and then exit. bye bestie ๐Ÿ‘‹

๐ŸŒˆ ENVIRONMENT ๐ŸŒˆ

  • DISPLAY โ€” used to get the default host and display number.

๐Ÿ“ FILES ๐Ÿ“

  • XWDFile.h โ€” the X Window Dump File format definition file ๐Ÿ“„

โญ SEE ALSO โญ


๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

  • Tony Della Fera, Digital Equipment Corp., MIT Project Athena
  • William F. Wyatt, Smithsonian Astrophysical Observatory

these two invented the vibe, no cap ๐Ÿ’–


X Version 11 ยท xwd 1.0.9 โ€” okay that's the whole page bestie, go dump some windows and remember: the bells are part of the experience ๐Ÿ’€๐Ÿ””โœจ

๐Ÿ“ฆ where this page comes from