This patch makes sure the gtk binary also outputs an error message if it cannot open the mixer. In the old situation, it would just return with a non-zero exit value. The return calls are replaced by calls to ErrorExitWarn(). Also, in ErrorExitWarn() the gtk interface hasn't been initialised yet, so we don't have to (and mustn't) call CloseScreen(). Patch by Bas Zoetekouw diff -Naur aumix-2.8.orig/src/common.c aumix-2.8/src/common.c --- aumix-2.8.orig/src/common.c 2002-10-29 22:27:51.000000000 +0100 +++ aumix-2.8/src/common.c 2002-11-29 21:43:15.000000000 +0100 @@ -218,11 +218,11 @@ if (interactive == IN_GTK) { #ifndef DUMMY_MIXER if ((mixer_fd = open(device_filename, O_RDWR)) < 0) - return EOPENMIX; + ErrorExitWarn(EOPENMIX, 'e'); #endif /* DUMMY_MIXER */ ErrorExitWarn(MixerStatus(), 'e'); if (!devmask) - return EFINDDEVICE; + ErrorExitWarn(EFINDDEVICE, 'e'); gtk_init(&argc, &argv); InitScreenGTK(); gtk_main(); @@ -264,7 +264,8 @@ if (!error) return; #if HAVE_CURSES - if (mode == 'e') /* exit */ + if ((mode == 'e') && + (interactive == IN_CURSES) ) /* erase curses screen */ CloseScreen(); #endif /* HAVE_CURSES */ if (error > 12) {