Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ void App::Run() {

CreateServerAuth();
StartServer();
SetupServer();
#endif

}
Expand Down Expand Up @@ -984,6 +985,14 @@ int App::StartServer() {
return ServerPID;
}

int App::SetupServer() {
string setupCommand = cfg->getOption("xsetup_cmd");
if (setupCommand != "")
logStream << APPNAME << ": Setting X up, using " << setupCommand << ": ";
int rc = system(setupCommand.c_str());
logStream << WEXITSTATUS(rc) << endl;
}

jmp_buf CloseEnv;
int IgnoreXIO(Display *d) {
logStream << APPNAME << ": connection to X server lost." << endl;
Expand Down
1 change: 1 addition & 0 deletions app.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class App {

/* Server functions */
int StartServer();
int SetupServer();
int ServerTimeout(int timeout, char *string);
int WaitForServer();

Expand Down
1 change: 1 addition & 0 deletions cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Cfg::Cfg()
options.insert(option("default_path","/bin:/usr/bin:/usr/local/bin"));
options.insert(option("default_xserver","/usr/bin/X"));
options.insert(option("xserver_arguments",""));
options.insert(option("xsetup_cmd",""));
options.insert(option("numlock",""));
options.insert(option("daemon",""));
options.insert(option("xauth_path","/usr/bin/xauth"));
Expand Down
1 change: 1 addition & 0 deletions slim.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
default_path /bin:/usr/bin:/usr/local/bin
default_xserver /usr/bin/X
#xserver_arguments -dpi 75
#xsetup_cmd /path/to/xrandr/script

# Commands for halt, login, etc.
halt_cmd /sbin/shutdown -h now
Expand Down