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:
Entered as root using the Recovery Mode, then made things writable using the command
mount -o remount,rw /and from there copied the.profileand.bashrcfiles 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.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/gamesas 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.