|
@@ -136,6 +136,7 @@ App::App(int argc, char** argv){
|
|
|
testing = false;
|
|
|
mcookie = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
|
|
|
daemonmode = false;
|
|
|
+ firstlogin = true;
|
|
|
Dpy = NULL;
|
|
|
|
|
|
// Parse command line
|
|
@@ -308,12 +309,23 @@ void App::Run() {
|
|
|
|
|
|
// Create panel
|
|
|
LoginPanel = new Panel(Dpy, Scr, Root, cfg, themedir);
|
|
|
-
|
|
|
+ bool firstloop = true; // 1st time panel is shown (for automatic username)
|
|
|
+ bool focuspass = cfg->getOption("focus_password")=="yes";
|
|
|
+ bool autologin = cfg->getOption("auto_login")=="yes";
|
|
|
+
|
|
|
+ if (firstlogin && cfg->getOption("default_user") != "") {
|
|
|
+ LoginPanel->SetName(cfg->getOption("default_user") );
|
|
|
+ #ifdef USE_PAM
|
|
|
+ pam.set_item(PAM::Authenticator::User, cfg->getOption("default_user").c_str());
|
|
|
+ #endif
|
|
|
+ firstlogin = false;
|
|
|
+ if (autologin) {
|
|
|
+ Login();
|
|
|
+ }
|
|
|
+ }
|
|
|
// Start looping
|
|
|
int panelclosed = 1;
|
|
|
Panel::ActionType Action;
|
|
|
- bool firstloop = true; // 1st time panel is shown (for automatic username)
|
|
|
- bool focuspass = cfg->getOption("focus_password")=="yes";
|
|
|
|
|
|
while(1) {
|
|
|
if(panelclosed) {
|