With a GPD Pocket 3 N6000, suspend/hibernation is a minefield of problems. In lieu, I'm looking at a timed shutdown, so I would need an initial script that would save/close a MS Word document, and gracefully close out Wine completely, before Arch went into general shutdown. Is there a Wine script that can automate this without user input?
I'm using up-to-date Manjaro/kernel 5.18.3./Wine 5.9/MS Word 97
Thanks,
Jake
Linux Script to Save MS Word Doc and Close Wine?
Re: Linux Script to Save MS Word Doc and Close Wine?
There is no ready-made script that will save a Word file, close Word, and close Wine.
However, I can provide some tips that can get you started.
Winetricks uses AutoHotkey to automatically install and exit Windows programs.
This program should also allow you to close Word and save a file.
You can close Wine in the following way:
wineserver -k This will kill all wine processes
However, I can provide some tips that can get you started.
Winetricks uses AutoHotkey to automatically install and exit Windows programs.
This program should also allow you to close Word and save a file.
You can close Wine in the following way:
wineserver -k This will kill all wine processes
Re: Linux Script to Save MS Word Doc and Close Wine?
Thank you for your quick response. I've been fumbling my way trying to make this script:
It seems to work okay so far to save a Word doc, then close, but I need to tie it to an xprintidle script, setting the timer, then calling the script above, then shutting down cleanly. I'm not familiar with xprintidle...
Thanks again for posting.
Code: Select all
#!/bin/sh
wmctrl -a "Microsoft Word"
sleep .2
xdotool keydown 0xffea + key 4
xdotool keyup 0xffea
xdotool key y
Thanks again for posting.
Re: Linux Script to Save MS Word Doc and Close Wine?
This appears to work, so far. It's primitive, but clean, and if there's anything good in it, the work belongs to other people ( https://askubuntu.com/questions/442795/ ... being-idle )
Code: Select all
#!/bin/bash
idletime=$((15*60*1000)) # 15 min in milliseconds
idle=0
while [ $idle -lt $idletime ];do
idle=`xprintidle`
sleep 1
done
/home/jake/Scripts_Icons/Word_Shutdown # calling the Word save/close script listed in previous post
sleep 5
sudo shutdown -P now