You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何永久将feh的默认背景颜色设置为黑色?

Permanently Set feh Background to Black Instead of Checkerboard

Got it, let's fix that feh background color permanently so you don't have to type --bg-color black every single time. Feh reads user-specific configuration from a file in your .config directory, so we just need to set that up:

  • First, make sure the feh config directory exists (it might not be created by default):
    mkdir -p ~/.config/feh
    
  • Next, create or edit the feh configuration file with your favorite text editor (I'm using nano here for simplicity):
    nano ~/.config/feh/config
    
  • Add this single line to the file:
    --bg-color black
    
  • Save and exit the editor (in nano, that's Ctrl+O then Enter, followed by Ctrl+X).

That's it! Now whenever you open an image with feh, the background will default to black instead of the default checkerboard pattern. If you ever want to switch back or use a different color, just edit that line in the config file—you can even use hex codes, like --bg-color #000000 for pure black if you prefer that syntax.

内容的提问来源于stack exchange,提问作者M. Knepper

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 10:08:13