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

Ubuntu远程桌面终端异常如何恢复默认设置?及默认修改终端背景色方法

Hey John, let's work through your Ubuntu remote desktop problems and get things back on track. Here's how to resolve the terminal color/icon glitches and set a default terminal background color permanently:

一、恢复系统默认终端与图标配置

Since the issue started after your initial remote connection, resetting the relevant system settings to their factory defaults is the most reliable fix (no manual color tweaking needed):

  1. Reset Terminal to Default Settings
    Open a terminal (even if it's white-backgrounded) and run this command to wipe all custom terminal configurations:

    dconf reset -f /org/gnome/terminal/
    

    This will restore the terminal's original purple background, font settings, and other defaults immediately.

  2. Reset Desktop Icon & Interface Settings
    If your icons are still corrupted after resetting the terminal, reset the GNOME interface defaults to fix icon themes and other visual glitches:

    dconf reset -f /org/gnome/desktop/interface/
    

    You might need to log out and log back in for this change to take full effect.

二、修改Ubuntu终端默认背景色(永久生效)

Once your system is back to normal, you can set a custom default terminal background color using either the graphical interface or command line:

Method 1: Graphical Interface (Easy)

  • Open the terminal, click the menu button (three lines) in the top-right corner.
  • Select Preferences → Go to the Profiles tab (the default profile is usually named "Unnamed").
  • Click the Colors tab, uncheck "Use system theme colors" if it's enabled.
  • Click the color picker next to "Background color" and choose your preferred color.
  • Finally, click Set as Default at the bottom of the Profiles tab to make this the default for all new terminal windows.

Method 2: Command Line (For Automation)

If you prefer using commands, run this to set a custom background color (replace #your-hex-color with your desired color code, e.g., #300a24 for the default purple):

# Get the default profile ID
DEFAULT_PROFILE=$(gsettings get org.gnome.Terminal.Legacy.Profile default | tr -d "'")
# Set the background color
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$DEFAULT_PROFILE/ background-color '#your-hex-color'

For example, to set a dark gray background, use '#2c2c2c'.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.15 06:55:35