XSET(1)

๐Ÿ“ฆ
version 7.7+11build1 ยท 3 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

โœจ xset โœจ ๐ŸŽ€

๐Ÿ’– NAME ๐Ÿ’–

okay so xset is the user preference utility for X ๐ŸŒธ. it's how you tweak your display settings, bestie.

๐Ÿงพ SYNOPSIS ๐Ÿงพ

xset [-display display]
[-b] [b {on|off}] [b [volume [pitch [duration]]]]
[-bc] [bc]
[-c] [c {on|off}] [c [volume]]
[+dpms] [-dpms]
     [dpms standby [ suspend [ off]]]
     [dpms force {standby|suspend|off|on}]
[fp=pathlist] [-fp=pathlist] [+fp=pathlist] [fp-pathlist] [fp+pathlist]
[fp default] [fp rehash]
[-led [integer|named indicator]] [led [integer|named indicator]]
[led {on|off}]
[mouse [accel_mult[/accel_div] [threshold]]] [mouse default]
[p pixel color]
[-r [keycode]]  [r [keycode]] [r {on|off}] [r rate delay [rate]]
[s [length [period]]] [s {blank|noblank}]
[s {expose|noexpose}] [s {on|off}] [s default] [s activate] [s reset]
[q]
[-version]

๐ŸŒˆ DESCRIPTION ๐ŸŒˆ

ngl this one is so iconic ๐Ÿ’…. xset is the program you use to set all kinds of user preference options for your display. main character energy, fr fr โœจ๐Ÿ”ฅ


that's the whole page, so I'm done for now. ๐Ÿซถ๐Ÿ’œ

โœจ OPTIONS โœจ

  • -display display ๐Ÿ–ฅ๏ธ โ€” okay so this one picks which X server you want to talk to. Check out X(7) for the full tea on that ๐Ÿ’…
  • b ๐Ÿ”” โ€” this is your bell control babe! It takes up to three numbers, a dash -, or an on/off flag. No numbers or on? You get the system defaults โœจ A dash or off mutes the bell completely ๐Ÿคซ One number sets the volume as a percentage of the max. The second number is the pitch in hertz, and the third is the duration in milliseconds ๐ŸŽถ Heads up, not all hardware can change the bell, but the X server will get as close to your specs as it possibly can ๐Ÿซถ
  • bc ๐Ÿ•ฐ๏ธ โ€” this toggles bug compatibility mode in the server, if the server can do it. Put a dash - in front to turn it off, otherwise it switches on. So here's the thing: some older pre-R4 clients send illegal values in certain protocol requests, and pre-R4 servers didn't catch those errors properly ๐Ÿ’€ Those clients will crash or just not work right with an R4 server. Bug compatibility mode puts those old bugs back into the X server so those clients can still run ๐Ÿ˜ญ Use it with caution though, and new app development should always be done with this mode turned off ๐Ÿšซ Also, the server has to support the MIT-SUNDRY-NONSTANDARD protocol extension for this to work.
  • c ๐ŸŽน โ€” this one controls key click, the little sound your keyboard makes when you type โŒจ๏ธ It can take an optional value, a dash -, or an on/off flag. No parameter or on? System defaults, bestie โœจ A dash or off turns keyclick off completely. A value from 0 to 100 sets the volume as a percentage of the max, and the X server will pick the closest level the hardware can handle ๐Ÿ”Š
  • -dpms ๐Ÿ˜ด โ€” this disables Display Power Management Signaling (DPMS) features. No sleepy screen for you ๐Ÿ™…โ€โ™€๏ธ
  • +dpms โšก โ€” this enables Display Power Management Signaling (DPMS) features. Your screen can finally nap and wake up like a pro ๐Ÿ’œ
  • dpms flags... ๐ŸŒ™ โ€” this lets you set the DPMS parameters. You can give it up to three numerical values, or the force flag followed by a DPMS state. force makes the server switch to that DPMS state right now, no questions asked ๐Ÿ’… The state can be standby, suspend, off, or on. When you pass numbers, they set how many seconds of inactivity go by before each mode kicks in. The first number is for standby, the second is for suspend, and the third is for off ๐Ÿ•’ Setting any of these will automatically turn DPMS on for you. And a value of zero means that particular mode is disabled ๐Ÿšซ
  • fp= path,... ๐Ÿ“‚ โ€” this sets the font path to whatever entries you list in the path argument. The server reads these entries, not the client. Usually they're directory names or font server names, but how they're interpreted depends on the server ๐Ÿงš
  • fp default ๐Ÿ”„ โ€” this resets the font path back to the server's default. Fresh start, no drama โœจ
  • fp rehash ๐Ÿ” โ€” this sets the font path to its current value again, which makes the server reread the font databases in the current font path. This is mostly used after you've added new fonts to a font directory (and run mkfontdir to rebuild the font database) ๐ŸŒธ
  • -fp or fp- ๐Ÿ—‘๏ธ โ€” these remove elements from the current font path. Each one has to be followed by a comma-separated list of entries.
  • +fp or fp+ โž• โ€” these prepend and append elements to the current font path, respectively. Same deal, they need a comma-separated list of entries after them ๐Ÿซถ
  • led ๐Ÿ’ก โ€” this controls the keyboard LEDs, so you can turn one or all of them on or off. It takes an optional integer, a dash -, or an on/off flag. No parameter or on? All LEDs light up โœจ A dash or off turns all of them off. A value between 1 and 32 targets just that one LED, and whether it turns on or off depends on whether there's a dash in front. So xset led 3 would turn LED #3 on, and xset -led 3 would turn it off ๐Ÿ’– Heads up, the LED numbers might point to different LEDs on different hardware, so keep that in mind. If the X server supports the XKEYBOARD (XKB) extension, you can also refer to LEDs by their XKB indicator name. Just use the named keyword followed by the indicator name. For example, to turn on the Scroll Lock LED:
xset led named "Scroll Lock"
  • mouse (or just m) ๐Ÿ–ฑ๏ธ โ€” this controls your mouse parameters. It applies to most pointing devices, not just mice, so don't feel left out, trackpads ๐Ÿซถ The two parameters are acceleration and threshold. Acceleration can be an integer or a simple fraction, and threshold is just an integer. The setting gets applied to every connected pointing device. If you need settings for one specific device, xinput(1) is the move ๐ŸŽฏ

Here's how the pointer behaves by default: it goes acceleration times as fast when the device moves more than threshold mickeys (basically would-be pixels) in 10 ms, and there's a small transition range included too ๐ŸŒˆ This means the pointer is precise when you move slowly, so you can line things up perfectly, but you can also flick it across the whole screen when you want to โœจ You can leave out one or both parameters, but if you only give one, it gets treated as the acceleration. No parameters or the default flag will set the system defaults.

If threshold is given and set to 0, then acceleration gets used in the exponent of a more natural, continuous formula ๐Ÿงฎ You get precise control for slow motion, big reach for fast motion, and a smooth transition in between. The recommended acceleration value here is 3/2 to 3, though it isn't limited to that range.

In the X.org X Server 1.6 and above, everything I just described is tied to the default profile. There are other profiles (functions that work out pointer acceleration from device velocity) and extra settings, so this description might not match those non-default cases ๐Ÿ™ˆ In the X.org Server 1.7, these are available as input device properties (see xinput).

  • p ๐ŸŽจ โ€” this controls pixel color values. The parameters are the color map entry number in decimal, plus a color specification. On some servers you can change the root background colors by changing the BlackPixel and WhitePixel entries. Those are often 0 and 1, but they don't have to be ๐Ÿ‘€ Also, a server might decide to allocate those colors privately, and if that happens you'll get an error. And if the map entry is a read-only color, you'll get an error too, so keep an eye out ๐Ÿšซ
  • r โŒจ๏ธ โ€” this controls autorepeat, the feature where a held key keeps typing on its own. -r or r off disables autorepeat, while r or r on enables it ๐Ÿ” If you follow the -r or r option with an integer keycode between 0 and 255, you can disable or enable autorepeat for just that key. This only works if it makes sense for that particular keycode, and keycodes below 8 usually aren't valid for this command. Example: xset -r 10 will disable autorepeat for the "1" key on the top row of an IBM PC keyboard ๐Ÿ’…

If the server supports the XFree86-Misc extension or the XKB extension, you can use a rate parameter, followed by zero, one, or two numeric values โฑ๏ธ The first number is the delay before autorepeat kicks in, and the second is the repeat rate. When the server supports XKB, the delay is in milliseconds before autorepeat starts, and the rate is how many repeats happen per second. If you leave out the rate or delay, it gets set to the default value.

  • s ๐ŸŒŸ โ€” this lets you set the screen saver parameters. It takes up to two numerical parameters, plus a blank/noblank flag, an expose/noexpose flag, an on/off flag, an activate/reset flag, or the default flag. No parameters or default puts the screen saver back to its default characteristics โœจ The on/off flags simply switch the screen saver functions on or off. activate forces the screen saver to kick in even if it had been turned off, and reset forces it to deactivate if it's currently running ๐Ÿซง The blank flag tells it to blank the video (if the hardware can do that) instead of showing a background pattern, and noblank does the opposite and shows a pattern instead. The expose flag lets window exposures happen (the server can freely discard window contents), while noexpose disables the screen saver unless the server can regenerate the screens without causing exposure events ๐Ÿ™ˆ The length and period parameters decide how long the server has to be inactive before screen saving starts, and how often the background pattern changes to avoid burn-in. Everything here is in seconds. If you only give one numerical parameter, it becomes the length ๐Ÿ’–
  • q ๐Ÿ” โ€” this gives you information about the current settings. Spill the tea ๐Ÿต
  • -version ๐Ÿท๏ธ โ€” this prints the program version and exits right away without doing anything else ๐Ÿ‘‹

These settings get reset to their default values when you log out, so don't panic if things change back ๐Ÿฅน And just a heads up, not all X implementations are guaranteed to honor every single one of these options ๐Ÿ’€

๐Ÿ’– SEE ALSO ๐Ÿ’–

X(7), Xserver(1), xmodmap(1), xrdb(1), xsetroot(1), xinput(1) ๐Ÿฆ‹

โœจ AUTHOR โœจ

okay so the squad behind this page is literally iconic ๐Ÿ’… Here's who made it:

  • Bob Scheifler, MIT Laboratory for Computer Science ๐ŸŽ€
  • David Krikorian, MIT Project Athena, the X11 version ๐Ÿฆ‹
  • David Dawes and Joe Moss added the XFree86-Misc support โœจ
  • Mike A. Harris did the manpage updates, reach him at mharris@redhat.com ๐Ÿ’Œ

the way these people built the foundations that this whole tool sits on ๐Ÿ˜ญ๐Ÿซถ


X Version 11 ๐ŸŒˆ xset 1.2.5 ๐ŸŒธ that's the version I'm working with, bestie, so if your copy says something different, double check before you trust me ๐Ÿ™ˆ Stay cute and go read the real thing whenever you need the exact details ๐Ÿ’œโœจ