Is .profile read upon GUI login

Solution 1:

Quoted from https://help.ubuntu.com/community/EnvironmentVariables#A.2BAH4-.2F.profile

~/.profile

In this file you can also place environment variable assignments, since it gets executed automatically by the DisplayManager during the start-up process desktop session as well as by the login shell when one logs in from the textual console. This is a ~/.profile equivalent of the above example:

export FOO=bar export PATH="$PATH:$HOME/MyPrograms" Note: The code in ~/.profile is run after ~/.pam_environment has been read. That makes ~/.profile suitable to use if you want to override a locale related variable that was set in ~/.pam_environment via e.g. Language Support.

It gets executed automatically by the DisplayManager during the start-up process desktop session as well as by the login shell when one logs in from the textual console.

This means that either GUI or CLI will read and use .profile

Is there a way to log in to Ubuntu locally via the terminal only

The answer is sure. you can either use:

  • Virtual terminals(consoles) tty[1..6]
  • Booting in text mode

Virtual terminals(consoles) tty[1..6]

To use tty[1..7] just press the shortcut Ctrl+Alt+F[1..6]

PS: tty[1..6] = tty1 ,tty2, ... tty6

To boot into true text mode

Edit in /etc/default/grub

Stops the Ubuntu splash

#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Uncomment to disable graphical terminal by removing the leading hash #

GRUB_TERMINAL=console

Then update your grub to load the new configuration:

sudo update-grub