1

I'm configuring users programatically and I don't want them to see the dialog that asks them to "Connect your online accounts".

Using the command line, how can I prevent this ever coming up?

Using Ubuntu 19.04 desktop

thanks

1

1 Answer 1

0

Workaround - Tested in Ubuntu 19.04

with the help of this post.. https://askubuntu.com/a/1123001/739431

the command that executes the initial setup for Ubuntu 19.04 is /usr/libexec/gnome-initial-setup --existing-user

If your question is only to disable "the dialog that asks them to "Connect your online accounts". this post is not suitable..

the initial setup is from the package gnome-initial-setup

pratap@i7-6550U:~$ apt show gnome-initial-setup
Package: gnome-initial-setup
Version: 3.32.1-1ubuntu3
Priority: optional
Section: gnome
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 1,966 kB
Depends: libaccountsservice0 (>= 0.6.24), libc6 (>= 2.29), libcairo2 (>= 1.2.4), libcheese-gtk25 (>= 3.18.0), libcheese8 (>= 3.18.0), libfontconfig1 (>= 2.12.6), libgdk-pixbuf2.0-0 (>= 2.25.2), libgdm1 (>= 3.8.3), libgeoclue-2-0 (>= 2.4.0), libglib2.0-0 (>= 2.46.0), libgnome-desktop-3-17 (>= 3.17.92), libgoa-1.0-0b (>= 3.5.90), libgoa-backend-1.0-1 (>= 3.10.0), libgtk-3-0 (>= 3.22.29), libgweather-3-15 (>= 3.13.91), libibus-1.0-5 (>= 1.5.2), libjson-glib-1.0-0 (>= 0.12.0), libkrb5-3 (>= 1.8+dfsg), libnm0 (>= 1.0.0), libnma0 (>= 1.1.90), libpango-1.0-0 (>= 1.32.5), libpangocairo-1.0-0 (>= 1.32.5), libpolkit-gobject-1-0 (>= 0.99), libpwquality1 (>= 1.1.0), librest-0.7-0 (>= 0.7), libsecret-1-0 (>= 0.18), libsnapd-glib1 (>= 1.42), libsoup2.4-1 (>= 2.41.90), libsysmetrics1 (>= 1.0.5), libwebkit2gtk-4.0-37 (>= 2.5.3), policykit-1 (>= 0.103), adduser, gnome-settings-daemon (>= 3.24), gnome-control-center-data
Recommends: gnome-getting-started-docs
Suggests: gdm3
Homepage: https://git.gnome.org/browse/gnome-initial-setup/
Task: ubuntu-desktop-minimal, ubuntu-desktop
Supported: 9m
Download-Size: 1,166 kB
APT-Manual-Installed: yes
APT-Sources: http://in.archive.ubuntu.com/ubuntu disco/main amd64 Packages
Description: Initial GNOME system setup helper
 After acquiring or installing a new system there are a few essential things
 to set up before use. GNOME Initial Setup aims to provide a simple, easy,
 and safe way to prepare a new system.
 .
 GNOME Initial Setup runs the first time you log in to the GNOME desktop
 and lets you easily configure your language, keyboard layout, online accounts
 integration, and more.
 .
 If you want to configure these things at any other time, run the Settings app.

pratap@i7-6550U:~$ 

So it is not possible to disable only the online accounts dialogue unless one can edit the source files..

Option 1: remove the package - sudo apt purge gnome-initial-setup

Option 2: Comment the 5th line which starts with Exec= from the file /etc/xdg/autostart/gnome-initial-setup-first-login.desktop

to comment the line, since you mentioned that you want automation, save the below command in your script..

sudo sed -i 5d /etc/xdg/autostart/gnome-initial-setup-first-login.desktop && sudo sed -i '5i#Exec=/usr/libexec/gnome-initial-setup --existing-user' /etc/xdg/autostart/gnome-initial-setup-first-login.desktop

to revert the changes at any time run the below command

sudo sed -i 5d /etc/xdg/autostart/gnome-initial-setup-first-login.desktop && sudo sed -i '5iExec=/usr/libexec/gnome-initial-setup --existing-user' /etc/xdg/autostart/gnome-initial-setup-first-login.desktop

Output of nano /etc/xdg/autostart/gnome-initial-setup-first-login.desktop

[Desktop Entry]
Name=Initial Setup
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=preferences-system
Exec=/usr/libexec/gnome-initial-setup --existing-user
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;System;
OnlyShowIn=GNOME;Unity;
NoDisplay=true
AutostartCondition=unless-exists gnome-initial-setup-done
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-initial-setup
X-GNOME-Bugzilla-Component=general
X-GNOME-Bugzilla-Version=unknown
X-Ubuntu-Gettext-Domain=gnome-initial-setup

Please note that, when the user is newly created and at his first login if the Exec= line is commented.. the user will not see gnome-initial-setup, however.. If at later stage when the Exec line is uncommented.. the user will be shown the gnome-initial-setup at his next login for one and only once..

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.