{"id":43590,"date":"2023-01-20T10:58:33","date_gmt":"2023-01-20T10:58:33","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=43590"},"modified":"2024-05-05T14:21:48","modified_gmt":"2024-05-05T14:21:48","slug":"disable-welcome-dialog-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2023\/01\/disable-welcome-dialog-ubuntu-22-04\/","title":{"rendered":"How to Disable Welcome Screen (First Login Dialog) in Ubuntu 24.04\/22.04"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/ubuntu2204-logo.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-38307\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/ubuntu2204-logo-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/ubuntu2204-logo-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/ubuntu2204-logo-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/ubuntu2204-logo-600x600.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/ubuntu2204-logo-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/ubuntu2204-logo.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>When first time logging in a user account, it always pop-up an <b>initial setup dialog<\/b> to setup online account, livepath, privacy, etc in Ubuntu.<\/p>\n<p>It&#8217;s quite annoying if you create new user accounts regularly, since all options in that dialog are also available in system settings. In this case, you can follow this tutorial to disable this function in <b>Ubuntu 22.04<\/b> and <b>Ubuntu 24.04.<\/b><\/p>\n<p><i>Tip: run <code>\/usr\/libexec\/gnome-initial-setup --existing-user<\/code> command in terminal can manually launch Welcome dialog if need in Ubuntu.<\/i><\/p>\n<div id=\"attachment_43591\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/ubuntu-welcome-dialog.webp\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-43591\" class=\"size-large wp-image-43591\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/ubuntu-welcome-dialog-600x397.webp\" alt=\"\" width=\"600\" height=\"397\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/ubuntu-welcome-dialog-600x397.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/ubuntu-welcome-dialog-300x198.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/ubuntu-welcome-dialog-768x508.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/ubuntu-welcome-dialog.webp 861w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-43591\" class=\"wp-caption-text\">Welcome dialog in user first login<\/p><\/div>\n<p>Here I&#8217;ll show you how to disable the initial setup dialog in 3 ways. Choose one of below methods that your prefer:<\/p>\n<ul>\n<li>Method 1: Remove the software package.<\/li>\n<li>Method 2: Add a rule in the service file, so it will never meet the condition to pop-up the dialog.<\/li>\n<li>Method 3: Auto-generate <code>gnome-initial-setup-done<\/code> file, so it think you&#8217;re already done the initial setup<\/li>\n<\/ul>\n<h3>Method 1: Remove the Welcome package<\/h3>\n<p>The Welcome to Ubuntu dialog is handled by the <code>gnome-initial-setup<\/code> package. <strong>It&#8217;s safe to remove the package<\/strong>, as no other packages depend on it.<\/p>\n<p>So, the most stupid and simple way to disable this feature is press <b>Ctrl+Alt+T<\/b> on keyboard to open terminal, and run command to remove the package:<\/p>\n<pre>sudo apt remove --autoremove gnome-initial-setup<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/apt-remove-intialsetup.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-43592\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/apt-remove-intialsetup-600x407.webp\" alt=\"\" width=\"600\" height=\"407\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/apt-remove-intialsetup-600x407.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/apt-remove-intialsetup-300x203.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/apt-remove-intialsetup-768x521.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/apt-remove-intialsetup.webp 786w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h3>Method 2: Disable welcome by editing the service (NOT Work for 24.04)<\/h3>\n<p>Without removing the package, you may also disable the feature by adding a rule into the systemd user service.<\/p>\n<p>The old method by editing the &#8220;<code>gnome-initial-setup-first-login.desktop<\/code>&#8221; file under auto-start config folder (&#8216;<i>\/etc\/xdg\/autostart<\/i>&#8216;) does no longer work in Ubuntu 22.04, due to rule <b>X-GNOME-HiddenUnderSystemd=true<\/b>. Meaning, the XDG Autostart config is overridden by a systemd service.<\/p>\n<p>The key is the systemd service &#8220;<code>gnome-initial-setup-first-login.service<\/code>&#8220;. However, it&#8217;s running in per user level automatically at login. <b>It&#8217;s easy to disable or mask the service for current user<\/b> by running command:<\/p>\n<pre>systemctl --user --now mask gnome-initial-setup-first-login.service<\/pre>\n<p>Or, <b>specify which user to disable\/mask the service for<\/b> via command:<\/p>\n<pre>systemctl --user --now --machine=USER_NAME_HERE@ mask gnome-initial-setup-first-login.service.service<\/pre>\n<p>But, I can&#8217;t figure out how to disable the service for all users, especially for non-exist user before you creating it, because you know it runs only on first login for new user (exactly until you done the welcome dialog that auto-generates <code>gnome-initial-setup-done<\/code> file in user&#8217;s .config folder.).<\/p>\n<p><strong>As a workaround, you can add a rule into the service file to skip Welcome dialog automatically for all users:<\/strong><\/p>\n<p><b>1.<\/b> Firstly, press <b>Ctrl+Alt+T<\/b> on keyboard to open a terminal window. When terminal opens, copy the service file into &#8220;\/etc&#8221; directory.<\/p>\n<pre>sudo cp \/usr\/lib\/systemd\/user\/gnome-initial-setup-first-login.service \/etc\/systemd\/user\/<\/pre>\n<p><i>It works by editing the service file under &#8216;\/usr\/lib&#8217;, but changes will be overridden once Ubuntu published an update for it. So, it&#8217;s better to copy and paste it into &#8216;\/etc&#8217; which has higher priority.<\/i><\/p>\n<p><b>2.<\/b> Then, run command to edit the service file:<\/p>\n<pre>sudo gedit \/etc\/systemd\/user\/gnome-initial-setup-first-login.service<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/edit-initialsetup-service.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-43593\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/edit-initialsetup-service-600x407.webp\" alt=\"\" width=\"600\" height=\"407\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/edit-initialsetup-service-600x407.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/edit-initialsetup-service-300x203.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/edit-initialsetup-service-768x521.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/edit-initialsetup-service.webp 786w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><b>3.<\/b> When the file opens, add following lines under <strong>[unit]<\/strong> section:<\/p>\n<blockquote><p># Only run when &#8216;file-name-never-use&#8217; file exist, meaning disable this service<br \/>\nConditionPathExists=%E\/file-name-never-use<\/p><\/blockquote>\n<p>It means only start the service when &#8220;<code>file-name-never-use<\/code>&#8221; file exist in user&#8217;s .config folder, while the first line started with <b>#<\/b> is description line.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/disable-initialsetup-1.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-43595\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/disable-initialsetup-1-600x430.webp\" alt=\"\" width=\"600\" height=\"430\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/disable-initialsetup-1-600x430.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/disable-initialsetup-1-300x215.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/disable-initialsetup-1-768x550.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/disable-initialsetup-1.webp 864w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Finally, save the file. For nano command line text editor, press <b>Ctrl+S<\/b> to save, then <b>Ctrl+X<\/b> to exit.<\/p>\n<p><b>4.<\/b> (<i>skip this step if you&#8217;ve never edited the file<\/i>) In case you&#8217;ve changed the XDG auto-start for gnome-initial-setup, open terminal (Ctrl+Alt+T) and run command:<\/p>\n<pre>sudo gedit \/etc\/xdg\/autostart\/gnome-initial-setup-first-login.desktop<\/pre>\n<p>When file opens, make sure there&#8217;s a line <b>X-GNOME-HiddenUnderSystemd=true<\/b>, so it won&#8217;t run because of the service you configured in previous steps.<\/p>\n<p>That&#8217;s all, you can now try creating a user account and logging in to see the magic!<\/p>\n<h3>Method 3: Generate &#8216;gnome-initial-setup-done&#8217; file on user creation<\/h3>\n<p>As you see in the last screenshot, the first login service contains a line <code>ConditionPathExists=!%\/gnome-initial-setup-done<\/code>. Meaning it only launches the initial setup dialog when &#8216;<code>gnome-initial-setup-done<\/code>&#8216; file does NOT exist in user <code>.config<\/code> folder.<\/p>\n<p>And, on user creation, Ubuntu and many other Linux automatically copy all the files in <code>\/etc\/skel<\/code> directory to the home directory of new user account. They are usually hidden <code>.bashrc<\/code>, <code>bash_logout<\/code>, <code>.profile<\/code> files run automatically at login (or log out) to setup PATH variable, command aliases, tab completion, etc.<\/p>\n<p><b>By creating a <code>.config<\/code> sub-folder, that includes <code>gnome-initial-setup-done<\/code> file, under <code>\/etc\/skel<\/code>, will make all new created users include that sub-folder as well as that file in their home directory. So, at every login it thinks the initial setup has done and won&#8217;t pop-up the dialog.<\/b><\/p>\n<p>To so do, simply press <code>Ctrl+Alt+T<\/code> on keyboard to open terminal. Then, run commands (<i>thanks to @smart caraxabill<\/i>):<\/p>\n<ul>\n<li>First, create the <code>.config<\/code> sub-folder under <code>\/etc\/skel<\/code>:\n<pre>sudo mkdir -p \/etc\/skel\/.config<\/pre>\n<\/li>\n<li>Then, create the <code>gnome-initial-setup-done<\/code> file and input <code>yes<\/code> as it content.\n<pre>printf yes | sudo tee \/etc\/skel\/.config\/gnome-initial-setup-done &gt;\/dev\/null<\/pre>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/auto-initial-done.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-45304\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/auto-initial-done.webp\" alt=\"\" width=\"700\" height=\"288\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/auto-initial-done.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/01\/auto-initial-done-300x123.webp 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/p>\n<h3>Restore the Initial Setup Dialog<\/h3>\n<p>Depends on which method you chose, undo the change by:<\/p>\n<p>For method 1, just install the package back by running command in terminal (Ctrl+Alt+T):<\/p>\n<pre>sudo apt install gnome-initial-setup<\/pre>\n<p>For the method 2, just remove the service file under <code>\/etc<\/code> so the original one will be in use:<\/p>\n<pre>sudo rm \/etc\/systemd\/user\/gnome-initial-setup-first-login.service<\/pre>\n<p>And for the last method, remove the <code>.config<\/code> sub-folder from <code>\/etc\/skel<\/code> directory to undo the change:<\/p>\n<pre>sudo rm -R \/etc\/skel\/.config<\/pre>\n<p>That&#8217;s all. Enjoy!<\/p>","protected":false},"excerpt":{"rendered":"<p>When first time logging in a user account, it always pop-up an initial setup dialog to setup online account, livepath, privacy, etc in Ubuntu. It&#8217;s quite annoying if you create new user accounts regularly, since all options in that dialog are also available in system settings. In this case, you can follow this tutorial to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":38307,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[689],"class_list":["post-43590","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-gnome"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/43590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=43590"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/43590\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/38307"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=43590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=43590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=43590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}