Messed up my PATH environment variable and can't login to desktop
To get an maven environment variable to run, I tried several options. Basically, I followed some options from Ubuntu Community Page, such as ~/.pam_environment
, /etc/bash.bashrc
and I don't really know anymore. Within them I exported sth like export PATH=/opt/apache-maven-3.6.0/bin:$PATH
(I'm being so unconcrete because I cannot look it up).
Afterwards, I did run gnome-session-quit
and my machine got stuck.
So after hard restart I try to login again, but I'm not able to do that: I see my username, enter the password, hit enter, screen turns black and after 2 seconds I'm back at the login screen.
So, that very strange and worrying. Next step: Login via tty (Strg + ALT + F3
). Within there I can login, but can not do much. I thought about sth like removing .Xauthority file. But whatever I do: The command could not be located because 'bin' is not included in the PATH environment variable.
I think, altogether thats alarming and I'm getting really nervous.
Executing export PATH="/usr/bin:$PATH
seems to work and echo $PATH
gives an output starting with /usr/bin:/usr/bin:/usr/bin:/home/user/Documents/.../esper/examples/transaction/etc:/home/user/anaconda3/bin:/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin:/opt/apache-maven-3.6.0/bin:/opt/apache-maven-3.6.0/bin:/opt/apache-maven-3.6.0/bin
but does not really help.
I'm running an Ubuntu 18.04 on an Lenovo G50-70.
Can you help me accessing my desktop again and/or fixing my PATH issue?
18.04 environment-variables gnome-session
|
show 4 more comments
To get an maven environment variable to run, I tried several options. Basically, I followed some options from Ubuntu Community Page, such as ~/.pam_environment
, /etc/bash.bashrc
and I don't really know anymore. Within them I exported sth like export PATH=/opt/apache-maven-3.6.0/bin:$PATH
(I'm being so unconcrete because I cannot look it up).
Afterwards, I did run gnome-session-quit
and my machine got stuck.
So after hard restart I try to login again, but I'm not able to do that: I see my username, enter the password, hit enter, screen turns black and after 2 seconds I'm back at the login screen.
So, that very strange and worrying. Next step: Login via tty (Strg + ALT + F3
). Within there I can login, but can not do much. I thought about sth like removing .Xauthority file. But whatever I do: The command could not be located because 'bin' is not included in the PATH environment variable.
I think, altogether thats alarming and I'm getting really nervous.
Executing export PATH="/usr/bin:$PATH
seems to work and echo $PATH
gives an output starting with /usr/bin:/usr/bin:/usr/bin:/home/user/Documents/.../esper/examples/transaction/etc:/home/user/anaconda3/bin:/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin:/opt/apache-maven-3.6.0/bin:/opt/apache-maven-3.6.0/bin:/opt/apache-maven-3.6.0/bin
but does not really help.
I'm running an Ubuntu 18.04 on an Lenovo G50-70.
Can you help me accessing my desktop again and/or fixing my PATH issue?
18.04 environment-variables gnome-session
can you update your question with the output fromecho $PATH
? The snippet you provided is incomplete. Adding/usr/bin
to the PATH a second time is futile.
– WinEunuuchs2Unix
Dec 19 at 0:22
Yeah, of course. See above.
– So S
Dec 19 at 0:28
1
Try this:PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$PATH
and let me know if you can use the system normally.
– WinEunuuchs2Unix
Dec 19 at 0:34
That helps. I'm now able to use commands likell
,nano
again. That's definitely going in the right direction.
– So S
Dec 19 at 0:40
Can you rungedit
?
– WinEunuuchs2Unix
Dec 19 at 0:41
|
show 4 more comments
To get an maven environment variable to run, I tried several options. Basically, I followed some options from Ubuntu Community Page, such as ~/.pam_environment
, /etc/bash.bashrc
and I don't really know anymore. Within them I exported sth like export PATH=/opt/apache-maven-3.6.0/bin:$PATH
(I'm being so unconcrete because I cannot look it up).
Afterwards, I did run gnome-session-quit
and my machine got stuck.
So after hard restart I try to login again, but I'm not able to do that: I see my username, enter the password, hit enter, screen turns black and after 2 seconds I'm back at the login screen.
So, that very strange and worrying. Next step: Login via tty (Strg + ALT + F3
). Within there I can login, but can not do much. I thought about sth like removing .Xauthority file. But whatever I do: The command could not be located because 'bin' is not included in the PATH environment variable.
I think, altogether thats alarming and I'm getting really nervous.
Executing export PATH="/usr/bin:$PATH
seems to work and echo $PATH
gives an output starting with /usr/bin:/usr/bin:/usr/bin:/home/user/Documents/.../esper/examples/transaction/etc:/home/user/anaconda3/bin:/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin:/opt/apache-maven-3.6.0/bin:/opt/apache-maven-3.6.0/bin:/opt/apache-maven-3.6.0/bin
but does not really help.
I'm running an Ubuntu 18.04 on an Lenovo G50-70.
Can you help me accessing my desktop again and/or fixing my PATH issue?
18.04 environment-variables gnome-session
To get an maven environment variable to run, I tried several options. Basically, I followed some options from Ubuntu Community Page, such as ~/.pam_environment
, /etc/bash.bashrc
and I don't really know anymore. Within them I exported sth like export PATH=/opt/apache-maven-3.6.0/bin:$PATH
(I'm being so unconcrete because I cannot look it up).
Afterwards, I did run gnome-session-quit
and my machine got stuck.
So after hard restart I try to login again, but I'm not able to do that: I see my username, enter the password, hit enter, screen turns black and after 2 seconds I'm back at the login screen.
So, that very strange and worrying. Next step: Login via tty (Strg + ALT + F3
). Within there I can login, but can not do much. I thought about sth like removing .Xauthority file. But whatever I do: The command could not be located because 'bin' is not included in the PATH environment variable.
I think, altogether thats alarming and I'm getting really nervous.
Executing export PATH="/usr/bin:$PATH
seems to work and echo $PATH
gives an output starting with /usr/bin:/usr/bin:/usr/bin:/home/user/Documents/.../esper/examples/transaction/etc:/home/user/anaconda3/bin:/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin:/opt/apache-maven-3.6.0/bin:/opt/apache-maven-3.6.0/bin:/opt/apache-maven-3.6.0/bin
but does not really help.
I'm running an Ubuntu 18.04 on an Lenovo G50-70.
Can you help me accessing my desktop again and/or fixing my PATH issue?
18.04 environment-variables gnome-session
18.04 environment-variables gnome-session
edited Dec 19 at 0:27
asked Dec 19 at 0:06
So S
4315
4315
can you update your question with the output fromecho $PATH
? The snippet you provided is incomplete. Adding/usr/bin
to the PATH a second time is futile.
– WinEunuuchs2Unix
Dec 19 at 0:22
Yeah, of course. See above.
– So S
Dec 19 at 0:28
1
Try this:PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$PATH
and let me know if you can use the system normally.
– WinEunuuchs2Unix
Dec 19 at 0:34
That helps. I'm now able to use commands likell
,nano
again. That's definitely going in the right direction.
– So S
Dec 19 at 0:40
Can you rungedit
?
– WinEunuuchs2Unix
Dec 19 at 0:41
|
show 4 more comments
can you update your question with the output fromecho $PATH
? The snippet you provided is incomplete. Adding/usr/bin
to the PATH a second time is futile.
– WinEunuuchs2Unix
Dec 19 at 0:22
Yeah, of course. See above.
– So S
Dec 19 at 0:28
1
Try this:PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$PATH
and let me know if you can use the system normally.
– WinEunuuchs2Unix
Dec 19 at 0:34
That helps. I'm now able to use commands likell
,nano
again. That's definitely going in the right direction.
– So S
Dec 19 at 0:40
Can you rungedit
?
– WinEunuuchs2Unix
Dec 19 at 0:41
can you update your question with the output from
echo $PATH
? The snippet you provided is incomplete. Adding /usr/bin
to the PATH a second time is futile.– WinEunuuchs2Unix
Dec 19 at 0:22
can you update your question with the output from
echo $PATH
? The snippet you provided is incomplete. Adding /usr/bin
to the PATH a second time is futile.– WinEunuuchs2Unix
Dec 19 at 0:22
Yeah, of course. See above.
– So S
Dec 19 at 0:28
Yeah, of course. See above.
– So S
Dec 19 at 0:28
1
1
Try this:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$PATH
and let me know if you can use the system normally.– WinEunuuchs2Unix
Dec 19 at 0:34
Try this:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$PATH
and let me know if you can use the system normally.– WinEunuuchs2Unix
Dec 19 at 0:34
That helps. I'm now able to use commands like
ll
, nano
again. That's definitely going in the right direction.– So S
Dec 19 at 0:40
That helps. I'm now able to use commands like
ll
, nano
again. That's definitely going in the right direction.– So S
Dec 19 at 0:40
Can you run
gedit
?– WinEunuuchs2Unix
Dec 19 at 0:41
Can you run
gedit
?– WinEunuuchs2Unix
Dec 19 at 0:41
|
show 4 more comments
1 Answer
1
active
oldest
votes
Enter this command:
nano /etc/environment
Make the first line read:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:"
Press Ctrl+O to save the file.
Press Ctrl+X to exit.
Type reboot
to restart your computer.
I tried this approach. Nevertheless, after reboot I got the same problem. Therefore, I logged in via tty again. Within there I had to runPATH=/usr/...
again, to be able to use the terminal. The changes made to/etc/environment
are still there.
– So S
Dec 19 at 1:00
Okay, I think I fixed the problem. Therefore, I did two things: Removing all previously made changes to any file that stores environment variables. Then I was able to login again ;). During login a message popped up pointing to an error in my/home/user/.profile
. Within there I must have somehow uncommented the first line, whích caused the error. Thank you very much @WinEunuuchs2Unic, you have been very helpful at solving this issue!
– So S
Dec 19 at 1:21
@SoS You're most welcome. I actually screwed up my own/etc/environment
during this exercise but was able to rebuild it from our message history. Just now I added it to my daily backup though :)
– WinEunuuchs2Unix
Dec 19 at 1:35
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1102970%2fmessed-up-my-path-environment-variable-and-cant-login-to-desktop%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Enter this command:
nano /etc/environment
Make the first line read:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:"
Press Ctrl+O to save the file.
Press Ctrl+X to exit.
Type reboot
to restart your computer.
I tried this approach. Nevertheless, after reboot I got the same problem. Therefore, I logged in via tty again. Within there I had to runPATH=/usr/...
again, to be able to use the terminal. The changes made to/etc/environment
are still there.
– So S
Dec 19 at 1:00
Okay, I think I fixed the problem. Therefore, I did two things: Removing all previously made changes to any file that stores environment variables. Then I was able to login again ;). During login a message popped up pointing to an error in my/home/user/.profile
. Within there I must have somehow uncommented the first line, whích caused the error. Thank you very much @WinEunuuchs2Unic, you have been very helpful at solving this issue!
– So S
Dec 19 at 1:21
@SoS You're most welcome. I actually screwed up my own/etc/environment
during this exercise but was able to rebuild it from our message history. Just now I added it to my daily backup though :)
– WinEunuuchs2Unix
Dec 19 at 1:35
add a comment |
Enter this command:
nano /etc/environment
Make the first line read:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:"
Press Ctrl+O to save the file.
Press Ctrl+X to exit.
Type reboot
to restart your computer.
I tried this approach. Nevertheless, after reboot I got the same problem. Therefore, I logged in via tty again. Within there I had to runPATH=/usr/...
again, to be able to use the terminal. The changes made to/etc/environment
are still there.
– So S
Dec 19 at 1:00
Okay, I think I fixed the problem. Therefore, I did two things: Removing all previously made changes to any file that stores environment variables. Then I was able to login again ;). During login a message popped up pointing to an error in my/home/user/.profile
. Within there I must have somehow uncommented the first line, whích caused the error. Thank you very much @WinEunuuchs2Unic, you have been very helpful at solving this issue!
– So S
Dec 19 at 1:21
@SoS You're most welcome. I actually screwed up my own/etc/environment
during this exercise but was able to rebuild it from our message history. Just now I added it to my daily backup though :)
– WinEunuuchs2Unix
Dec 19 at 1:35
add a comment |
Enter this command:
nano /etc/environment
Make the first line read:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:"
Press Ctrl+O to save the file.
Press Ctrl+X to exit.
Type reboot
to restart your computer.
Enter this command:
nano /etc/environment
Make the first line read:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:"
Press Ctrl+O to save the file.
Press Ctrl+X to exit.
Type reboot
to restart your computer.
answered Dec 19 at 0:50
WinEunuuchs2Unix
42.3k1072162
42.3k1072162
I tried this approach. Nevertheless, after reboot I got the same problem. Therefore, I logged in via tty again. Within there I had to runPATH=/usr/...
again, to be able to use the terminal. The changes made to/etc/environment
are still there.
– So S
Dec 19 at 1:00
Okay, I think I fixed the problem. Therefore, I did two things: Removing all previously made changes to any file that stores environment variables. Then I was able to login again ;). During login a message popped up pointing to an error in my/home/user/.profile
. Within there I must have somehow uncommented the first line, whích caused the error. Thank you very much @WinEunuuchs2Unic, you have been very helpful at solving this issue!
– So S
Dec 19 at 1:21
@SoS You're most welcome. I actually screwed up my own/etc/environment
during this exercise but was able to rebuild it from our message history. Just now I added it to my daily backup though :)
– WinEunuuchs2Unix
Dec 19 at 1:35
add a comment |
I tried this approach. Nevertheless, after reboot I got the same problem. Therefore, I logged in via tty again. Within there I had to runPATH=/usr/...
again, to be able to use the terminal. The changes made to/etc/environment
are still there.
– So S
Dec 19 at 1:00
Okay, I think I fixed the problem. Therefore, I did two things: Removing all previously made changes to any file that stores environment variables. Then I was able to login again ;). During login a message popped up pointing to an error in my/home/user/.profile
. Within there I must have somehow uncommented the first line, whích caused the error. Thank you very much @WinEunuuchs2Unic, you have been very helpful at solving this issue!
– So S
Dec 19 at 1:21
@SoS You're most welcome. I actually screwed up my own/etc/environment
during this exercise but was able to rebuild it from our message history. Just now I added it to my daily backup though :)
– WinEunuuchs2Unix
Dec 19 at 1:35
I tried this approach. Nevertheless, after reboot I got the same problem. Therefore, I logged in via tty again. Within there I had to run
PATH=/usr/...
again, to be able to use the terminal. The changes made to /etc/environment
are still there.– So S
Dec 19 at 1:00
I tried this approach. Nevertheless, after reboot I got the same problem. Therefore, I logged in via tty again. Within there I had to run
PATH=/usr/...
again, to be able to use the terminal. The changes made to /etc/environment
are still there.– So S
Dec 19 at 1:00
Okay, I think I fixed the problem. Therefore, I did two things: Removing all previously made changes to any file that stores environment variables. Then I was able to login again ;). During login a message popped up pointing to an error in my
/home/user/.profile
. Within there I must have somehow uncommented the first line, whích caused the error. Thank you very much @WinEunuuchs2Unic, you have been very helpful at solving this issue!– So S
Dec 19 at 1:21
Okay, I think I fixed the problem. Therefore, I did two things: Removing all previously made changes to any file that stores environment variables. Then I was able to login again ;). During login a message popped up pointing to an error in my
/home/user/.profile
. Within there I must have somehow uncommented the first line, whích caused the error. Thank you very much @WinEunuuchs2Unic, you have been very helpful at solving this issue!– So S
Dec 19 at 1:21
@SoS You're most welcome. I actually screwed up my own
/etc/environment
during this exercise but was able to rebuild it from our message history. Just now I added it to my daily backup though :)– WinEunuuchs2Unix
Dec 19 at 1:35
@SoS You're most welcome. I actually screwed up my own
/etc/environment
during this exercise but was able to rebuild it from our message history. Just now I added it to my daily backup though :)– WinEunuuchs2Unix
Dec 19 at 1:35
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1102970%2fmessed-up-my-path-environment-variable-and-cant-login-to-desktop%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
can you update your question with the output from
echo $PATH
? The snippet you provided is incomplete. Adding/usr/bin
to the PATH a second time is futile.– WinEunuuchs2Unix
Dec 19 at 0:22
Yeah, of course. See above.
– So S
Dec 19 at 0:28
1
Try this:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$PATH
and let me know if you can use the system normally.– WinEunuuchs2Unix
Dec 19 at 0:34
That helps. I'm now able to use commands like
ll
,nano
again. That's definitely going in the right direction.– So S
Dec 19 at 0:40
Can you run
gedit
?– WinEunuuchs2Unix
Dec 19 at 0:41