You are not logged in.

#1 2019-04-30 02:36:56

alysher
Member
Registered: 2017-07-31
Posts: 56

[Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

i have a Linux server that i ssh into from a variety of devices. i properly have my windows system setup with xming and putty for forwarding xwindows. it works just fine.

however i have a laptop with arch linux that i would like to forward x11 to as well, its setup so its at the command prompt at login. when ever i ssh into the server with the -X or -Y option i get 'X11 Forwarding requested but DISPLAY not set' and attempting to run xterm(or i just use startxfce4) gives me a bunch of text on screen but no xwindows.

now i have googled, searched and looked over the wiki, but im at a total loss as to what im missing to get my linux laptop to run the servers xwindows...

and since my previous post was deleted and i was unable to answer the questions, here are the details of the systems.

REMOTE:
Debian GNU/Linux 8 (jessie)

CLIENT 1: Windows 10

Client 2: Arch Linux

Remote has a complete xwindows system(this includes xauth and xhost). i can run it remotely from Client 1. Client 2 has xauth on it, however i still have the "X11 Forwarding requested but DISPLAY not set" error


Edit: also I must apologize to Jason. I dislike public apologies however I should not have done what I did.

Last edited by alysher (2019-04-30 23:07:17)


I started learning linux under Debian, and this is what I hope for every time I interact with the awesome Arch community.

Offline

#2 2019-04-30 03:02:55

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

Client 2 needs to have and to be running Xorg.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2019-04-30 03:08:54

alysher
Member
Registered: 2017-07-31
Posts: 56

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

Client 2 has a full install of xfce4.(laptop)

Like I said earlier I'm at a loss. Its been frustrating me for a week. My apologies if I'm a bit short.

Any information you need I can and will provide, just let me know what is needed.


I started learning linux under Debian, and this is what I hope for every time I interact with the awesome Arch community.

Offline

#4 2019-04-30 03:49:06

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

Then what does this mean:

alysher wrote:

its setup so its at the command prompt at login

Are you running ssh on the arch client from a tty or from a X11 terminal emulator?

If the latter, what is the output of `echo $DISPLAY`?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2019-04-30 03:54:49

alysher
Member
Registered: 2017-07-31
Posts: 56

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

It means that I don't use a graphical login screen. It boots to cli. I use 'startxfce4' to start x windows.

Edit:The tty is where I'm at when trying this.

Last edited by alysher (2019-04-30 04:00:15)


I started learning linux under Debian, and this is what I hope for every time I interact with the awesome Arch community.

Offline

#6 2019-04-30 04:03:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

There's the problem.  This needs to run from within an X11 session - or at very least you need to export the DISPLAY variable of the locally running server for ssh to connect to.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2019-04-30 04:28:45

alysher
Member
Registered: 2017-07-31
Posts: 56

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

Ok, so how do I do that? Is there a wiki page for it?

Edit: 'that' being "...or at very least you need to export the DISPLAY variable of the locally running server for ssh to connect to."

Last edited by alysher (2019-04-30 04:31:37)


I started learning linux under Debian, and this is what I hope for every time I interact with the awesome Arch community.

Offline

#8 2019-04-30 06:24:30

seth
Member
Registered: 2012-09-03
Posts: 58,300

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

a) is there a running X11 server on the client (arch)?
If not, this is a non-starter. The remote X11 clients need a server to talk to and that has to run on the local machine.
b) if so and you just want to establish the ssh connection from the local TTY for some reason, "man export" - the server name is typically ":0", but you should read it from the graphical session (where it'll be set)
It's also possible to copy the variable from a specific running process, but at this point it's relevant what you're actually trying to do and why you're (apparently) not running this from an X11 session itfp.

Online

#9 2019-04-30 12:03:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

seth wrote:

but at this point it's relevant what you're actually trying to do and why you're (apparently) not running this from an X11 session itfp.

Agreed.  Alysher, what do you expect to happen when you run the ssh command from a tty?  If you expect it to start a new x11 session, it will not.  It requires that xorg already be running and it needs (at least) the DISPLAY variable to connect to the running x server on the client.  So the graphical programs executed on the remote host will be displayed in your xfce session.

If you want a new/second X session for the remote host's program(s) then you first need to start X again, most likely by putting your ssh command in an .xinitrc and using startx/xinit from the tty.  But again, this all depends on what you are really trying to accomplish.

Last edited by Trilby (2019-04-30 12:05:57)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#10 2019-04-30 17:52:01

alysher
Member
Registered: 2017-07-31
Posts: 56

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

My apologies if I'm unclear here, but what I am trying to do is what I do with xming+putty on my windows machine: startxfce4.

The server(remote) has a complete install of xfce4, I use it through xming+putty to do tasks that are easier to do with a gui over cli. I want to do the same with the arch linux laptop(client2). However I don't want to run a complete instance of xwindows on client 1, just enough so that the remote can display its gui on the client

Last edited by alysher (2019-04-30 17:53:20)


I started learning linux under Debian, and this is what I hope for every time I interact with the awesome Arch community.

Offline

#11 2019-04-30 18:25:48

seth
Member
Registered: 2012-09-03
Posts: 58,300

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

https://en.wikipedia.org/wiki/Xming *is* a "complete instance of xwindows" (it's an X11 server for windows), it doesn't work otherwise.
You don't have to install a desktop environment etc. but xorg-server is absolutely mandatory and you may also want some xf86-video-* driver and maybe some xf86-input-* thing.
Something has to operate the hardware and provide the display server.
You *can* use startx/xinit to run the server and ssh from an init script or remote control the server from a tty, but a server *has* to running (and is on your windows setup)

I will mention that running a complete desktop shell this way is probably not the best approach (the fat toolkits and let alone compositors, if they work at all, render all sorts of stuff in the client and xputimage/gl_texture_from_pixmap it onto the server, ie. there'll be a lot of traffic. The VNC is usually far more efficient in this scenario)

Online

#12 2019-04-30 18:45:34

alysher
Member
Registered: 2017-07-31
Posts: 56

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

Client and server for xwindows confuses the crap out of me, so please forgive if I'm using the wrong word....

Xming is a complete is a complete server for x11, not a complete xwindows system, correct?

If so, then what I want to do is temporarily turn my laptop(client2) into an x11 server, then ssh the command 'startxfce4' and have the laptop(client2) be the screen/mouse/keyboard for the server(remote).

Last edited by alysher (2019-04-30 18:46:55)


I started learning linux under Debian, and this is what I hope for every time I interact with the awesome Arch community.

Offline

#13 2019-04-30 19:01:36

seth
Member
Registered: 2012-09-03
Posts: 58,300

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

Depends on what you consider a "complete xwindows system" to be. It's a server and protocol implementation. That is "complete" as far as X11 is concerned.
You cannot *temporarily* turn the client into an X11 server (the logics here are btw. typically reversed, clients run the display server and the server runs the X11 clients :-)

You have to provide an X11 display server all the time some clients (xfce, all of it) shall appear on that system.
How exactly that server is started is a matter of personal preference (ask Trilby abotu xinit ;-)

You however do not need anything else, in particular no local X11 clients, but you MUST run a server and you MUST inform ssh (and thus the remote clients) where this server can be found.

Online

#14 2019-04-30 21:28:29

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

startxcfe4 just adds confusion, it is a wrapper that starts Xorg (the X11 server) and some clients including the WM.

You need to separate these steps rather than using that single monolithic wrapper.  Start Xorg on your local client, then from within that x session, you can ssh and start xfce4wm stored on the remote machine.  This is done as described above: use xinit/startx and add the ssh command(s) to your .xinitrc.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#15 2019-04-30 22:49:22

alysher
Member
Registered: 2017-07-31
Posts: 56

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

Normally i describe a complete xwindows system to include the window manager(cause without it you cant do much).

Trilby wrote:

startxcfe4 just adds confusion, it is a wrapper that starts Xorg (the X11 server) and some clients including the WM.....

this is where i was confused. i didnt know that the command 'startxfce4' started both the server and client. i was under the impression that the server part was always running.

with my xming+putty windows system i actually use the command 'startxfce4' as  the command sent through putty. i didnt know that in effect im starting a second xorg, instead of just the WM.

Ty Trilby and seth. this thread is solved now. since this has gotten away from my original question ill do a new post for actually figuring out how to separate xorg and the wm from my command. TY again.


I started learning linux under Debian, and this is what I hope for every time I interact with the awesome Arch community.

Offline

#16 2019-04-30 23:44:28

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

Actually it's a little of both - at least last time I tinkered with xfce, which admittedly was quite a while back.  If you run startxfce4 from within X (e.g., in an xinitrc) it will not start a second Xorg server, instead it will connect to the existing one (most likely by detecting the DISPLAY variable).  But if you run startxfce4 from outside of an active X session, it will then start a server first, then the WM client(s).

So xming may not be starting an additional xorg server process when you use startxfce4, but that's because that command is running in an environment with an active connection to an X11-compatible display server (e.g., xming).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#17 2019-05-01 05:59:54

alysher
Member
Registered: 2017-07-31
Posts: 56

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

sigh, you guys sure do like that dustbin. im trying to understand this and be polite, but when you treat people like they are idiots for being confused or not understanding things, it gets difficult.

i was under the impression since we have strayed from the original topic, i needed to start a new one. also how has this been explained? there are no step by step instrunctions. no list of commands given. no links with "read this" to figure out for myself on how to do this. im not a mind reader, but i am dense. and i dont even know what to call what im trying to do. most times i can figure it out, but this is literely giveing me headaches.

now if you are still willing to help me and not toss me in the dust bin, lets start with 'startxfce4' i have no idea where this script is kept, wiki doenst say. xfce4 website dont say. tried google and nothing.(or i missed it)

Last edited by alysher (2019-05-01 06:01:00)


I started learning linux under Debian, and this is what I hope for every time I interact with the awesome Arch community.

Offline

#18 2019-05-01 06:19:48

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

alysher wrote:

there are no step by step instrunctions. no list of commands given...


That's not how this community works. You are expected to want to help yourself, not just expect to be spoonfed.

startxfce is probably just a script. You could start by reading it. If you don't know where to find it, pacman can list all the files that a package installs.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#19 2019-05-01 09:14:43

alysher
Member
Registered: 2017-07-31
Posts: 56

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

Your right Jason, that's not how this community works.

I also asked where startxfce4 lives. I'm still learning how use pacman effectively, can I get an example of how to do that?


I started learning linux under Debian, and this is what I hope for every time I interact with the awesome Arch community.

Offline

#20 2019-05-01 10:23:12

loqs
Member
Registered: 2014-03-06
Posts: 18,012

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

to show what the shell call resolves to

type startxfce4

alternately using the pacman file database

# pacman -Fy
$ pacman -Fs startxfce4

Last edited by loqs (2019-05-01 10:23:43)

Offline

#21 2019-05-01 11:44:52

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,381
Website

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

This is also explained in the wiki: https://wiki.archlinux.org/index.php/Pa … cific_file


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#22 2019-05-01 13:01:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

Alegedly, you already have xfce and thus startxcfe4 on your debian server.  It should be at /usr/bin/startxfce4 on that debian server - that's where it "lives".  You've also said you have xfce installed on the arch client - but from the little we've heard about your actual goals this is unnecessary.

This last part is the point.  You came here with specific questions that were quickly answered.  But you never really clarified what you're end goal was so we were just chasing XY problems.

You have not been given step by step instructions or a list of commands for two reasons: in addition to it not generally being how things work here, it's also literally impossible.  I can imagine about a dozen totally different approaches that would satisfy the vague requirements/goals as they've been laid out.  Should we really go through the steps of each one in detail to have each one shot down as not what you really want?  Tell us what you want first, then we can proceed.

The point we've reiterated over and over is that Xorg (X11 server) must be running on the arch client.  This is true of every possible solution.  We've also emphasized that the ssh command should most likely be run from within the running X11 session on the arch client - while some approaches do not specifically require it, most do, an we're assuming you aren't pursuing one of those rare corner cases where one might actually need to run ssh with X forwarding from a tty.

So help us stop guessing and assuming and lay out your actual goals.  And by this I mean the actual end results you wish to acheive, not the steps you think might get you there.

Also keep in mind that we are here to help with technical problems.  We are all well aware that struggling with technical problems can be frustrating - so we often give some leeway when someone looking for help is frustrated ... some.  But the frustration is your problem not ours, we are no here to help with that.  If you focus on the technical issues, you will find you'll get a lot of information here.  If you focus on venting your frustration (what your very first thread did, and what is just starting to peak out here) you will find that most members here will stop helping, and even stop confronting, and you'll instead be met with dead silence.  In otherwords, most of us enjoy working on technical problems, but we've all got our own frustrations and have no need for anyone elses.

Last edited by Trilby (2019-05-01 13:06:34)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#23 2019-05-01 13:05:18

seth
Member
Registered: 2012-09-03
Posts: 58,300

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

Trilby wrote:

And by this I mean the actual end results you wish to achieve, not the steps you think might get you there.

On that particular aspect:

seth wrote:

I will mention that running a complete desktop shell this way is probably not the best approach (the fat toolkits and let alone compositors, if they work at all, render all sorts of stuff in the client and xputimage/gl_texture_from_pixmap it onto the server, ie. there'll be a lot of traffic. The VNC [approach] is usually far more efficient in this scenario)

Online

#24 2019-05-01 23:28:43

alysher
Member
Registered: 2017-07-31
Posts: 56

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

Ty loqs that helps. The script is in /usr/bin/. I'm attempting to make sense of it now. Ty again.


I started learning linux under Debian, and this is what I hope for every time I interact with the awesome Arch community.

Offline

#25 2019-05-01 23:41:06

alysher
Member
Registered: 2017-07-31
Posts: 56

Re: [Solved]'X11 Forwarding requested but DISPLAY not set' issue *repea...

Trilby wrote:

And by this I mean the actual end results you wish to achieve, not the steps you think might get you there.

My actual end result that I want is to have the remote use the display, mouse and keyboard of the client as if it were actually attached to the remote.


On that particular aspect:

seth wrote:

I will mention that running a complete desktop shell this way is probably not the best approach (the fat toolkits and let alone compositors, if they work at all, render all sorts of stuff in the client and xputimage/gl_texture_from_pixmap it onto the server, ie. there'll be a lot of traffic. The VNC [approach] is usually far more efficient in this scenario)


Unfortunately, using a vnc scenario for this client isn't really that practical. Iirc the memory requirements are quite high. This client only has 2gb ram.


Also my apologies if I'm unclear and/or vague. I have ASD and expressing myself gets difficult sometimes.

Last edited by alysher (2019-05-01 23:43:32)


I started learning linux under Debian, and this is what I hope for every time I interact with the awesome Arch community.

Offline

Board footer

Powered by FluxBB