Did you end up here after running sudo startx
? Nevertheless:
Press Ctrl+Alt+F3 and login into the shell.
Now run ls -lA
. If you see the line
-rw------- 1 root root 53 Nov 29 10:19 .Xauthority
then you need to do chown username:username .Xauthority
and try logging in (you may also need to do the same for for .ICEauthority
).
Else, do ls -ld /tmp
. Check for the first 10 letters in the left: they should read exactly so: drwxrwxrwt
.
drwxrwxrwt 15 root root 4096 Nov 30 04:17 /tmp
Else, you need to do sudo chmod a+wt /tmp
and check again.
If not both, I'd recommend you either
sudo dpkg-reconfigure lightdm
- or uninstall, reinstall it.
Now press Alt+→ until you reach the login screen again, and restart.
I'm guessing you wanted to be able to run commands in your current working directory without typing the prepending ./
? Oh well, this is still fixable.
You've only messed up your own user profile, so we can use the root account to repair this damage. First off, you're going to want to boot into recovery mode on your system. From there, select the option that says root
, which will drop you into a usable terminal.
From there, you want to cd
to your user's home folder (/home/<your username>
, the ~
shortcut will not work here). From there, edit your .profile
file with something like nano
or vi
. Delete the line containing:
export PATH= .:$PATH
Be sure to also check .bashrc
, .bash_profile
and similar files just to be sure. Remove the same line there (if they exist).
If you do want to try this again, be careful to not include spaces in the profile, and be sure to add the .
to the end, like so:
export PATH="$PATH":.
Best Answer
You can either create a new user as suggested by ColonelTrogdor or there are other ways to solve this problem. First login into
tty
by pressing CTRL+ALT+F1Note: Press ALT+F7 to come out from
tty
Solution 1: Reset the Unity and Compiz
Download Unity Reset tool from here.
Note: It should work with Ubuntu 14.04, 13.10 and 13.04.
Reset Unity using the following command
Solution 2 (Most Recommended): Reinstall Ubuntu Desktop (i.e Unity)
Solution 3: Install other Desktop Environment like,Gnome, KDE..etc
Now, I suggest you try Gnome Desktop. It also looks cool.
After trying any solution, just reboot your system.