#endif
if ( p -> exec ) {
+ char *nohup;
+
+ if ( p -> option_no_x11 ) {
+ nohup = "/usr/bin/nohup ";
+ } else {
+ nohup = "";
+ }
// basics
if ( p -> object_type == pnd_object_type_directory ) {
- snprintf ( buffer, 1020, "Exec=/usr/bin/nohup %s -p %s -e %s -b %s",
- pndrun, p -> object_path, p -> exec, p -> unique_id );
+ snprintf ( buffer, 1020, "Exec=%s%s -p %s -e %s -b %s",
+ nohup, pndrun, p -> object_path, p -> exec, p -> unique_id );
} else if ( p -> object_type == pnd_object_type_pnd ) {
- snprintf ( buffer, 1020, "Exec=/usr/bin/nohup %s -p %s/%s -e %s -b %s",
- pndrun, p -> object_path, p -> object_filename, p -> exec, p -> unique_id );
+ snprintf ( buffer, 1020, "Exec=%s%s -p %s/%s -e %s -b %s",
+ nohup, pndrun, p -> object_path, p -> object_filename, p -> exec, p -> unique_id );
}
// start dir