1

I have an Ubuntu 16.04 system on my laptop. I had installed the program redshift on it which adjusts the screen light to make it easier on the eyes. Today in a bid to always start it up automatically I just added the command "redshift" to the .profile file in my home directory. Unfortunately that has resulted in my being unable to log in since then.

Each time I tried to log in, the system would just get stuck at the post-entering-password screen. Trying to solve the problem, I came across a few other posts on the internet describing similar troubles, the two most closely-matching of those being at Ubuntu 14.04 Login Loop problem after appending .profile file in home folder and even more exactly at https://forums.linuxmint.com/viewtopic.php?t=226498 .

Following the advice there, I have so far done the following:

  1. Entered as root using the Recovery Mode, then made things writable using the command mount -o remount,rw / and from there copied the .profile and .bashrc files from /etc/skel/ to my home directory (i.e. to /home/teepee/ , where teepee is my username). These two files were incidentally not present in my home directory when I checked after entering as root (although they most certainly used to be present whenever I actually logged in to my account earlier). That is why I copied them from the /etc/skel/ directory.

  2. Since that did not help, I tried adding this to the end of /home/teepee/.profile:

    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
    

    as suggested in one of the comments in the above-mentioned pages. That has not helped either.

Kindly let me know what else I may do. I do not wish to reinstall my system as I have lots of significant data on it.

David Foerster
  • 36,890
  • 56
  • 97
  • 151
Jayant
  • 11

2 Answers2

0

There will be someone who will eventually find a solution but if you are trying so hard avoiding to loose your data, I suggest something in another way...

You can make a back up of your profile and save it in a disk or memory stick and then reinstall and copy the files you want to keep.

I leave you a link where you can see how to make a back up...

Sometimes... you should start again... to make a clear path... Hope it helps...

ft18
  • 451
0

The solution for me was found after more than a day of trying to enter as root and decrypt my home directory. I finally took my laptop physically to someone who knows more than I do, and with him the trouble lasted about 12 seconds in all.

Solution: when the screen again got stuck right after I entered the login password, all I needed to do was to press Ctrl+Alt+F1 (or some other Fn key) in order to enter the login shell directly (i.e. in the command line interface). That was all. There I could see precisely where the program was stuck at and terminate it with a Ctrl+C. (It was the program "redshift" trying to connect automatically to the internet, except that connecting to the internet required me to be logged in first.) Then I could simply modify my .profile file directly and everything was resolved.

Thanks to all who commented, for I learned much and my data is still safe.

Jayant
  • 11