GNOME 新终端程序尝鲜
终端 GNOME
![](/data/attachment/album/202205/15/094307u71xci9ujbizxdbk.jpg)


几天前，我分享了我 [对新 GNOME 文本编辑器的体验](https://itsfoss.com/gnome-text-editor/)，它是原编辑器 Gedit 的替代品。


但它并不是唯一的应用程序替代品。GNOME 42 还有一个新的终端，叫做 <ruby> <a href="https://gitlab.gnome.org/GNOME/console">  控制台 </a> <rt>  Console </rt></ruby>。


让我来分享一下 GNOME 提供的这个新终端的新功能，以及它的使用体验吧！


### 控制台：GNOME 的新终端模拟器


这个新应用程序的目标是提供一个“简单的、用户友好的终端模拟器”。它确实“简单”，因为它没有提供以往 GNOME 终端下用户习惯的许多功能。


后面我会继续谈这个话题。让我们先看看 GNOME 控制台的新功能。


#### 桌面通知


Ubuntu 上的 GNOME 终端从来没有这个功能，不过我在 elementary 和 Fedora 等发行版中看到过。


这是一个很方便的功能，当一个长期运行的命令执行完毕时，终端会发送一个桌面通知。


![GNOME 控制台的通知](/data/attachment/album/202205/15/094325fp9smd7dgc2d936g.png)


如果你在命令正在运行的同时，需要做其他事情，那么得到命令完成的通知有助于你保持工作效率。


#### 进行 root 和 SSH 操作时改变窗口颜色


这很可能是我在其他终端程序中没有见过的独特功能。


当你用 `sudo` 运行命令或 [切换到 root 用户](https://itsfoss.com/root-user-ubuntu/) 时，应用程序窗口会变成红色。


![GNOME 控制台在使用 sudo 或 root 用户时变成红色](/data/attachment/album/202205/15/094433b5f11qo00f3djml4.png)


我想它的目的是警告用户他们正在使用高级权限，因此在运行命令时要小心。


同样，如果你使用 SSH 连接到一个远程服务器，终端应用程序窗口的颜色会变成紫色。


![GNOME 控制台在 SSH 连接时变成紫色](/data/attachment/album/202205/15/094326ogpnpgipoypu2ywn.png)


这也是提醒用户命令正在远程 Linux 机器上运行，而不是在本地机器上运行的好方法。


#### 主题


遵循新的设计准则，控制台提供了三种主题：浅色、深色和跟随系统。


![GNOME 控制台主题](/data/attachment/album/202205/15/094326x1p77v11vvpntrn5.png)


控制台默认使用系统主题，它根据你的操作系统的深浅主题而改变终端配色。你也可以单独使用控制台的浅色/深色主题，而不用改变系统主题。


关于主题的内容差不多就这些。你可以进行的 [终端定制](https://itsfoss.com/customize-linux-terminal/) 并不多。


### 关闭终端窗口时更好的警告


当你试图关闭一个仍在运行的命令时，老的 GNOME 终端也会显示一个警告。


![旧版 GNOME 终端中的警告](/data/attachment/album/202205/15/094326b1clgdlzlc46lp6n.png)


这个警告在新的 GNOME 控制台中稍好一些，因为它也会显示正在运行的命令。


![新版 GNOME 控制台中的警告](/data/attachment/album/202205/15/094327na6sg1m112g72gpm.png)


#### 透明界面


GNOME 控制台默认有一个透明界面。在正常模式下，你可以透过它看到一点背景。


例如，你可以看到背景程序中的一些模糊的文字。


![GNOME 控制台的透明界面](/data/attachment/album/202205/15/094327w0ye62kj6fjl6uj6.png)


我注意到，当控制台进入全屏模式时，界面不再透明。而且，你无法配置透明度。


#### 其他功能


谢天谢地，你可以在控制台中使用标签。


![标签式界面](/data/attachment/album/202205/15/094327qj97jlhqticaez93.png)


你可以执行与以往 GNOME 终端一样的搜索操作。


![GNOME 控制台中的搜索操作](/data/attachment/album/202205/15/094327jz111u1u86mwqtzu.png)


它没有太多的选项。<ruby> 汉堡菜单 <rt>  hamburger menu </rt></ruby>让你一眼就能看到所有可用的键盘快捷键。


![GNOME 控制台中的键盘快捷键](/data/attachment/album/202205/15/094328xgzxgygxxbxcmodm.png)


以上就是关于 GNOME 控制台的一切。


### 在 Ubuntu 22.04 上安装 GNOME 控制台


如果你的发行版使用了原版 GNOME 42，那么它应该默认提供了新终端。


尽管 Ubuntu 22.04 使用的是 GNOME 42，但它仍然使用旧的 GNOME 终端。不过，你可以使用下面的命令来安装新的控制台。



```
sudo apt install gnome-console

```

### 总结


你可能会想，既然我们已经有了一个更好的、功能更强的 GNOME 终端，为什么还要开发一个新的控制台呢？这是因为 GNOME 有了新的设计指南。改造这些应用程序的旧代码库太复杂了，可能也不大划算，从头开始写反而会更容易，因此你会看到更多的“新的” GNOME 应用程序，如控制台和文本编辑器。


由于这个新的应用程序的目标是让事情更简单，因此它没有提供很多功能。你不能定制它，改变颜色、字体等。由于不支持定制，所以也不需要配置文件。


对于很少使用终端的人来说，控制台已经够用了。不过，我认为应该增加在输入密码时显示星号的功能。其他 [面向初学者的发行版](https://itsfoss.com/best-linux-beginners/)，如 Mint，就使用了这个功能，从而避免对 Linux 新手用户造成困扰。


你如何看待这个新的 GNOME 控制台，以及这种创建“新的 GNOME 应用程序”的方式呢？欢迎在下方评论区发表你的看法。




---


via: <https://itsfoss.com/gnome-console/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lkxed](https://github.com/lkxed) 译者：[lkxed](https://github.com/lkxed) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
A few days ago, I shared my [experience with the new GNOME Text Editor](https://itsfoss.com/gnome-text-editor/) which is a replacement for the older Gedit editor.

But that’s not the only ‘new’ replacement of an older application. GNOME 42 also has a new terminal called [Console](https://gitlab.gnome.org/GNOME/console).

Let me share what’s new in this new terminal offering from GNOME and what it is like to use it.

## Console: GNOME’s new Terminal Emulator

The goal of this new application is to provide a “simple, user-friendly terminal emulator”. And it is indeed a ‘simple’ application in terms that it doesn’t offer many features you are accustomed to in the older application, GNOME Terminal.

I’ll come back to that point later. Let’s first see what’s new in GNOME Console.

### Desktop notifications

GNOME Terminal in Ubuntu never had this feature though I have seen it in distributions like elementary and Fedora.

This is a handy feature that sends a desktop notification when a long-running command finishes its execution.

![notification from gnome console](https://itsfoss.com/content/images/wordpress/2022/04/notification-from-gnome-console.png)

Getting notified of command completion helps you stay productive when you are distracted by something else while the command runs.

### Changes color for root and SSH operations

This is probably a unique feature I haven’t seen in any other terminal application.

The application window turns red when you use a command with sudo or [switch to the root user](https://itsfoss.com/root-user-ubuntu/).

![gnome console turns red when using sudo or root](https://itsfoss.com/content/images/wordpress/2022/04/GNOME-Console-turns-red-when-using-sudo-or-root-800x442.webp)

I presume the idea here is to warn the users that they are using escalated privileges and hence be careful while running the commands.

Similarly, if you connect to a remote server using SSH, the terminal application window color changes to purple.

![gnome console color change ssh](https://itsfoss.com/content/images/wordpress/2022/05/gnome-console-color-change-ssh.png)

This is also a good way to alert the user that the commands are being run on remote Linux machine, not on the local one.

### Themes

Following the new design guidelines, Console offers three theme variants: light, dark and system theme.

![themes gnome console](https://itsfoss.com/content/images/wordpress/2022/04/themes-gnome-console.png)

System theme is used by default and based on whether your OS is using the dark or light theme, it changes the color. With dedicated dark and light options, you can change the theme irrespective of the system theme.

And that’s about it. There is not a lot of [terminal customization](https://itsfoss.com/customize-linux-terminal/) you can perform here.

### Better warning while closing the terminal window

The older GNOME terminal also shows a warning when you try to close a close with commands still running.

![warning in old gnome terminal](https://itsfoss.com/content/images/wordpress/2022/05/warning-in-old-gnome-terminal.png)

This warning is slightly better in the new GNOME Console as it also displays the running commands.

![warning in new gnome console](https://itsfoss.com/content/images/wordpress/2022/05/warning-in-new-gnome-console.png)

### Warning while copy-pasting commands into Console

Do you [copy-paste commands into the terminal](https://itsfoss.com/copy-paste-linux-terminal/)? I do that all the time.

Not always, but sometimes, when you try to copy-paste commands with sudo into Console, it shows a warning:

“You are pasting a command that runs as an administrator. Make sure you know what command does.”

![gnome console command paste warning](https://itsfoss.com/content/images/wordpress/2022/06/gnome-console-command-paste-warning.png)

I believe that idea is to make the application more beginner-friendly. Not that it is going to stop people from using any commands, it’s just a ‘hey, pay attention’ kind of thing and it’s good to have.

### Transparent interface

GNOME Console has a transparent interface by default. In normal mode, you can see the background a little.

For example, you can see some blurred text from the background application:

![transparent gnome console](https://itsfoss.com/content/images/wordpress/2022/04/transparent-gnome-console.png)

What I noticed is that when Console goes into full-screen mode, the interface is no longer transparent. Also, you cannot configure the transparency.

### Other features

You get to use tabs in Console, thankfully.

![tabs gnome console](https://itsfoss.com/content/images/wordpress/2022/04/tabs-GNOME-Console.png)

You can perform a search operation the same as the good old GNOME Terminal.

![search gnome console](https://itsfoss.com/content/images/wordpress/2022/04/search-GNOME-Console.png)

There are not a lot of options here. The hamburger menu allows you to look at all the available keyboard shortcuts at a glance.

![keyboard shortcuts gnome console](https://itsfoss.com/content/images/wordpress/2022/04/keyboard-shortcuts-gnome-console.png)

And that’s everything about the GNOME Console.

## Installing GNOME Console on Ubuntu 22.04

If you are using a distribution that uses vanilla GNOME 42, you should have the new terminal available by default.

Though Ubuntu 22.04 uses GNOME 22.04, it still uses the older GNOME Terminal. However, you can install the new one using this command:

`sudo apt install gnome-console`


## Make GNOME Console the default terminal

If you like GNOME Console so much that you want it as your default terminal, you can do that. The default terminal is what opens with Ctrl+Alt+T shortcut in Ubuntu.

Open a terminal, new or old doesn’t matter, and type the following command:

`sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /usr/bin/kgx 1`


Yes, the executable is /usr/bin/kgx. Once it is available as an alternative, you can [change the default terminal](https://itsfoss.com/change-default-terminal-ubuntu/) with the following command:

`sudo update-alternatives --config x-terminal-emulator`


When asked, enter the number before /usr/bin/kgx (2 in my case as shown in the screenshot below).

![make gnome console default terminal](https://itsfoss.com/content/images/wordpress/2022/05/make-gnome-console-default-terminal.png)

Test it out by using Ctrl+Alt+T keys and see if it opens Console or not.

## Conclusion

You might be wondering why a new Terminal application when we already have a better and more featureful GNOME Terminal. It’s because GNOME has new design guidelines. Transforming the old code base of these applications is too complicated and probably not worth the effort. Writing from scratch is easier and hence you see more ‘new’ GNOME applications like Console and Text Editor.

And as the idea of this new application is to keep things simpler, you don’t get a lot of features here. You cannot customize it, change the color, font, etc. Since there is no scope for customization, there is no need for profiles.

For people who seldom use the terminal, Console is sufficient. Although, I think that they should have added the feature to show asterisks while typing passwords. [Beginner-focused distros](https://itsfoss.com/best-linux-beginners/) like Mint use it to avoid confusing new Linux users.

What do you think of the new GNOME Console and the entire approach of creating ‘new GNOME apps’?