명령줄에서 "온라인 계정 연결" 대화 상자를 비활성화하려면 어떻게 해야 합니까?

명령줄에서 "온라인 계정 연결" 대화 상자를 비활성화하려면 어떻게 해야 합니까?

프로그래밍 방식으로 사용자를 구성하고 있는데 "온라인 계정 연결"을 요청하는 대화 상자가 표시되지 않도록 하고 싶습니다.

명령줄을 사용하여 이런 일이 발생하지 않도록 하려면 어떻게 해야 합니까?

Ubuntu 19.04 데스크탑 사용

감사해요

답변1

해결 방법- 우분투 19.04에서 테스트되었습니다.

이 포스팅의 도움으로..https://askubuntu.com/a/1123001/739431

Ubuntu 19.04의 초기 설정을 실행하는 명령은 다음과 같습니다./usr/libexec/gnome-initial-setup --existing-user

귀하의 질문이 단지 비활성화하는 것이라면""온라인 계정 연결"을 요청하는 대화 상자입니다.이 게시물은 적합하지 않습니다..

초기 설정은 패키지에서 이루어집니다.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 <[email protected]>
Original-Maintainer: Debian GNOME Maintainers <[email protected]>
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:~$ 

online accounts따라서 소스 파일을 편집할 수 없으면 대화 만 비활성화하는 것은 불가능합니다 .

옵션 1: 패키지 제거 -sudo apt purge gnome-initial-setup

Exec=옵션 2: from the file 로 시작하는 다섯 번째 줄을 주석 처리합니다./etc/xdg/autostart/gnome-initial-setup-first-login.desktop

라인에 주석을 달려면 자동화를 원한다고 언급했으므로 스크립트에 아래 명령을 저장하십시오.

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

언제든지 변경 사항을 되돌리려면 아래 명령을 실행하세요.

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

출력 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

사용자가 새로 생성되고 처음 로그인할 때 줄이 Exec=.. commented이면 사용자는 gnome-initial-setup을 볼 수 없습니다. 그러나 나중에 Exec 줄이 uncommented..일 경우 사용자는 gnome-initial-setup다음 로그인 시 단 한 번만 표시됩니다 .

관련 정보