Mixer: Automatically run in "noui" mode if DISPLAY environment variable unset (i.e. X11 not available).
This commit is contained in:
parent
286dec338c
commit
f6e3ca8831
|
@ -219,9 +219,18 @@ main ( int argc, char **argv )
|
||||||
char *n = basename( name );
|
char *n = basename( name );
|
||||||
|
|
||||||
if ( ! strcmp( n, "non-mixer-noui" ) )
|
if ( ! strcmp( n, "non-mixer-noui" ) )
|
||||||
|
{
|
||||||
|
DMESSAGE("Not running UI: invoked as non-mixer-noui");
|
||||||
no_ui = true;
|
no_ui = true;
|
||||||
|
}
|
||||||
|
|
||||||
free( name );
|
free( name );
|
||||||
|
|
||||||
|
if ( NULL == getenv("DISPLAY") )
|
||||||
|
{
|
||||||
|
DMESSAGE("Not running UI: $DISPLAY environment variable unset");
|
||||||
|
no_ui = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! no_ui )
|
if ( ! no_ui )
|
||||||
|
@ -313,7 +322,6 @@ main ( int argc, char **argv )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DMESSAGE( "Not Running UI..." );
|
|
||||||
while ( ! got_sigterm )
|
while ( ! got_sigterm )
|
||||||
{
|
{
|
||||||
Fl::wait(2147483.648); /* magic number means forever */
|
Fl::wait(2147483.648); /* magic number means forever */
|
||||||
|
|
Loading…
Reference in New Issue