Start GUI from shell command line

General support questions
Post Reply
Diorella
Posts: 1
Joined: 2019/12/02 21:55:41

Start GUI from shell command line

Post by Diorella » 2019/12/02 22:29:34

Hi,

I'm a little bit new on CentOS 7. I asked in my work to assign me a Cent0S 7 virtual machine which I connect via SSH, just for learning proposes. I use Open Text Exceed software to run the command line, specially something called xConfig

I wanted to know how I can open a GUI from the command line. I did the installation of gnome-terminal using the yum command and try the startx command, but I have not any luck. I'm confused. I'm not sure what exactly to search in Google.

Is there any guidance I can look to that helps me to install/open a GUI from the command line I use to login to the machine.

I know this is possible some time ago I saw my colleague doing it for Red Hat.

Thanks for your help!

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

Re: Start GUI from shell command line

Post by jlehtone » 2019/12/03 11:54:49

Depends on what you mean.

(most) "GUI applications" are "X11 clients". They talk to "X11 server" that renders "windows" to "monitor".
If your desktop has X11 server, then X11 clients in the VM can send data over network for you to see.
That requires just couple packages in the VM.

If you want to run X11 server on the VM even though it has no monitor, run "GUI Desktop" on top of X11, run applications on that desktop, and see/interact remotely, ... there are multiple options (and I've used none of them). At least "X2go" and "VNC" provide something like that.

tunk
Posts: 625
Joined: 2017/02/22 15:08:17

Re: Start GUI from shell command line

Post by tunk » 2019/12/03 12:27:03

Is GUI software installed on this VM?
I guess these two commands should give some hints about it:
rpm -qa | grep gnome
rpm -qa | grep xorg
Looks like Exceed is an X-server, so you should be able to
start gnome-terminal directly.

pjsr2
Posts: 437
Joined: 2014/03/27 20:11:07

Re: Start GUI from shell command line

Post by pjsr2 » 2019/12/07 17:41:54

Exceed is the X-server thattruns on your WIndows machine.
X-applications running on the Linux host can display them selves on your Exceed X-server. X is a network transparent protocol. X-client applications (like xterm) that run on a remote host can display them selves on your Exceed X-server, provided there are no firewalls in the way. However, the X network protocol is very insecure. That is why in a modern set-up you do not allow X traffic directly on your network. Instead, you let the X messagse be tunneled through SSH.

Check if your ssh client software on the WIndows machine has X-forwarding enabled. Most ssh clients have it disabled by default.
Also check that X-forwarding is enabled in the ssh-daemon on the Linux host.

The Gnome desktop heavily uses dbus communication with the desktop. Some gnome programs may therefor not work very well with an Exceed X-server.

The startx command attempts to start an X-server and in that X-server start an X-session. In your case, you do not want to start an X-server, since the X-server (Exceed) is already running. You only want to start application or an X-session manager/desktop.
If you want to start a complete desktop, not just some X-applications, the Gnome desktop may not be a good choice, since it requires 3D graphics acceleration. I am not sure if Exceed can fulfill this requirement (it is over 10 years ago I used Exceed.) You may want to look at a more light-weight desktop like XFCE or Mate.

Post Reply

Return to “CentOS 7 - General Support”