Is there a way to communicate with someone at their desktop?
You can tell an X program which display to use with the DISPLAY
environment variable, as long as you know which display alpha
is currently showing. Almost certainly the only display is :0
, unless you've manually fiddled with it, so if you run:
$ export DISPLAY=:0
Then any X applications you run will be displayed on alpha
's monitor. xmessage
is a good choice for showing messages; there's also xdialog
. If you have libnotify
installed, you can use notify-send
to popup a message in the corner of the screen:
As Michael Mrozek illustrates, you can run X applications that display on your wife's desktop. All you need to do is set the DISPLAY
environment variable to the right value (almost always :0
)… and get yourself authorized.
This solution requires that you have permission to read you wife's files. Access to the X server requires an authentication “cookie”, which is a password that's randomly generated when X starts and stored in a file. The file is often ~/.Xauthority
; if it's not, it must be indicated in the XAUTHORITY
environment variable. Under Ubuntu with the default setup (using Gdm), your wife's session cookie is not in ~wife/.Xauthority
but in a file with an automatically generated name; see ssh DISPLAY variable. See also As root can I launch a graphical program on another users desktop?, Linux: wmctrl cannot open display when session initiated via ssh+screen.
If your wife has a text terminal open, you can use write
as suggested by user7440 to write some text in her terminal. That requires that the terminal accepts such notifications; you can turn this on and off with mesg y
or mesg n
, and I don't know what the default state is on modern terminal emulators.
A more sophisticated mechanism that write
is talk
. The talk protocol is the ancestor of chat programs; you can talk with anyone on a machine that's running a talk server and whose UDP port 517 or 518 (there are two protocol variants) isn't filtered. So install talkd Install talkd http://bit.ly/software-small, a client such as ytalk Install ytalk http://bit.ly/software-small, and ytalk wife
. There's also an X client, xtalk Install xtalk http://bit.ly/software-small. As far as I know, talk has simply fallen off the radar (everybody who cares uses one of the modern chat procotols), and there's no system component that would generate a KDE notification of a talk request.
While you say you can't run any IM client… would a command-line IM client running on your home machine accessed through SSH be ok? There are such, for example weechat Install weechat http://bit.ly/software-small. You'd still be depending on the some server to connect you with your wife, but it would only be accessed from your home machine, not from your phone.
If she has a terminal window open (use 'who' to find out) you can write to that terminal using 'write'. This will not work with the main terminal as KDE hides it, but any terminal window should work (if it's on the current desktop, not minimized, she's looking at it ...).