12

We deploy Ubuntu desktops in our environment at scale and I want to kill the new welcome screen so it doesn't appear on all newly built machines at first log in.

Has anyone figured out how to do this yet?

12

I found the solution to this myself so I'm posting it here for all those who might want to know.

The welcome screen is part of the gnome-initial-setup package. The first time a user logs into a new machine the command /usr/lib/gnome-initial-setup/gnome-initial-setup --exisiting-user runs.

for us simply removing the gnome-initial-setup package during kickstart is a suitable fix as we don't require any of the gnome initial setup stuff anyway (we don't want to create local user accounts or set the system time etc).

if you do still want the pre-login welcome stuff then you'll need a different solution.

1
  • In this initial setup, user opt in or out sending reports to Ubuntu for example. Did you notice any side effects after removing the gnome-initial-setup package ? Did you removed the ubuntu-report package too ? Aug 16 '18 at 14:43
6

I am in the same boat as Dean and found this article + another ones.

Here Rui Matos recommends to append InitialSetupEnable=false in /etc/gdm/custom.conf (in Ubuntu /etc/gdm3/custom.conf).

So edit /etc/gdm3/custom.conf and add the following:

[daemon]
InitialSetupEnable=false

Hope this helps someone else to get rid of the Welcome Screen.

1
  • 1
    This seems reasonable, but to me it did not work at all. Ubuntu 18.04.2. sokunrotanak's solution worked tho.
    – bviktor
    Apr 30 '19 at 9:06
5

As a side note, you can cleanly create the necessary files to cancel the action.

On my end, I'm installing packages on an embedded system and for that I create one user. I want to avoid the "initial setup wizard" and all I have to do is create one file in the user's .config directory:

touch /home/${NEW_USER}/.config/gnome-initial-setup-done

So I can place that command line in my package.postinst file and that user will never see the initial setup wizard.


How does that work?

If you know the names (which other users mentioned) of the startup files and you look into them, the files include a condition:

AutostartCondition=unless-exists gnome-initial-setup-done

So if you create that file, it won't start. There are several types of conditions, the tour one is the opposite:

AutostartCondition=if-exists run-welcome-tour

So you need to create that file for the welcome tour to kick in and once done with the tour, the file gets deleted. Maybe they save the step you're on in that file. So in our script we could add the following to make sure the welcome tour doesn't start:

rm -f /home/${NEW_USER}/.config/run-welcome-tour

This solution is much cleaner than any others (except for uninstalling the offending packages if that's an option for you).

4

If you don't want to uninstall the package, you can edit the file

sudo vi /etc/xdg/autostart/gnome-initial-setup-first-login.desktop

by adding a "#" (without quotes) to the beginning of the execute line like this:

#Exec=/usr/lib/gnome-initial-setup/gnome-initial-setup --existing-user
2
  • This did work for me on Ubuntu 18.04 May 28 '19 at 16:52
  • 1
    a oneliner command to do this is sudo sed -ri 's/^(Exec=.*)$/#\1/' /etc/xdg/autostart/gnome-initial-setup-first-login.desktop
    – knb
    Jan 27 '20 at 9:17
1

Following @sokunrotanak-srey's route, I'd rather use dpkg-divert like so:

First, replace the Exec=... line with Exec=/bin/true in all the .desktop files to to make them dummy

Second, use dpkg-divert to keep local changes even if the package has a newer version of the .desktop files:

# dpkg-divert --local --add /etc/xdg/autostart/gnome-initial-setup-copy-worker.desktop
Adding 'local diversion of /etc/xdg/autostart/gnome-initial-setup-copy-worker.desktop to /etc/xdg/autostart/gnome-initial-setup-copy-worker.desktop.distrib'

# dpkg-divert --local --add /etc/xdg/autostart/gnome-initial-setup-first-login.desktop
Adding 'local diversion of /etc/xdg/autostart/gnome-initial-setup-first-login.desktop to /etc/xdg/autostart/gnome-initial-setup-first-login.desktop.distrib'

# dpkg-divert --local --add /etc/xdg/autostart/gnome-welcome-tour.desktop
Adding 'local diversion of /etc/xdg/autostart/gnome-welcome-tour.desktop to /etc/xdg/autostart/gnome-welcome-tour.desktop.distrib'
1

I also achieved this by adding the file /etc/skel/.config/gnome-initial-setup-done

sudo touch /etc/skel/.config/gnome-initial-setup-done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.