Today, when doing kickstart to configure the automatic answer file, the error is reported as follows
[root@svr7 ~]# system-config-kickstart
Could not open display because no X server is running.
Try running 'system-config-kickstart --help' for a list of options.
The solution is as follows:
Log out of the ssh remote connection and add the -X option when reconnecting to the ssh connection.
ssh -X "host"