You are not logged in.
Hi all, I hope someone can help me with this.
I have no DE, just X11 and KDE. I do not wish to start X11 on boot, so I manually start from tty with startx. I also have xrdp and have its services enabled.
- If I do not start xorg (startx), xrdp can connect to the window manager just fine and properly runs .xinitrc. Both the xorg and xnvc options work great, and I see a KDE desktop. However, following this, I cannot start xorg from tty because an x server is already running.
- If I do start xorg (startx) before connecting via xrdp, then KDE works great, but I cannot start any sessions via xrdp. xrdp closes the connection right after authentication.
I would like for these to share the x server and connect two displays (or even better, use one session, though the docs suggest that a new session is made if the geometry doesn't match). Anyone know how I might accomplish this?
Offline
A bit off topic, but ... you definitely do have a DE:
I have no DE, just X11 and KDE.
On topic, how - specifically - are you starting X? To start a second server you need to specify a vt and a DISPLAY value. On the local machine, the former will be assumed to be the current tty by default, so generally no action is required there. But - for some odd reason - startx always defaults to DISPLAY=:0 if you don't otherwise specify. So you need to specify a display number for each subsequent session. For example, if you start the remote session first, then on the local machine you should be able to do `startx -- :1`, or `startx -- :2`, etc.
As for the equivalent from your remote system if you have already started X locally, I'm not familiar with xrdp, but it should certainly have equivalent options/flags.
Last edited by Trilby (2019-05-22 13:30:39)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Whoops, guess my semantics on desktop environments were off. I meant I don't have any mechanism for a login screen and don't start X at boot.
I think you provided exactly the right answer had I correctly diagnosed my issue, so thank you. However, your great answer led me to realize my problem is not what I thought it was. I now believe that X starts just fine, but for some reason it exits after a second or two under the circumstances I described (if it is the second session to start).
I found that the contents of ~/.local/share/xorg/Xorg.0.log (or Xorg.1.log) are exactly the same (aside from timestamps and display numbers) regardless of whether I successfully get into KDE, on any display.
Any idea why it might silently exit? I suspect this may actually be a KDE problem, but I don't know where KDE writes logs. I checked journalctl, but I don't see anything logged there after the failed attempt to get into a KDE session.
Last edited by endotronic (2019-05-23 03:37:44)
Offline
dbus.
Try to run them as different users and look at "sudo journalctl -b".
Also do not "believe". The xorg logs actually will tell you how long a server ran.
Offline
Hey thanks, and sorry for my delay. Been busy. It turns out I can run two X sessions each on a different user account just fine. Running two for the same user still fails. I couldn't find anything logged that's visible with `journalctl -b` after a failure (when trying with the same user).
Thanks for the pointer to dbus! I always wondered what that was, and I'm glad you made me look. I have some learning to do.
Offline
Yeah, I don't think the big fat DEs really support to run two instances for the same user :-(
You'll have to go with forwarding the running session rather than opening a new one.
Offline
Gotcha! Forwarding an existing session is an equally good solution for me anyhow; I will have to see if I can figure that out. I may also try xfce4 - not sure if that counts as a big fat DE. Thanks for all the help!
Offline