diff --git a/atom/common/platform_util_linux.cc b/atom/common/platform_util_linux.cc index d942ac10da4..55414633ce9 100644 --- a/atom/common/platform_util_linux.cc +++ b/atom/common/platform_util_linux.cc @@ -140,11 +140,14 @@ bool MoveItemToTrash(const base::FilePath& full_path) { void Beep() { // echo '\a' > /dev/console - FILE* console = fopen("/dev/console", "r"); - if (console == NULL) - return; - fprintf(console, "\a"); - fclose(console); + FILE* fp = fopen("/dev/console", "a"); + if (fp == nullptr) { + fp = fopen("/dev/tty", "a"); + } + if (fp != nullptr) { + fprintf(fp, "\a"); + fclose(fp); + } } bool GetDesktopName(std::string* setme) {