0

I would like to log in from machine A to machine B -- and regardless or whether anyone is logged in on B* open a new graphical terminal on :1**.

To further clarify: This is a lab situation with one supervisor and ~30 guest machines. On the guest machines [e.g. B-Z], a user may or may not be logged in. Regardless of whether a user is logged in, I would like administrator [A] to be able to control the displays (and terminal selection) of the guest machines [B-Z]. [Something such as iTalc would be good -- but it's not working and that's a different question.]

*If someone was logged in I could grab their Xauthority and set DISPLAY=:0 and execute images on their screen, e.g., with xroot

**Or it's possible to use xroot to startx, which is just a wrapper for xinit. E.g. xroot "startx -- :1" & then xroot chvt 1 -- but a new WM starts with root privileges.

How can I ssh into the machine (on which I have root permissions) and start a new X session whether or not anyone is logged in? (Ideally, without the terminal window showing up)

As is, with:

xinit --:1 

the error message:

(EE) Fatal server error: (EE) Server is already active for display 0

is generated. Which seems odd, as xinit was passed :1.

[The machines are using XDM]

  • You didn't pass :1 to xinit because your command is missing a space. It should be xinit -- :1. I'm not sure what you want to accomplish though. If someone is logged in on the machine's console, do you want to open a window on their interface or not? – Gilles Sep 16 '15 at 23:49
  • I did it with and without the space. I would like to open a new graphical terminal as with xinit -- :1 (or more like xterm without a terminal, i.e. , an Xsession without a windowmanager) and change to it as with chvt 1 and send content (from my computer). It would switch from their :0 to their :1 . – Donnied Sep 17 '15 at 1:26
  • Quite simply, I want the ~30 screens to display (more or less in unison) what I choose without any input from the user, without the user being given a root terminal, and without killing (only displacing) the users Xsession (if one is in place). – Donnied Sep 17 '15 at 1:29
0

I'm not sure I correctly understand what you are trying to achieve, but maybe xvnc can suit your needs: http://www.hep.phy.cam.ac.uk/vnc_docs/xvnc.html You can start a new server on the display :1 with the command:

$ xinit -- /usr/bin/Xvnc  :1
  • Using the command as given fails with the "Possible server names include:" message. Removing the space after the -- returns the "(EE) Server is already active for display 0" error message. – Donnied Sep 16 '15 at 22:03
0

If you want your graphical output to be displayed on machine A:

  1. Start a X server on A
  2. On A: ssh -X machine-b wmaker

If you'd like your graphical output to be displayed on machine B:

  • either don't use xdm and start X through ssh
  • or use XDMCP or VNC to connect to B's xdm
  • How would I do that? I started a vncserver on A :1. SSHed into B, exported the DISPLAY=:1, connected the VNC viewer, tried to chvt to :1 and a blank text terminal showed up. But I can alt+ctl+f2 and it opens a new graphical tab which connects to the VNC server --- however there's a Cinnamon session running as root! It seems I'll need to tweak an xinitrc. – Donnied Sep 16 '15 at 22:22
0

As for opening a blank, nothing-else-in-it Xsession, I was just looking for:

X :1 & 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.