After firewall-config is installed, it cannot be run, prompting (firewall-config:2222): Gtk-WARNING **:

Issues related to configuring your network
User avatar
RedChimae
Posts: 6
Joined: 2023/09/07 05:07:48

After firewall-config is installed, it cannot be run, prompting (firewall-config:2222): Gtk-WARNING **:

Post by RedChimae » 2023/09/07 05:46:33

I am CentOS 7, the kernel version is 3.10.0-1160.el7.x86_64
Execute yum install firewall-config -y with root privileges. After the installation is completed, the GUI management program cannot be run, and the following error message is prompted:

Code: Select all

[root@centos-7-server ~]# firewall-config

(firewall-config:2222): Gtk-WARNING **: 21:29:44.848: cannot open display: 
Please tell me, how can I solve this problem?
It is the world that has been pulled over your eyes to blind you from the truth.

User avatar
TrevorH
Site Admin
Posts: 33224
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: After firewall-config is installed, it cannot be run, prompting (firewall-config:2222): Gtk-WARNING **:

Post by TrevorH » 2023/09/07 10:49:20

First off, start by running yum update as the initial install is from 2020 and is thus 3 years out of date to start with.

The issue otherwise is not specific to firewall-config, it's to do with root not being allowed to use the local desktop display or that it is not running. If you are root then the user that owns the desktop needs to allow root to display on it. If you do not have a GUI - which most servers do not - then firewall-config is the wrong tool and you should be using firewall-cmd instead. That's the cli-only firewalld config tool.

Or alternatively, firewalld is a bloated pig of a product that should have been strangled at birth, use iptables or nftables direct.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
jlehtone
Posts: 4532
Joined: 2007/12/11 08:17:33
Location: Finland

Re: After firewall-config is installed, it cannot be run, prompting (firewall-config:2222): Gtk-WARNING **:

Post by jlehtone » 2023/09/07 13:03:46

RedChimae wrote:
2023/09/07 05:46:33

Code: Select all

(...:2222): Gtk-WARNING **: 21:29:44.848: cannot open display: 
I did just log into virtual console (i.e. non-GUI) with regular account, and tried to run 'gedit', and did get that same error.
GUI applications talk to a window manager -- X11 or Wayland server -- that does the drawing.

If I have a GUI session, then there is server. I can there start a terminal (in GUI window) and within terminal start GUI applications -- they detect the server.
I can also start 'ssh' within terminal, connect to remote machine, and tell ssh to tunnel X11. Applications run on the remote machine can then
use the X11 server of my local computer. Program runs elsewhere, but I see its window on my screen / GUI session.


https://access.redhat.com/documentation ... _firewalls does describe also the use of firewall-cmd.

There is also package rhel-system-roles is the extras repo that has Ansible role for configuring firewall in more declarative manner. Pro: no need to learn about FirewallD; con: have to learn a bit about Ansible.


PS. I've seen fresh born piglets. Really cute after a short while. Can't say the same about "made by people, for the people" FirewallD -- although ideas in it are ok.

User avatar
RedChimae
Posts: 6
Joined: 2023/09/07 05:07:48

Re: After firewall-config is installed, it cannot be run, prompting (firewall-config:2222): Gtk-WARNING **:

Post by RedChimae » 2023/09/07 13:05:54

Is it safe to run yum update? Will it bring compatibility issues to the application services deployed on the current CentOS system?

I used the SecureCRT 9.0 emulation terminal software SSH remote login to run firewall-config on a Windows Server 2019 client in the same LAN.
It is the world that has been pulled over your eyes to blind you from the truth.

User avatar
TrevorH
Site Admin
Posts: 33224
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: After firewall-config is installed, it cannot be run, prompting (firewall-config:2222): Gtk-WARNING **:

Post by TrevorH » 2023/09/07 13:25:09

Is it safe to run yum update? Will it bring compatibility issues to the application services deployed on the current CentOS system?
Wrong question. Is it safe NOT to run yum upate? You are 100% definitely missing security updates on that system now.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
jlehtone
Posts: 4532
Joined: 2007/12/11 08:17:33
Location: Finland

Re: After firewall-config is installed, it cannot be run, prompting (firewall-config:2222): Gtk-WARNING **:

Post by jlehtone » 2023/09/07 13:30:47

Windows does not have "X11 server". (There have been some X11 implementations for Windows, but not from MS -- AFAIK.)
The GUI is thus not readily available. Focus on the CLI options.


The basic ideology of RHEL is that you can install server and run about a decade. That does not mean "no updates".
That means, "security and feature updates do not break the system". That has hold for most of the bits, most of the time.
Some system components remain compatible beyond the major version, to other major version(s).

Furthermore, the 3.10.0-1160.el7 was the first kernel of the current (and last) point update. All the updates released
since have been security (or critical bug) fixes. No feature changes. If some application "breaks" due to those, then
it was buggy to begin with. (It is never a bad idea to have backups.)

User avatar
TrevorH
Site Admin
Posts: 33224
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: After firewall-config is installed, it cannot be run, prompting (firewall-config:2222): Gtk-WARNING **:

Post by TrevorH » 2023/09/07 14:26:24

SecureCRT does not currently include an X11 server product. In order for X11 traffic to be displayed locally on your SecureCRT machine you must already have an X11 server product installed and running ("xming", for example).
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
RedChimae
Posts: 6
Joined: 2023/09/07 05:07:48

Re: After firewall-config is installed, it cannot be run, prompting (firewall-config:2222): Gtk-WARNING **:

Post by RedChimae » 2023/09/09 06:46:37

TrevorH wrote:
2023/09/07 14:26:24
SecureCRT does not currently include an X11 server product. In order for X11 traffic to be displayed locally on your SecureCRT machine you must already have an X11 server product installed and running ("xming", for example).
Thank you so much! Understand, it turns out that the Linux GUI display environment component is missing. It seems that when managing and maintaining Linux, you should stick to the cmd method. There is absolutely no need to try the GUI environment
It is the world that has been pulled over your eyes to blind you from the truth.

User avatar
RedChimae
Posts: 6
Joined: 2023/09/07 05:07:48

Re: After firewall-config is installed, it cannot be run, prompting (firewall-config:2222): Gtk-WARNING **:

Post by RedChimae » 2023/09/09 07:10:40

jlehtone wrote:
2023/09/07 13:30:47
Windows does not have "X11 server". (There have been some X11 implementations for Windows, but not from MS -- AFAIK.)
The GUI is thus not readily available. Focus on the CLI options.


The basic ideology of RHEL is that you can install server and run about a decade. That does not mean "no updates".
That means, "security and feature updates do not break the system". That has hold for most of the bits, most of the time.
Some system components remain compatible beyond the major version, to other major version(s).

Furthermore, the 3.10.0-1160.el7 was the first kernel of the current (and last) point update. All the updates released
since have been security (or critical bug) fixes. No feature changes. If some application "breaks" due to those, then
it was buggy to begin with. (It is never a bad idea to have backups.)
Well, configuring the GUI display environment is really troublesome. I have given up trying firewall-config.

Another question: for the newly installed CentOS-7-x86_64-DVD-2009 system, that is, CentOS 7.9, after the installation and deployment is completed, is it necessary to run yum update to upgrade the system?
It is the world that has been pulled over your eyes to blind you from the truth.

User avatar
RedChimae
Posts: 6
Joined: 2023/09/07 05:07:48

Re: After firewall-config is installed, it cannot be run, prompting (firewall-config:2222): Gtk-WARNING **:

Post by RedChimae » 2023/09/09 07:24:15

TrevorH wrote:
2023/09/07 13:25:09
Is it safe to run yum update? Will it bring compatibility issues to the application services deployed on the current CentOS system?
Wrong question. Is it safe NOT to run yum upate? You are 100% definitely missing security updates on that system now.
What I mean is, should we be cautious about running yum update in a productivity environment where comprehensive application services have been installed and deployed? Because upgrading the system will not only fix bugs, but also bring new bugs and compatibility issues with current applications. This is a very troublesome thing for a productivity environment, or even a disaster!
It is the world that has been pulled over your eyes to blind you from the truth.

Post Reply