I am connecting to a Linux CentOS 2.6 computer via SSH wit the display deported on my screen (using MobaXterm).It is also possible to access to this computer physically.However, I would like a way to inform people that may want to access physically to the computer that I am currently using it via SSH.One way would be for them to make who in a terminal and see whether someone is connected from another computer. However, I don't want them to have to check this manually each time (they may - and will - forget this check).Thus, I would like a way to open a window on THEIR display (i.e. the screen plugged to the computer) with a message for them. Somthing like a text into gedit would do the work.Can I do that? Can I open an application on a different display than mine?
Acting on a different display when using SSH
ssh;centos;display
Can I do that? Can I open an application on a different display than mine?Yes, if you have the appropriate permissions.  For example, on a desktop where you are the only current user with a GUI, try switching to a console (e.g., via alt-ctl-F4), log in as the same user, and try:xterm -display 0:0Your mileage may vary with regard to the display id (see comments), which is actually a network address. Presuming xterm is installed and there are no errors (note this is a foreground process, so don't ctrl-c or otherwise interrupt this from the console), you should now be able to switch back the GUI and find an xterm floating somewhere.Most GUI applications should accept this -display option.  You can do the same thing via ssh.  If there are multiple X servers running, the displays are usually numbered starting with 0:0, then 0:1 -- at least, that's how they are if they are all using the same physical card and monitor; I'm not sure how it works if you have multiple X servers running simultaneously connected to separate physical displays (perhaps 0:0, 1:0,...).Again, note that you need appropriate permissions to do this.  The superuser can start an application on anyone's display, but if you are just normal user bob, you will not be allowed to launch something on normal user sue's desktop.You can also start an X server via ssh and launch applications on it this way.