Subject: bind script to X->VT switch
To: None <tech-x11@netbsd.org>
From: George Michaelson <ggm@apnic.net>
List: tech-x11
Date: 02/02/2007 13:44:32
I have an IBM X31 which can't do ACPI sleep while in X11. it sleeps
fine, but it dies on wake.

If I do the acpi sleep from a VT console, its fine.

But to get to VT, I have to hit keys. FN+<x> or CTRL+<x> sequences.

I'd love to have a script, which does the moral equivalent of:

	#!/bin/sh
	
	run-command-to-switch-to-VT-console
		:
		: (safe net shutdown for sleep)

	sysctl -w machdep.sleepstate = 3

	# wakeup, script re-runs

		:
		: (re-establish net state)

	run-command-to-switch-to-X11

this could run from mouse, functionkey, whatever.

what are that pair of commands? Do they exist?

cheers

-George