LinuxAlternative
xrandrLinux vs nircmdWindows

xrandr como alternativa Linux ao nircmd

Atualizado em

Nossa avaliação

xrandr is a strong replacement for the display management aspects of nircmd, but it does not cover the full scope. If your primary use case is scripting monitor resolution, rotation, or layout changes, xrandr is the standard, lightweight tool for X11 environments. However, it lacks capabilities for window manipulation, volume control, or input simulation. For users who only need display configuration automation, it is an excellent fit. For those relying on nircmd for system-wide automation involving windows or audio, you will need to combine xrandr with other tools like wmctrl, amixer, or xdotool to achieve full parity.

Cobertura de recursos40%
Licença
MIT
Preço
Grátis
Versão mais recente
1.5.4
Avaliação
—

O que funciona igual

  • Both are lightweight command-line tools designed for scripting and automation.
  • Both allow dynamic changes to display settings like resolution and orientation.
  • Both support querying the current state of the system configuration.
  • Both are suitable for use in bash or sh scripts.

O que muda

  • xrandr only manages display outputs and does not handle window management (move, resize, focus).
  • xrandr lacks any functionality for system volume control or audio settings.
  • xrandr cannot simulate keyboard or mouse input events.
  • xrandr is specific to X11, whereas nircmd works across various Windows versions without such protocol constraints.
  • xrandr does not set wallpaper or background images.

Abrindo seus arquivos do nircmd

There is no file compatibility between nircmd and xrandr. nircmd is a single executable that accepts arguments, while xrandr is a separate binary with its own syntax. Any scripts written for nircmd must be manually rewritten to use xrandr commands for display tasks and other Linux tools for non-display tasks. There are no import or export files to migrate.

Trocando o nircmd pelo xrandr, passo a passo

  1. Install xrandr using your package manager, e.g., sudo apt install xrandr or sudo dnf install xrandr.
  2. Replace nircmd display commands with xrandr equivalents, such as using xrandr --output HDMI-1 --mode 1920x1080.
  3. Identify alternative tools for missing features, such as wmctrl for windows and amixer for volume.
  4. Rewrite your shell scripts to call these specific Linux utilities instead of the single nircmd binary.
  5. Test your scripts in a non-critical environment to ensure display changes apply correctly.

Principais recursos do xrandr

  • Adjust screen resolution dynamically
  • Enable or disable display outputs
  • Rotate screens (normal, inverted, left, right)
  • Set custom screen positions (left-of, right-of, etc.)
  • Mirror or extend displays
  • Support for multiple monitors
  • Command-line scripting and automation
  • Query current display configuration

Como instalar o xrandr no Linux

Fedorasudo dnf install xrandr
Arch / Manjarosudo pacman -S xorg-xrandr
openSUSEsudo zypper install xrandr

Perguntas frequentes

Can xrandr control which monitor is primary?

Yes, you can use the --primary flag with the output name to designate a specific monitor as the primary display.

Does xrandr work on Wayland?

No, xrandr is an X11 tool. It generally does not function on pure Wayland sessions. You would need to use the wlr-randr tool on wlroots-based compositors or other Wayland-specific utilities.

How do I find my monitor names for xrandr?

Run xrandr without any arguments. The output will list all connected outputs, such as VGA-1, HDMI-1, or DP-2, along with their current status and available resolutions.

Outras 3 alternativas ao nircmd

Todas as alternativas ao nircmd

Avalie o xrandr

Seja o primeiro a avaliar
É um bom substituto do nircmd? 8