|
|
|
@ -681,9 +681,6 @@ session_start_fork(tbus data, tui8 type, struct SCP_CONNECTION *c,
|
|
|
|
|
}
|
|
|
|
|
else if (window_manager_pid == 0)
|
|
|
|
|
{
|
|
|
|
|
if (session_was_already_running) {
|
|
|
|
|
g_exit(0);
|
|
|
|
|
}
|
|
|
|
|
char* remote_server = wait_for_remote_hostname(s->username);
|
|
|
|
|
wait_for_remote_xserver(remote_server, display);
|
|
|
|
|
env_set_user(s->username,
|
|
|
|
@ -696,8 +693,34 @@ session_start_fork(tbus data, tui8 type, struct SCP_CONNECTION *c,
|
|
|
|
|
{
|
|
|
|
|
g_free(remote_server);
|
|
|
|
|
|
|
|
|
|
// RAPTOR session management
|
|
|
|
|
raptor_sm_run_remote_desktop(s->username, display, "/opt/trinity/bin/starttde");
|
|
|
|
|
// // RAPTOR session management
|
|
|
|
|
// raptor_sm_run_remote_desktop(s->username, display, "/opt/trinity/bin/starttde");
|
|
|
|
|
// g_exit(0);
|
|
|
|
|
|
|
|
|
|
struct list * wm_params = (struct list *)NULL;
|
|
|
|
|
char ** pp2 = (char **)NULL;
|
|
|
|
|
wm_params = list_create();
|
|
|
|
|
wm_params->auto_free = 1;
|
|
|
|
|
/* these are the must have parameters */
|
|
|
|
|
list_add_item(wm_params, (long)g_strdup("/opt/trinity/bin/starttde"));
|
|
|
|
|
|
|
|
|
|
/* make sure it ends with a zero */
|
|
|
|
|
list_add_item(wm_params, 0);
|
|
|
|
|
pp2 = (char**)wm_params->items;
|
|
|
|
|
|
|
|
|
|
pid_t wmpid;
|
|
|
|
|
wmpid = raptor_sm_run_remote_server(s->username, pp2, RAPTOR_SM_WM_PID_FIELD, display);
|
|
|
|
|
log_message(LOG_LEVEL_ALWAYS, "new window manager pid code was %d for user %s", wmpid, s->username);
|
|
|
|
|
|
|
|
|
|
if (wmpid >= 0) {
|
|
|
|
|
raptor_sm_wm_started(s->username, wmpid, RAPTOR_SM_WM_PID_FIELD);
|
|
|
|
|
|
|
|
|
|
// Wait for PID exit and remove information from the session database
|
|
|
|
|
raptor_sm_wait_for_pid_exit(s->username, wmpid);
|
|
|
|
|
raptor_sm_wm_terminated(s->username);
|
|
|
|
|
raptor_sm_terminate_server(s->username);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
g_exit(0);
|
|
|
|
|
|
|
|
|
|
auth_set_env(data);
|
|
|
|
@ -872,14 +895,14 @@ session_start_fork(tbus data, tui8 type, struct SCP_CONNECTION *c,
|
|
|
|
|
|
|
|
|
|
/* fire up Xorg */
|
|
|
|
|
pid_t serverpid;
|
|
|
|
|
serverpid = raptor_sm_run_remote_server(s->username, pp1);
|
|
|
|
|
serverpid = raptor_sm_run_remote_server(s->username, pp1, RAPTOR_SM_SERVER_PID_FIELD, -1);
|
|
|
|
|
log_message(LOG_LEVEL_ALWAYS, "new server pid code was %d during login for user %s", serverpid, s->username);
|
|
|
|
|
|
|
|
|
|
if (serverpid >= 0) {
|
|
|
|
|
if (!session_was_already_running) {
|
|
|
|
|
char *friendlyscreen = g_strdup(screen);
|
|
|
|
|
friendlyscreen[0] = ' ';
|
|
|
|
|
raptor_sm_server_started(s->username, serverpid, atoi(friendlyscreen));
|
|
|
|
|
raptor_sm_server_started(s->username, serverpid, atoi(friendlyscreen), RAPTOR_SM_SERVER_PID_FIELD);
|
|
|
|
|
g_free(friendlyscreen);
|
|
|
|
|
|
|
|
|
|
// Wait for PID exit and remove information from the session database
|
|
|
|
|