briere
Posts: 4
Joined: Fri Apr 17, 2020 2:33 pm

Pi4 : No desktop, only command line (perhaps because of the installation of Git ?)

Fri Apr 17, 2020 2:55 pm

Hello,

I intalled Git yesterday on my Raspberry Pi 4B.

After having done "sudo apt update" and "sudo apt full-upgrade" (and having then rebooted the Raspberry), I wrote "sudo apt install git-all"

But then :
  • When I was clicking on the shortcut of the document browser from the taskbar, an error message was displayed, explaining that the folder menu "Accessories/pcmanfm.desktop" was invalid. (It was displayed in French, since I use may Raspebrry in French)
  • When I was clicking on the shortcut to access the terminal from the taskbar, an error message was displayed, explaining that the folder menu "Accessories/lxterminal.desktop" was invalid.
When I tried to shutdown the Raspberry, nothing happened when I clicked on shutdown or reboot (what I used to do), so I wrote in the terminal "sudo shutdown -h now" (and it worked).


When I switched on the Raspberry today, it asked me for my login and my password and, from then on :
  • I only have a command line (the desktop was never displayed). I rebooted it, I even entered "sudo shutdown -h now" and then unplugged it, but I always get the same terminal.
  • When I enter "startx", il replies (among others) "unable to connect to x server: connection refused".
  • When I try "df -h", it doesn't seem to be full (the maximum percentage of use in the list is 21%)
.

In case it would be useful : "uname -a" leads to "Linux raspberrypi 4.19.97-v71".

Do you have any idea of what happened and how I could solve it ?

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5590
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Pi4 : No desktop, only command line (perhaps because of the installation of Git ?)

Fri Apr 17, 2020 3:57 pm

briere wrote:
Fri Apr 17, 2020 2:55 pm
Hello,

I installed Git yesterday on my Raspberry Pi 4B.

After having done "sudo apt update" and "sudo apt full-upgrade" (and having then rebooted the Raspberry), I wrote "sudo apt install git-all"
...
git is already installed within Raspbian (desktop/full versions, not sure about lite) so why run sudo apt install git-all" ?
According to synaptic (a gui package manager) git-all is a dummy package:

Code: Select all

fast, scalable, distributed revision control system (all subpackages)
  
Git is popular version control system designed to handle very large
 projects with speed and efficiency; it is used for many high profile
open source projects, most notably the Linux kernel.

Git falls in the category of distributed source code management tools.
Every Git working directory is a full-fledged repository with full
revision tracking capabilities, not dependent on network access or a
central server.

This is a dummy package which brings in all subpackages.
Just wondering if you're following some old/inappropriate instructions that included something else that's caused your issues?
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

briere
Posts: 4
Joined: Fri Apr 17, 2020 2:33 pm

Re: Pi4 : No desktop, only command line (perhaps because of the installation of Git ?)

Fri Apr 17, 2020 4:18 pm

Thank you for your quick reply.

I am a beginner with Raspberry Pi and I just followed the instructions I found there https://git-scm.com/book/en/v2/Getting- ... alling-Git (and on some other websites), but I perhaps did not realize that the instructions were not appropriate to my situation...

briere
Posts: 4
Joined: Fri Apr 17, 2020 2:33 pm

Re: Pi4 : No desktop, only command line (perhaps because of the installation of Git ?)

Fri Apr 17, 2020 4:37 pm

To be more precise, I just followed the folllowing part of the link cited in my last message :
If you’re on a Debian-based distribution, such as Ubuntu, try apt:
$ sudo apt install git-all
Then I configured my name and email with "git config --global" (without any problem).

trejan
Posts: 1873
Joined: Tue Jul 02, 2019 2:28 pm

Re: Pi4 : No desktop, only command line (perhaps because of the installation of Git ?)

Fri Apr 17, 2020 5:05 pm

Don't try to install git-all. It pulls in a huge list of packages and some of them like initscripts will badly break your Raspbian install. Easiest "fix" is to reinstall a fresh image. Otherwise you'll need to manually reverse all the changes.

Code: Select all

The following packages were automatically installed and are no longer required:
  bluealsa desktop-file-utils fonts-piboto fuse gdisk gnome-accessibility-themes gnome-themes-extra gnome-themes-extra-data gnome-themes-standard gtk2-engines-clearlookspix gtk2-engines-pixbuf gtk2-engines-pixflat gvfs-common gvfs-libs
  libappstream4 libatasmart4 libavahi-glib1 libblockdev-fs2 libblockdev-loop2 libblockdev-part-err2 libblockdev-part2 libblockdev-swap2 libblockdev-utils2 libblockdev2 libbluetooth3 libcanberra-gtk3-0 libcanberra0 libfuse2
  libgdata-common libgdata22 libglib2.0-bin libgoa-1.0-0b libgoa-1.0-common libgphoto2-6 libgphoto2-port12 libimobiledevice6 libindicator3-7 liblightdm-gobject-1-0 liboauth0 libpackagekit-glib2-18 libparted-fs-resize0 libplist3
  libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0 libstemmer0d libudisks2-0 libunique-1.0-0 libusbmuxd4 libxklavier16 lightdm-gtk-greeter lxde-common lxplug-bluetooth lxplug-cputemp lxplug-ejecter lxplug-network
  lxplug-ptbatt lxplug-volume pi-greeter pi-language-support pi-package-data pishutdown pixflat-icons rpd-plym-splash rpd-wallpaper sound-theme-freedesktop
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils cvs cvsps elpa-async elpa-dash elpa-ghub elpa-git-commit elpa-graphql elpa-let-alist elpa-magit elpa-magit-popup elpa-treepy elpa-with-editor emacs emacs-bin-common emacs-common emacs-el
  emacs-gtk exim4-base exim4-config exim4-daemon-light ghostscript git-cvs git-daemon-run git-doc git-el git-email git-gui git-mediawiki git-svn gitk gitweb gsfonts guile-2.2-libs imagemagick-6-common initscripts insserv
  libalgorithm-c3-perl libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libauthen-sasl-perl libb-hooks-endofscope-perl libb-hooks-op-check-perl libcgi-fast-perl libcgi-pm-perl libclass-c3-perl libclass-c3-xs-perl
  libclass-data-inheritable-perl libclass-factory-util-perl libclass-inspector-perl libclass-method-modifiers-perl libclass-singleton-perl libclass-xsaccessor-perl libcommon-sense-perl libdata-dump-perl libdata-optlist-perl
  libdatetime-format-builder-perl libdatetime-format-iso8601-perl libdatetime-format-strptime-perl libdatetime-locale-perl libdatetime-perl libdatetime-timezone-perl libdbd-sqlite3-perl libdbi-perl libdevel-callchecker-perl
  libdevel-caller-perl libdevel-lexalias-perl libdevel-stacktrace-perl libdigest-bubblebabble-perl libdigest-hmac-perl libdynaloader-functions-perl libemail-valid-perl libencode-locale-perl libeval-closure-perl libexception-class-perl
  libfcgi-perl libfile-listing-perl libfile-sharedir-perl libfont-afm-perl libgc1c2 libgnutls-dane0 libgsasl7 libheif1 libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl
  libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libio-html-perl libio-socket-ssl-perl libjson-perl libjson-xs-perl libkyotocabinet16v5 liblqr-1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl
  liblzo2-2 libm17n-0 libmagickcore-6.q16-6 libmagickwand-6.q16-6 libmailtools-perl libmailutils5 libmediawiki-api-perl libmodule-implementation-perl libmodule-runtime-perl libmro-compat-perl libnamespace-autoclean-perl
  libnamespace-clean-perl libnet-dns-perl libnet-dns-sec-perl libnet-domain-tld-perl libnet-http-perl libnet-ip-perl libnet-libidn-perl libnet-smtp-ssl-perl libnet-ssleay-perl libntlm0 libotf0 libpackage-stash-perl
  libpackage-stash-xs-perl libpadwalker-perl libparams-classify-perl libparams-util-perl libparams-validate-perl libparams-validationcompiler-perl libreadonly-perl libref-util-perl libref-util-xs-perl librole-tiny-perl libserf-1-1
  libspecio-perl libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl libsub-name-perl libsub-quote-perl libsvn-perl libsvn1 libterm-readkey-perl libtimedate-perl libtry-tiny-perl
  libtypes-serialiser-perl libunbound8 liburi-perl libutf8proc2 libvariable-magic-perl libwww-perl libwww-robotrules-perl libyaml-libyaml-perl libyaml-perl m17n-db mailutils mailutils-common perl-openssl-defaults runit runit-helper
  runit-sysv ssl-cert startpar sysuser-helper sysv-rc sysvinit-core tcl tcl8.6 tk tk8.6
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom mksh rcs emacs-common-non-dfsg exim4-doc-html | exim4-doc-info eximon4 spf-tools-perl swaks ghostscript-x meld mediawiki subversion bootchart2 libgssapi-perl libclone-perl
  libmldbm-perl libnet-daemon-perl libsql-statement-perl dns-root-data libcrypt-ssleay-perl m17n-docs libmagickcore-6.q16-6-extra libscalar-number-perl libtest-fatal-perl libauthen-ntlm-perl libyaml-shell-perl gawk mailutils-mh
  mailutils-doc openssl-blacklist bootlogd tcl-tclreadline
The following packages will be REMOVED:
  dbus-user-session gvfs gvfs-backends gvfs-daemons gvfs-fuse libpam-systemd lightdm lxde lxde-core lxpolkit lxsession lxsession-logout openbox-lxde-session packagekit pi-package pi-package-session pipanel piwiz policykit-1
  raspberrypi-ui-mods rp-prefapps systemd-sysv udisks2
The following NEW packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils cvs cvsps elpa-async elpa-dash elpa-ghub elpa-git-commit elpa-graphql elpa-let-alist elpa-magit elpa-magit-popup elpa-treepy elpa-with-editor emacs emacs-bin-common emacs-common emacs-el
  emacs-gtk exim4-base exim4-config exim4-daemon-light ghostscript git-all git-cvs git-daemon-run git-doc git-el git-email git-gui git-mediawiki git-svn gitk gitweb gsfonts guile-2.2-libs imagemagick-6-common initscripts insserv
  libalgorithm-c3-perl libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libauthen-sasl-perl libb-hooks-endofscope-perl libb-hooks-op-check-perl libcgi-fast-perl libcgi-pm-perl libclass-c3-perl libclass-c3-xs-perl
  libclass-data-inheritable-perl libclass-factory-util-perl libclass-inspector-perl libclass-method-modifiers-perl libclass-singleton-perl libclass-xsaccessor-perl libcommon-sense-perl libdata-dump-perl libdata-optlist-perl
  libdatetime-format-builder-perl libdatetime-format-iso8601-perl libdatetime-format-strptime-perl libdatetime-locale-perl libdatetime-perl libdatetime-timezone-perl libdbd-sqlite3-perl libdbi-perl libdevel-callchecker-perl
  libdevel-caller-perl libdevel-lexalias-perl libdevel-stacktrace-perl libdigest-bubblebabble-perl libdigest-hmac-perl libdynaloader-functions-perl libemail-valid-perl libencode-locale-perl libeval-closure-perl libexception-class-perl
  libfcgi-perl libfile-listing-perl libfile-sharedir-perl libfont-afm-perl libgc1c2 libgnutls-dane0 libgsasl7 libheif1 libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl
  libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libio-html-perl libio-socket-ssl-perl libjson-perl libjson-xs-perl libkyotocabinet16v5 liblqr-1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl
  liblzo2-2 libm17n-0 libmagickcore-6.q16-6 libmagickwand-6.q16-6 libmailtools-perl libmailutils5 libmediawiki-api-perl libmodule-implementation-perl libmodule-runtime-perl libmro-compat-perl libnamespace-autoclean-perl
  libnamespace-clean-perl libnet-dns-perl libnet-dns-sec-perl libnet-domain-tld-perl libnet-http-perl libnet-ip-perl libnet-libidn-perl libnet-smtp-ssl-perl libnet-ssleay-perl libntlm0 libotf0 libpackage-stash-perl
  libpackage-stash-xs-perl libpadwalker-perl libparams-classify-perl libparams-util-perl libparams-validate-perl libparams-validationcompiler-perl libreadonly-perl libref-util-perl libref-util-xs-perl librole-tiny-perl libserf-1-1
  libspecio-perl libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl libsub-name-perl libsub-quote-perl libsvn-perl libsvn1 libterm-readkey-perl libtimedate-perl libtry-tiny-perl
  libtypes-serialiser-perl libunbound8 liburi-perl libutf8proc2 libvariable-magic-perl libwww-perl libwww-robotrules-perl libyaml-libyaml-perl libyaml-perl m17n-db mailutils mailutils-common perl-openssl-defaults runit runit-helper
  runit-sysv ssl-cert startpar sysuser-helper sysv-rc sysvinit-core tcl tcl8.6 tk tk8.6

User avatar
Paeryn
Posts: 2952
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Pi4 : No desktop, only command line (perhaps because of the installation of Git ?)

Fri Apr 17, 2020 5:13 pm

git-all has a recommended dependency that wants sysvinit but sysvinit and systemd can't both be installed so apt goes ahead and uninstalls systemd along with everything that requires it so it can install sysvinit.

You might get away with looking in apt's log to find out which packages were removed when you asked it to install git-all and reinstall them. See posts from this thread for details.
She who travels light — forgot something.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5590
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Pi4 : No desktop, only command line (perhaps because of the installation of Git ?)

Fri Apr 17, 2020 5:21 pm

briere wrote:
Fri Apr 17, 2020 4:37 pm
To be more precise, I just followed the folllowing part of the link cited in my last message :
If you’re on a Debian-based distribution, such as Ubuntu, try apt:
$ sudo apt install git-all
Then I configured my name and email with "git config --global" (without any problem).
I suspect that's associated ("only necessary") if you intend to set up a git repository that others might access. (The parts of) git already installed are sufficient to access (clone) existing repositories AFAIK. Personally, because I'm, perhaps a "tad old-fashioned", and it's what I've used historically, I tend to simply use RCS/CVS and GNU autoconf, automake etc. methods to version control/distribute my demo. codes in traditional tarballs eg. see: https://www.cpmspectrepi.uk/raspberry_p ... tware.html
and https://www.cpmspectrepi.uk/raspberry_p ... cking.html
Git, and similar approaches are, perhaps, more suited to multi-author/contributor software management, especially "over the web" ;)
Trev.
[Edit] Whilst writing the above I see others have posted explanations about what has probably been broken by the git-all install.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

briere
Posts: 4
Joined: Fri Apr 17, 2020 2:33 pm

Re: Pi4 : No desktop, only command line (perhaps because of the installation of Git ?)

Fri Apr 17, 2020 10:01 pm

Thank you very much for your help and your explanations !
According to the logs, what is described in the thread you mentioned seems to be exactly what happened to me... I reinstalled the removed packages which had not already been automatically installed and I got my dekstop back ! While reinstalling them, I had many "Error: Timeout was reached" but I could re-run the commands, so I think (and hope) all went well.

The first time I tried I still had the "Accessories/pcmanfm.desktop was invalid" and "Accessories/lxterminal.desktop was invalid "problems mentioned in my first message (about the shortcuts of the taskbar), but then it returned to normal without me doing anything.

Thank you so much !!

Return to “Troubleshooting”