Operating System - Linux
1748222 Members
4408 Online
108759 Solutions
New Discussion юеВ

Re: How can a Linux user get a GUI?

 
Doug Brinkman - DRI CMA
Occasional Advisor

How can a Linux user get a GUI?

I have a non-root user who wants to operate in a GUI environment. I'm new to Linux, and know that startx will get root a GUI at the console, but what about other users? User currently is connected via telnet from a windows box. Exceed is installed on the windows box.

Thanks,
Ed
10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: How can a Linux user get a GUI?

Shalom,

The system needs a working gdm.conf file that permits outside access in gui mode.

The file is in /etc/X11/gdm and is very well documented. A couple of changes to it and a GUI login can be done directly

startx should be executable by users:

root@baghdad gdm]# whereis startx
startx: /usr/X11R6/bin/startx /usr/bin/X11/startx
[root@baghdad gdm]# ll /usr/bin/X11/startx
-rwxr-xr-x 1 root root 3174 May 4 06:57 /usr/bin/X11/startx
[root@baghdad gdm]#


Make sure the user sets the DISPLAY variable to point back to her or his workstation.

export DISPLAY=192.168.0.20:0.0

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Thomas Bianco
Honored Contributor

Re: How can a Linux user get a GUI?

for most distributions, switching to runlevel 5 will accomlish that.

if this is a one time thing, simply log in as root and issue the command:
init 5
if this is a more perminant thing, take a look at /etc/inittab for the line that looks like this:
id:3:initdefault:
and change it to
id:5:initdefault:

good luck
There have been Innumerable people who have helped me. Of course, I've managed to piss most of them off.
Thomas Bianco
Honored Contributor

Re: How can a Linux user get a GUI?

I'm sorry, I didn't read the whole question. you'll still need to be in runlevel 5 (which starts the Xwindows environment in multiuser mode), but you'll also need to modify your config as per stephen above.
There have been Innumerable people who have helped me. Of course, I've managed to piss most of them off.
Atul Gautam
Valued Contributor

Re: How can a Linux user get a GUI?

Hi Doug,

Make sure that your server/machine boots in Runlevel 5.

Then, you need to edit the file "/etc/X11/gdm/gdm.conf" and go to the "[xdmcp]" section and make sure you have Enable=True set.

After that, you'll have to export the display as Steve has suggested.



--
Atul
George Liu_4
Trusted Contributor

Re: How can a Linux user get a GUI?

At nowadays, run level 5 normally brings the X windows in most Linux systems.
Jared Middleton
Frequent Advisor

Re: How can a Linux user get a GUI?

What if you have say 100 ChUI telnet end-users and only one or two admin types that occasionally need to login in GUI for maint work. I don't see how booting into runlevel 5 is appropriate here. Back in RH 7.3, I started a VNC server and used startx - worked for root and non-root. But, I'm now on RHEL 4 and old method doesn't work. I haven't spent much time trying to get a remote GUI session working again. Suggestions?
Matti_Kurkela
Honored Contributor

Re: How can a Linux user get a GUI?

Have you ever used SSH with X11 connection forwarding?

Get PuTTY (it's free, google for it) or another SSH client for the windows box.
Ensure that the Linux server has "X11Forwarding yes" in /etc/ssh/sshd_config.

1.) Start up exceed, but don't connect to anything with it - just have it running.
2.) Start up PuTTY, go through SSH mode settings and tick the box named "X11 connection forwarding".
3.) Use PuTTY to connect to the Linux box. Looks like just another telnet-like connection, right?
4.) Run a command that requires GUI. For testing, "xclock &" is good. The window should appear on your screen. To convince yourself you're on the correct host, run a GUI file manager application and take a look around.

Now you can use any GUI tool if you know how to start it from the shell. It may not be as convenient as a remote access to the entire desktop environment, but it uses less bandwidth.

You can get a full desktop session, too: run "startkde" or "gnome-session" (whichever you prefer). You may need to change Exceed to a mode where you're using a separate "remote desktop window" for that.

If you are unfamiliar with SSH, the content of the DISPLAY variable on the remote host might look odd. Don't fiddle with it: it works as is.

The old-style way of setting up a X11 connection requires setting the DISPLAY variable correctly, then fiddling with "xauth" or "xhost" commands. *None* of this is needed with properly-setup SSH: it all happens automatically.

As a bonus, the GUI-related traffic becomes a part of the SSH connection and gets encrypted. No need to open any ports other than 22/TCP for SSH.
MK
Ryan Goh
Frequent Advisor

Re: How can a Linux user get a GUI?

Hi,

Here is the document teach you how to confgure your Exceed to access to your X Windows, URL is http://www.uic.edu/depts/accc/software/exceed/sshexceed.html

Good luck.

George Liu_4
Trusted Contributor

Re: How can a Linux user get a GUI?

Didn't pay attention to his question carefully.
Yes, for a remote X login, most convenient way is to start vnc server on the linux server, and run vnc client in either linux or winodws. You don't need runlevel 5.