S
S
Sergey2016-08-05 22:50:25
Remote access
Sergey, 2016-08-05 22:50:25

How to remotely save a document in LibreOffice via terminal?

Problem:
Left work and left the document in libreoffice unsaved. At home, access to the working computer is only via ssh.
How do I take an open document home?
Solution:
// Look at what we have hanging there.
$ DISPLAY=:0.0 xwininfo -root -tree | grep Writer
0x2803b86 "needed_document.docx - LibreOffice Writer": ("libreoffice" "libreoffice-writer") 1600x841+0+26 +0+26
// then make this window active and Save to disk
$ export DISPLAY=:0.0
$ xdotool windowactivate 0x2803b86
$ xdotool windowfocus 0x2803b86
$ xdotool key "ctrl+s" ; xdotool key "space" ;
// all. a space at the end is needed, he asks for confirmation there.
// yes, you also need to first kill killall xscreensaver, and then re-raise xscreensaver &

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2016-08-05
@NeiroNx

and if you install / run x11vnc try and connect via vnc?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question