Possibly add a Switch User entry to exit.lua


Forum: DSL Ideas and Suggestions
Topic: Possibly add a Switch User entry to exit.lua
started by: john.martzouco

Posted by john.martzouco on Dec. 22 2007,16:29
Hi Robert,

Would it be improper for me to suggest that a Switch User toggle be added to the Exit Options dialog?  I find myself sharing the laptops with my wife regularly and it's a little tedious exit to shell, logout each time.

I've not tried Frugal or Poorman's install, so I don't know if the multi-user environment is used there or not... and that is why I ask with if it's appropriate.

I've been able to get some of it done on my own, but haven't figured out how /etc/init.d/functions5.lua calls the logout processes.

I would hope the Switch User option would exit to shell and then logout the current user.

Here is what I've been able to achieve so far in exit.lua:
Code Sample
4c4
< w = fltk:Fl_Double_Window(205, 175, "DSL Exit Options")
---
> w = fltk:Fl_Double_Window(205, 185, "DSL Exit Options")
30c30,39
< promptBtn = fltk:Fl_Round_Button(55, 55, 115, 25, "Exit to Prompt");
---
> promptBtn = fltk:Fl_Round_Button(55, 55, 105, 25, "Switch User");
> promptBtn:type(fltk.FL_RADIO_BUTTON)
> promptBtn:value(0)
> promptBtn:callback(
> function(promptBtn)
>   backupBtn:value(0)
>   backupBtn:hide()
> end)
>
> promptBtn = fltk:Fl_Round_Button(55, 75, 125, 25, "Exit to Prompt");
41c50
< backupBtn = fltk:Fl_Check_Button(70, 85, 80, 30, "Backup")
---
> backupBtn = fltk:Fl_Check_Button(70, 105, 80, 30, "Backup")
54c63
< okBtn = fltk:Fl_Return_Button(25, 130, 60, 25, "OK")
---
> okBtn = fltk:Fl_Return_Button(25, 140, 60, 25, "OK")
77c86
< cancelBtn = fltk:Fl_Button(115, 130, 60, 25, "Cancel")
---
> cancelBtn = fltk:Fl_Button(115, 140, 60, 25, "Cancel")


Much thanks,
John

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.