15

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?

Dean
  • 411

6 Answers6

16

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.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
Dean
  • 411
  • 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 ? – Jean Coiron Aug 16 '18 at 14:43
9

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.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
Hupe
  • 99
  • 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 09:06
7

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).

Alexis Wilke
  • 2,707
5

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
knb
  • 5,004
2

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

sudo touch /etc/skel/.config/gnome-initial-setup-done
ed1013
  • 21
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'
tonejito
  • 111
  • 3