diff --git a/js/ui/main.js b/js/ui/main.js index 2d8804aca..b6f54da9e 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -329,12 +329,16 @@ function _initializeUI() { }); } - let credentials = new Gio.Credentials(); - if (credentials.get_unix_user() === 0) { - notify(_('Logged in as a privileged user'), - _('Running a session as a privileged user should be avoided for security reasons. If possible, you should log in as a normal user.')); - } else if (sessionMode.showWelcomeDialog) { - _handleShowWelcomeScreen(); + const perfModuleName = GLib.getenv('SHELL_PERF_MODULE'); + if (!perfModuleName) { + let credentials = new Gio.Credentials(); + if (credentials.get_unix_user() === 0) { + notify( + _('Logged in as a privileged user'), + _('Running a session as a privileged user should be avoided for security reasons. If possible, you should log in as a normal user.')); + } else if (sessionMode.showWelcomeDialog) { + _handleShowWelcomeScreen(); + } } if (sessionMode.currentMode !== 'gdm' && @@ -343,7 +347,6 @@ function _initializeUI() { LoginManager.registerSessionWithGDM(); - let perfModuleName = GLib.getenv("SHELL_PERF_MODULE"); if (perfModuleName) { let perfOutput = GLib.getenv("SHELL_PERF_OUTPUT"); let module = eval(`imports.perf.${perfModuleName};`);