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

如何在GNOME(Wayland)中通过GSettings覆盖禁用客户端窗口装饰?

用GSettings彻底隐藏GNOME窗口装饰的方案

临时测试(仅当前会话生效)

想先试试效果的话,不用重启,直接在终端跑这俩命令:

  • 清空窗口装饰布局,把标题栏所有元素都去掉:
    gsettings set org.gnome.desktop.wm.preferences decoration-layout ''
    
  • 顺便清空按钮布局,确保没残留的控制按钮:
    gsettings set org.gnome.desktop.wm.preferences button-layout ''
    

执行完,当前开着的窗口会立马变样,新打开的窗口也会自动用无装饰样式。

永久全局生效(所有用户通用,重启后保留)

要让所有用户都用这个设置,而且重启也不会丢,就得搞GSettings覆盖文件:

  1. 创建覆盖文件:
    sudo nano /usr/share/glib-2.0/schemas/99-hide-window-decoration.gschema.override
    
  2. 往文件里写这些内容:
    [org.gnome.desktop.wm.preferences]
    decoration-layout=''
    button-layout=''
    
  3. 编译一下GSchema让设置生效:
    sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
    

重启系统后,所有用户的GNOME窗口就都彻底没装饰了。

恢复默认的方法

要是之后想改回去,要么删掉刚才创建的覆盖文件,重新编译GSchema;要么在终端执行:

gsettings reset org.gnome.desktop.wm.preferences decoration-layout
gsettings reset org.gnome.desktop.wm.preferences button-layout

内容的提问来源于stack exchange,提问作者Ixxie

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.26 17:42:07