I can't login to the graphical interface after a fresh installation of Debian?

I learned a lot from this issue, and here's how to fix it, when you install Debian from CD 1 and you don't use a mirror, the base system will be installed only, and the apt sources.list files contains only the cdrom source and the security updates source.

So first we need to add a packages repository to the file /etc/apt/sources.list

in the command line run

nano /etc/apt/sources.list

and add

deb http://ftp.<COUNTRY>.debian.org/debian/ stable main
deb-src http://ftp.<COUNTRY>.debian.org/debian/ stable main

after that we need to run

apt-get update

I chose to install the default environment using tasksel, we need to install aptitude and tasksel so we can install Gnome

apt-get install aptitude tasksel

and then

tasksel install gnome-desktop --new-install

now the gnomw-desktop task will be installed, and then you can run startx to start the environment.


Suggest you uninstall GNOME

Since your GNOME has failed, suggest you uninstall it

sudo apt-get remove libgtk-3-common
sudo apt-get install ppa-purge
sudo ppa-purge ppa:gnome3-team/gnome3
sudo apt-get dist-upgrade
sudo shutdown –r now

then install one desktop environment with one of the below commands:

  • LXDE

    sudo apt-get install task-lxde-desktop
    
  • XFCE

    sudo apt-get install xfce4 xfce4-goodies
    
  • GNOME

    sudo apt-get install aptitude tasksel && tasksel install gnome-desktop --new-install
    
  • KDE

    sudo apt-get install aptitude tasksel && sudo aptitude --without-recommends install ~t^standard$ ~t^desktop$ ~t^kde-desktop$
    

Which? Well, DebianWiki's Desktop How To says GNOME is the default, and here's the excerpt for others:

KDE is of course a renown(ed) heavy alternative.

Xfce is a fast and light alternative, and especially suited if you were using GNOME 2 and find GNOME 3 disappointing.

For older computers, consider using LXDE or Xfce, because they are less resource-hungry than GNOME or KDE.

Me, I find Xfce does all I need to do.