I'm having trouble writing a cleanup script for mdm. Here's my issue: after 1st boot, mdm loads LXDE and I log in, everything works fine. I log out of my LXDE session and come back to the MDM login window. Here's the problem, the login window has shifted from vt7 to vt8. Logging back in works fine, no problems.
If I edit /etc/mdm/mdm.conf and add this line:
- Code: Select all
[servers]
#0=Standard vt7
So here's what I'm attempting to do: create a script to kill consolekit and deallocate vt7 when logging out or restarting X then restart mdm which will restart consolekit and I can log in vt7 with suspend/hibernate, wireless and power controls working. I hope I'm not confusing anyone.
Here's a sample of my script:
- Code: Select all
#!/bin/sh
touch S3
fgconsole > S3
if S3=7 then
killall consolekit
deallocvt $S3
rm S3
endif
If it looks good to those of u who are better at this, then all I need to know is where to put it so when i log out or X is killed, crashed or whatever, the script gets called before mdm reloads.
Any help?

