diff --git a/src/main.cc b/src/main.cc index af7f62e1..cec1186c 100644 --- a/src/main.cc +++ b/src/main.cc @@ -967,7 +967,7 @@ int main(int argc, char* argv[]) auto flags = (parser.get_switch("n") ? ServerFlags::IgnoreKakrc : ServerFlags::None) | (parser.get_switch("d") ? ServerFlags::Daemon : ServerFlags::None) | (parser.get_switch("ro") ? ServerFlags::ReadOnly : ServerFlags::None) | - (argc == 1 ? ServerFlags::StartupInfo : ServerFlags::None); + (argc == 1 and isatty(0) ? ServerFlags::StartupInfo : ServerFlags::None); return run_server(session, server_init, client_init, init_coord, flags, ui_type, files); } catch (convert_to_client_mode& convert)