Am Samstag, 7. April 2018 schrieb Thierry de Coulon:
On Friday 06 April 2018 23.08:31 midi-pascal wrote:
On 18-04-06 01:23 PM, Thierry de Coulon wrote:
> I'm trying to setup a machine to autostart at a given time, do record
> something and then shutdown.
>
> Autostarting works with:
>
> echo `date -d 'YYYY-MM-DD hh:mm:ss ' '+%s'` >
> /sys/class/rtc/rtc0/wakealarm
>
> but this seems to work only if I put the computer in suspend mode (if I
> shutdown the computer does not come back to life). However, when the
> computer starts from suspend, the session is locked... and I am not there
> to unlock it.
>
> I've searched TDE's control panel without luck. Is there a way to remove
> the auto-lock feature?
>
> Thierry
Thank you, but I allready have autologin and it does not solve the problem as
the lock occurs when I put the computer to "suspend".
I may have found another solution by using rtcwake and hibernate:
rtcwake -m disk -u -t <timestamp>
It's a little more complicated, as you first have to generate the
correct "number" for the date and time, but the computer then hibernates and
when waking up seems to do a regular boot and does not lock the screen.
Shutting it down seems to work, but I had to use rc.local to run the shutdown
command at boot and as root, so i must not forget to remove this after use...
The current method - still being tested - is:
- edit /etc/rc.local for shutdown
- program Kaffeine for recording
- generate the date/time number
- run rtcwake with this number
The computer then hibernates and (hopefuly) comes back to life at the right
time, records and then shuts down.
Thierry
This might be a stupid question, but why do you need a GUI at all when doing automatic
tasks?
Nik
--
Please do not email me anything that you are not comfortable also sharing with the NSA,
CIA ...