PDA

View Full Version : Yast2 opens in Menu based instead of GUI



gfellerj
29-Aug-2013, 20:18
Hello,

Just recently for some reason when I try to open Yast2 my Suse Enterprise it opens the menu style yast instead of the GUI. I've read some different articles saying to run xhost + and when I do this I receive "xhost: unable to open display "".

Can anyone advise me on a possible solution?

Thanks alot

malcolmlewis
29-Aug-2013, 20:36
On Thu 29 Aug 2013 07:24:02 PM CDT, gfellerj wrote:


Hello,

Just recently for some reason when I try to open Yast2 my Suse
Enterprise it opens the menu style yast instead of the GUI. I've read
some different articles saying to run xhost + and when I do this I
receive "xhost: unable to open display "".

Can anyone advise me on a possible solution?

Thanks alot




Hi
I'm assuming this is via remote access? If you don't have an X server
running locally it will fall back to the text (ncurses) mode.

--
Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Knowledge Partner - If you find this post helpful and are logged
into the web interface, show your appreciation and click on the
https://forums.suse.com/images/buttons/reputation-40b.png
below.

jmozdzen
30-Aug-2013, 10:41
Hi gfellerj,


Hello,

Just recently for some reason when I try to open Yast2 my Suse Enterprise it opens the menu style yast instead of the GUI. I've read some different articles saying to run xhost + and when I do this I receive "xhost: unable to open display "".

Can anyone advise me on a possible solution?

Thanks alot

per the response from the "xhost" command, your environment has no "DISPLAY" variable set. You can also check this via "echo $DISPLAY".

"DISPLAY" tells all X clients (programs that want to create graphical output) which "X server" to use, in the syntax "host:displaynumber.subdisplaynumer". "host" can be empty and defaults to "localhost", "subdisplaynumber" (including separating dot) can be left out, too, and defaults to ".0". So a typical value for "DISPLAY" would be ":0" for the first X server running on your local system, or i.e. "mypc.company.com:0" when connecting to a remote server from "mypc", havong all output go to you local PC's display. In the latter case, you'll also have to permit your local X server to accept connections from remote clients, in (noadays) two steps:
1. enable your X server to accept connections via TCP (IOW, disable the "-nolistentcp" option for the X server... on a SUSE system, see /etc/sysconfig/displaymanager, DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN="yes")
2. grant permission to access the xserver, i.e. "xhost +" run *on the local system* to enable *any* host to access the display

Then you'll just have to set "DISPLAY" on the remote system to the according value, to redirect the calls to your X server.

Malcolm's comment probably hit the nail - if you "ssh" to your server, per default no "DISPLAY" value gets set, thus leaving you with ncurses mode for YaST. Depending on the exact circumstances, DISPLAY=:0 won't work even if an X server is active on the same server - you'd have to i.e. run "xhost +" in an existing graphical session on that server to grant access.

If you still have difficulties, it probably would help if you could comment on
- where your X server is
- who logged in to that X server
- how you opened the session where you start yast
- the content of "DISPLAY" where you start yast
- the result of "xhost" (without parameters) in a graphical session on that Xserver

Regards,
Jens

gfellerj
30-Aug-2013, 17:28
Hello, I am new to Linux/Suse administration and have always been a windows guy but am trying to learn so bear with me.

I am using Xshell to SSH to the main samba server and then running Yast. The funny thing is it worked fine when I was running windows 7 then I had to sent my laptop for warranty work and it came back with win 8 and I haven't had time to revert it back to 7 and now it doesn't work.

I am logging into that server as an Admin and and am changing to root level and then running yast.

I believe Xserver must be running on the same samba/file server I'm connecting too.

The result of X host with no parameters is still "unable to open display ""

jmozdzen
02-Sep-2013, 18:34
Hi gfellerj,

I'm sorry for the late reply.

Let me give you a simple run-down on how that "X" stuff works:

- you have some application (i.e. YaST) that want to offer a GUI - that's called the "X client"
- the X client on *nix looks for an environment variable named "DISPLAY" - the context usually is ":0" for a local display or "somehost:0" for a remote display (see next lines)
- somewhere there's an "X server" running, which offers to display the graphical stuff sent by the "X client". That server may run on the same box as the client, or remotely

The X server must both be reachable the way that "DISPLAY" on the client proposes (always via TCP/IP for a remote connection, locally a "local socket" will do... usually none of your business) *and* it must permit the connection. You can control access permissions via the "xhosts" command - but let's leave that for a while, until we have sorted out the basics

You say you're connecting via SSH to the machine where YaST runs - I take it that by "it worked fine when I was running windows 7" you meant that you received YaST graphical output on your win7 machine. For this to work, the following had to happen:

- You must have had an X server software running on your Win7 machine (i.e. "Xserver")
- You must have configured permission to access that Win7 X server from either any client machine or at least from that Linux server you're ssh'ing to
- After logging in the the Linux machine via SSH, the DISPLAY variable must have been set in some way pointing to your Win7 machine. (There are quite a number of ways to do this... I wouldn't want to complicate things at this moment, so I'll resist from giving you a complete list of possibilities ;) )

From the error message I deduct that the "DISPLAY" variable is either empty or not set at all - probably the latter. You can verify this easily by entering "echo $DISPLAY" after logging in to the Linux machine... if you get *no* mentionable output, then the variable isn't set... an "empty line" means the variable exists, but is without content (or full of blanks), and if you see some "true output", that's what the variable contains. Could you please perform that test?

The next thing is: If my assumption about the Win7 situation was correct (graphical YaST output on your Win7 machine), then two questions arise:
1. Do you still have some sort of X server installed after the Win8 upgrade?
2. Did your (Win7) SSH software somehow transport the X data from the Linux machine to your Win7 machine and/or cause the DISPLAY variable to be set properly? What SSH software were/are you using (win7/win8)?

> I believe Xserver must be running on the same samba/file server I'm connecting too.

Were this the case, then you'd have to physically switch from your Win7/8 machine to the server console (after starting YaST) to see and operate the graphical output ;) I guess this wasn't the case, was it?

As this can get a bit complicated, are you actually after this for learning purposes, or might you as well work with the curses interface of YaST? In the former case I'll of course guide you through all of this. But in the latter case, we could shorten the discussion substantially :D

Regards,
Jens

PS: Running "xhost" on the Linux machine isn't a required step: You already need to have permission to connect to the X server to use "xhost", that's why it usually called from an existing/local graphical session. Try "xterm" instead - when everything works, you'll see a new command prompt on the X server's display. (If the command just "hangs", it's probably outputting on some unexpected X server - then just kill it with Ctrl-C.)

gfellerj
03-Sep-2013, 21:19
Hello thanks so much for the reply. I'm am just interest in getting it back to how it was since I have a ton of new student users I need to add and I like the gui much better for this.

I am using Xmanager Enterprise 4 which has Xshell which is what I'm using for SSH. I never did install any type of Xserver on my windows 7 machine (at least that I can remember but maybe I had to of.)

When I perform the echo $ display I receive a blank line with no output at all.

When I perform the xterm command I receive
Xter Xt error: Can't open display:
xterm: DISPLAY is not set.

Thanks for helping me sort this out.

gfellerj
03-Sep-2013, 21:35
Okay, I actually followed these instructions here http://www.ece.unm.edu/csg/email/XServer_Putty_Windows7-ECE.pdf to install Xming Server and it is working with Putty now! I haven't tried it with Xshell again but I don't see a reason why I just shouldn't use putty with xming server instead.

smflood
03-Sep-2013, 23:47
gfellerj wrote:

> When I perform the echo $ display I receive a blank line with no output
> at all.

If you did "echo $ display" then that is incorrect - as Jens said, do "echo
$DISPLAY" (where DISPLAY is in uppercase and there is no space between $
and DISPLAY).

HTH.
--
Simon
SUSE Knowledge Partner

jmozdzen
04-Sep-2013, 11:49
Hi gfellerj,

great you got it working and thanks for reporting back!

Regards,
Jens