0

I changed my ~/.profile and added few lines to make it run when i login to my user account :

google-chrome # to start chrome
code # to start vs code
exit 0

but since then i can't login i tried to use guest session to login with ctrl+alt+f1 but whenever i type my username and password i get logged in then it asks me to log in again, if I can undo my changes to that file I think I will be able to log in back normally but every solution i found depends on the ctrl+alt+f1-f6 solution which won't work for me...

  • 1
    You could probably use recovery mode to fix this. See How do I boot into recovery mode? – wjandrea Dec 21 '17 at 9:01
  • 3
    BTW, it's the exit 0 that's the main problem. It signs you out as soon as it runs. Also, GUI programs (i.e. Chrome and VS Code) should be set up in Startup Applications, not ~/.profile. – wjandrea Dec 21 '17 at 9:03
  • I couldn't reach the GRUB I tried to hold shift and tried esc but both didn't work, my labtop is hp i remember getting into it on lenovo, i don't know what is the wrong thing I'm doing – Ashar Dweedar Dec 21 '17 at 9:38
1

You can boot from Ubuntu install CD or USB. Your hard drive should automount in a subdirectory in /media/ubuntu/harddrive_blockdevice_number/ which will be the root directory. Then edit the profile from that directory:

sudo vi home/username/.profile

  • i couldn't get to the file but i used USB to reinstall ubuntu again – Ashar Dweedar Dec 21 '17 at 15:57

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.