Cant login to ubuntu 16.04 (this is fifth time in last week) [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
2
down vote

favorite













This question already has an answer here:



  • Ubuntu gets stuck in a login loop

    39 answers



I am on mobile.



This is fifth time. I reinstalled four times.



Please look at my recent questions.



I entet password and it says xxx files xx blocks and keep showing logib screen.



I dont know what caused this.



I installed as usual chrome yakuake zsh notepadqq inteljidea nvidia mysql emma



Changed



etc enviroment
Zshrc
Anthome javahome



Please help me. I dont want to reinstall :( or break my desktop



This is 5. Times happening same thing. I dont know what i am doing to cause.



What i did:



  • I removed nvidia, settings but did not work.

  • Renamed xauthotiry to see if causing. But not worked

  • sudo dkpgreconfigure lightdm

  • var log xorg 0 log shows no error. I couksnot find any error or warning there. But maybe i am looking wrong. This is image fron there. Only error is that. Can you look
    https://pasteboard.co/HpnxnQC.jpg

  • This is xsessionerrors
    https://pasteboard.co/HpnyrRv.jpg


  • ls -al , all of them are my user except dbus. It is root. Inside tmp, all of rhem are root. Such as xim unix



    Any suggestions?








share|improve this question













marked as duplicate by Eric Carvalho, K7AAY, Melebius, waltinator, George Udosen Jun 13 at 15:54


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 4




    "Dont you see it is different." No, unfortunately not. Saying "I tried everything" is as good as "I tried nothing", neither holds specific information. And your description of the issue with going to a black screen and returning to the login after entering the password perfectly matches that common issue. Anyway, thanks for updating your question so far. Do you have a ~/.xsession-errors file with any useful messages? Have you checked permissions of your home directory and the /tmp folder?
    – Byte Commander
    Jun 11 at 9:37







  • 2




    Thank you for asking to try to help. I looked xsession and saw those pasteboard.co/HpnyrRv.jpg sorry , i am on mobile and cant write so much thing. Photo is easier. At home, i tried from other desktop, it was easier. Now i am at work and i am on panic. For ls -al , all of them are my user except dbus. It is root. Inside tmp, all of rhem are root. Such as xim unix
    – hristof kuallamp
    Jun 11 at 9:44







  • 1




    @ByteCommander So, should this question be closed as a duplicate now? An answer regarding modified /etc/environment already exists below the linked question.
    – Melebius
    Jun 11 at 12:45






  • 2




    @Melebius Could be, but not necessarily. That post is linked, but as this one is answered well now, it doesn't really matter whether it gets closed or not. I retracted my close vote earlier, but everyone may form their own opinion.
    – Byte Commander
    Jun 11 at 12:50














up vote
2
down vote

favorite













This question already has an answer here:



  • Ubuntu gets stuck in a login loop

    39 answers



I am on mobile.



This is fifth time. I reinstalled four times.



Please look at my recent questions.



I entet password and it says xxx files xx blocks and keep showing logib screen.



I dont know what caused this.



I installed as usual chrome yakuake zsh notepadqq inteljidea nvidia mysql emma



Changed



etc enviroment
Zshrc
Anthome javahome



Please help me. I dont want to reinstall :( or break my desktop



This is 5. Times happening same thing. I dont know what i am doing to cause.



What i did:



  • I removed nvidia, settings but did not work.

  • Renamed xauthotiry to see if causing. But not worked

  • sudo dkpgreconfigure lightdm

  • var log xorg 0 log shows no error. I couksnot find any error or warning there. But maybe i am looking wrong. This is image fron there. Only error is that. Can you look
    https://pasteboard.co/HpnxnQC.jpg

  • This is xsessionerrors
    https://pasteboard.co/HpnyrRv.jpg


  • ls -al , all of them are my user except dbus. It is root. Inside tmp, all of rhem are root. Such as xim unix



    Any suggestions?








share|improve this question













marked as duplicate by Eric Carvalho, K7AAY, Melebius, waltinator, George Udosen Jun 13 at 15:54


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 4




    "Dont you see it is different." No, unfortunately not. Saying "I tried everything" is as good as "I tried nothing", neither holds specific information. And your description of the issue with going to a black screen and returning to the login after entering the password perfectly matches that common issue. Anyway, thanks for updating your question so far. Do you have a ~/.xsession-errors file with any useful messages? Have you checked permissions of your home directory and the /tmp folder?
    – Byte Commander
    Jun 11 at 9:37







  • 2




    Thank you for asking to try to help. I looked xsession and saw those pasteboard.co/HpnyrRv.jpg sorry , i am on mobile and cant write so much thing. Photo is easier. At home, i tried from other desktop, it was easier. Now i am at work and i am on panic. For ls -al , all of them are my user except dbus. It is root. Inside tmp, all of rhem are root. Such as xim unix
    – hristof kuallamp
    Jun 11 at 9:44







  • 1




    @ByteCommander So, should this question be closed as a duplicate now? An answer regarding modified /etc/environment already exists below the linked question.
    – Melebius
    Jun 11 at 12:45






  • 2




    @Melebius Could be, but not necessarily. That post is linked, but as this one is answered well now, it doesn't really matter whether it gets closed or not. I retracted my close vote earlier, but everyone may form their own opinion.
    – Byte Commander
    Jun 11 at 12:50












up vote
2
down vote

favorite









up vote
2
down vote

favorite












This question already has an answer here:



  • Ubuntu gets stuck in a login loop

    39 answers



I am on mobile.



This is fifth time. I reinstalled four times.



Please look at my recent questions.



I entet password and it says xxx files xx blocks and keep showing logib screen.



I dont know what caused this.



I installed as usual chrome yakuake zsh notepadqq inteljidea nvidia mysql emma



Changed



etc enviroment
Zshrc
Anthome javahome



Please help me. I dont want to reinstall :( or break my desktop



This is 5. Times happening same thing. I dont know what i am doing to cause.



What i did:



  • I removed nvidia, settings but did not work.

  • Renamed xauthotiry to see if causing. But not worked

  • sudo dkpgreconfigure lightdm

  • var log xorg 0 log shows no error. I couksnot find any error or warning there. But maybe i am looking wrong. This is image fron there. Only error is that. Can you look
    https://pasteboard.co/HpnxnQC.jpg

  • This is xsessionerrors
    https://pasteboard.co/HpnyrRv.jpg


  • ls -al , all of them are my user except dbus. It is root. Inside tmp, all of rhem are root. Such as xim unix



    Any suggestions?








share|improve this question














This question already has an answer here:



  • Ubuntu gets stuck in a login loop

    39 answers



I am on mobile.



This is fifth time. I reinstalled four times.



Please look at my recent questions.



I entet password and it says xxx files xx blocks and keep showing logib screen.



I dont know what caused this.



I installed as usual chrome yakuake zsh notepadqq inteljidea nvidia mysql emma



Changed



etc enviroment
Zshrc
Anthome javahome



Please help me. I dont want to reinstall :( or break my desktop



This is 5. Times happening same thing. I dont know what i am doing to cause.



What i did:



  • I removed nvidia, settings but did not work.

  • Renamed xauthotiry to see if causing. But not worked

  • sudo dkpgreconfigure lightdm

  • var log xorg 0 log shows no error. I couksnot find any error or warning there. But maybe i am looking wrong. This is image fron there. Only error is that. Can you look
    https://pasteboard.co/HpnxnQC.jpg

  • This is xsessionerrors
    https://pasteboard.co/HpnyrRv.jpg


  • ls -al , all of them are my user except dbus. It is root. Inside tmp, all of rhem are root. Such as xim unix



    Any suggestions?






This question already has an answer here:



  • Ubuntu gets stuck in a login loop

    39 answers









share|improve this question












share|improve this question




share|improve this question








edited Jun 11 at 10:19
























asked Jun 11 at 9:22









hristof kuallamp

479




479




marked as duplicate by Eric Carvalho, K7AAY, Melebius, waltinator, George Udosen Jun 13 at 15:54


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Eric Carvalho, K7AAY, Melebius, waltinator, George Udosen Jun 13 at 15:54


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









  • 4




    "Dont you see it is different." No, unfortunately not. Saying "I tried everything" is as good as "I tried nothing", neither holds specific information. And your description of the issue with going to a black screen and returning to the login after entering the password perfectly matches that common issue. Anyway, thanks for updating your question so far. Do you have a ~/.xsession-errors file with any useful messages? Have you checked permissions of your home directory and the /tmp folder?
    – Byte Commander
    Jun 11 at 9:37







  • 2




    Thank you for asking to try to help. I looked xsession and saw those pasteboard.co/HpnyrRv.jpg sorry , i am on mobile and cant write so much thing. Photo is easier. At home, i tried from other desktop, it was easier. Now i am at work and i am on panic. For ls -al , all of them are my user except dbus. It is root. Inside tmp, all of rhem are root. Such as xim unix
    – hristof kuallamp
    Jun 11 at 9:44







  • 1




    @ByteCommander So, should this question be closed as a duplicate now? An answer regarding modified /etc/environment already exists below the linked question.
    – Melebius
    Jun 11 at 12:45






  • 2




    @Melebius Could be, but not necessarily. That post is linked, but as this one is answered well now, it doesn't really matter whether it gets closed or not. I retracted my close vote earlier, but everyone may form their own opinion.
    – Byte Commander
    Jun 11 at 12:50












  • 4




    "Dont you see it is different." No, unfortunately not. Saying "I tried everything" is as good as "I tried nothing", neither holds specific information. And your description of the issue with going to a black screen and returning to the login after entering the password perfectly matches that common issue. Anyway, thanks for updating your question so far. Do you have a ~/.xsession-errors file with any useful messages? Have you checked permissions of your home directory and the /tmp folder?
    – Byte Commander
    Jun 11 at 9:37







  • 2




    Thank you for asking to try to help. I looked xsession and saw those pasteboard.co/HpnyrRv.jpg sorry , i am on mobile and cant write so much thing. Photo is easier. At home, i tried from other desktop, it was easier. Now i am at work and i am on panic. For ls -al , all of them are my user except dbus. It is root. Inside tmp, all of rhem are root. Such as xim unix
    – hristof kuallamp
    Jun 11 at 9:44







  • 1




    @ByteCommander So, should this question be closed as a duplicate now? An answer regarding modified /etc/environment already exists below the linked question.
    – Melebius
    Jun 11 at 12:45






  • 2




    @Melebius Could be, but not necessarily. That post is linked, but as this one is answered well now, it doesn't really matter whether it gets closed or not. I retracted my close vote earlier, but everyone may form their own opinion.
    – Byte Commander
    Jun 11 at 12:50







4




4




"Dont you see it is different." No, unfortunately not. Saying "I tried everything" is as good as "I tried nothing", neither holds specific information. And your description of the issue with going to a black screen and returning to the login after entering the password perfectly matches that common issue. Anyway, thanks for updating your question so far. Do you have a ~/.xsession-errors file with any useful messages? Have you checked permissions of your home directory and the /tmp folder?
– Byte Commander
Jun 11 at 9:37





"Dont you see it is different." No, unfortunately not. Saying "I tried everything" is as good as "I tried nothing", neither holds specific information. And your description of the issue with going to a black screen and returning to the login after entering the password perfectly matches that common issue. Anyway, thanks for updating your question so far. Do you have a ~/.xsession-errors file with any useful messages? Have you checked permissions of your home directory and the /tmp folder?
– Byte Commander
Jun 11 at 9:37





2




2




Thank you for asking to try to help. I looked xsession and saw those pasteboard.co/HpnyrRv.jpg sorry , i am on mobile and cant write so much thing. Photo is easier. At home, i tried from other desktop, it was easier. Now i am at work and i am on panic. For ls -al , all of them are my user except dbus. It is root. Inside tmp, all of rhem are root. Such as xim unix
– hristof kuallamp
Jun 11 at 9:44





Thank you for asking to try to help. I looked xsession and saw those pasteboard.co/HpnyrRv.jpg sorry , i am on mobile and cant write so much thing. Photo is easier. At home, i tried from other desktop, it was easier. Now i am at work and i am on panic. For ls -al , all of them are my user except dbus. It is root. Inside tmp, all of rhem are root. Such as xim unix
– hristof kuallamp
Jun 11 at 9:44





1




1




@ByteCommander So, should this question be closed as a duplicate now? An answer regarding modified /etc/environment already exists below the linked question.
– Melebius
Jun 11 at 12:45




@ByteCommander So, should this question be closed as a duplicate now? An answer regarding modified /etc/environment already exists below the linked question.
– Melebius
Jun 11 at 12:45




2




2




@Melebius Could be, but not necessarily. That post is linked, but as this one is answered well now, it doesn't really matter whether it gets closed or not. I retracted my close vote earlier, but everyone may form their own opinion.
– Byte Commander
Jun 11 at 12:50




@Melebius Could be, but not necessarily. That post is linked, but as this one is answered well now, it doesn't really matter whether it gets closed or not. I retracted my close vote earlier, but everyone may form their own opinion.
– Byte Commander
Jun 11 at 12:50










1 Answer
1






active

oldest

votes

















up vote
2
down vote













Thanks to @Byte Commander,
I found the error.



In my /etc/environment
I had added export parts:



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

export JAVA_HOME="/usr/local/java/jdk1.8.0_171"
export ANT_HOME="/usr/local/ant"

export PATH=$ANT_HOME/bin:$PATH
export PATH=$JAVA_HOME/bin:$PATH


I removed export paths and it worked.



I think I should put / to end of them. I am not sure about it. And I don’t know how can I be sure after again adding them.



I removed export parts



https://stackoverflow.com/a/23384301/9103745



like that



 JAVA_HOME="/usr/local/java/jdk1.8.0_171"
ANT_HOME="/usr/local/ant"

PATH=$ANT_HOME/bin:$PATH
PATH=$JAVA_HOME/bin:$PATH


but it did not work.



UPDATE



This is my .profile , lastversion:



 ...
# set PATH so it includes user's private bin directories
PATH="$HOME/bin:$HOME/.local/bin:$PATH"

PATH="$ANT_HOME/bin:$PATH"
PATH="$JAVA_HOME/bin:$PATH"


this is etc/enviroment



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

JAVA_HOME="/usr/local/java/jdk1.8.0_171"
ANT_HOME="/usr/local/ant"


and for .zshrc
i added those to bottom



 source /etc/environment
source ~/.profile


Now it seems it is working. When i open a new terminal, it will source both. I dont know if this is a good idea but could not find any other way.






share|improve this answer























  • Glad you found a solution. Yes, /etc/environment may only contain variable=value assignments, no shell commands like export.
    – Byte Commander
    Jun 11 at 10:08










  • @ByteCommander Thank yo. You gave ideas to look out but it was luck to check that file. I updated my answer. Without export, i tried but again, xsession showed same errors (maybe the old errors). COuld not login again. After updating etc/enviroment, is there a way to check if it is correct without restarting? I suspended but it did not work.
    – hristof kuallamp
    Jun 11 at 10:14







  • 2




    Oh, and variable expansions like $PATH or $ANT_HOME also don't work in /etc/environment. You can only set fixed strings there. See also help.ubuntu.com/community/EnvironmentVariables
    – Byte Commander
    Jun 11 at 10:14










  • @Byte Commander so, I will define only Java and Ant in /etc/enviroment. How will i export them for $PATH? .profile?
    – hristof kuallamp
    Jun 11 at 10:21







  • 1




    The way you solved it is absolutely fine. I'd have done it the same way. Very nice.
    – Byte Commander
    Jun 11 at 10:50

















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote













Thanks to @Byte Commander,
I found the error.



In my /etc/environment
I had added export parts:



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

export JAVA_HOME="/usr/local/java/jdk1.8.0_171"
export ANT_HOME="/usr/local/ant"

export PATH=$ANT_HOME/bin:$PATH
export PATH=$JAVA_HOME/bin:$PATH


I removed export paths and it worked.



I think I should put / to end of them. I am not sure about it. And I don’t know how can I be sure after again adding them.



I removed export parts



https://stackoverflow.com/a/23384301/9103745



like that



 JAVA_HOME="/usr/local/java/jdk1.8.0_171"
ANT_HOME="/usr/local/ant"

PATH=$ANT_HOME/bin:$PATH
PATH=$JAVA_HOME/bin:$PATH


but it did not work.



UPDATE



This is my .profile , lastversion:



 ...
# set PATH so it includes user's private bin directories
PATH="$HOME/bin:$HOME/.local/bin:$PATH"

PATH="$ANT_HOME/bin:$PATH"
PATH="$JAVA_HOME/bin:$PATH"


this is etc/enviroment



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

JAVA_HOME="/usr/local/java/jdk1.8.0_171"
ANT_HOME="/usr/local/ant"


and for .zshrc
i added those to bottom



 source /etc/environment
source ~/.profile


Now it seems it is working. When i open a new terminal, it will source both. I dont know if this is a good idea but could not find any other way.






share|improve this answer























  • Glad you found a solution. Yes, /etc/environment may only contain variable=value assignments, no shell commands like export.
    – Byte Commander
    Jun 11 at 10:08










  • @ByteCommander Thank yo. You gave ideas to look out but it was luck to check that file. I updated my answer. Without export, i tried but again, xsession showed same errors (maybe the old errors). COuld not login again. After updating etc/enviroment, is there a way to check if it is correct without restarting? I suspended but it did not work.
    – hristof kuallamp
    Jun 11 at 10:14







  • 2




    Oh, and variable expansions like $PATH or $ANT_HOME also don't work in /etc/environment. You can only set fixed strings there. See also help.ubuntu.com/community/EnvironmentVariables
    – Byte Commander
    Jun 11 at 10:14










  • @Byte Commander so, I will define only Java and Ant in /etc/enviroment. How will i export them for $PATH? .profile?
    – hristof kuallamp
    Jun 11 at 10:21







  • 1




    The way you solved it is absolutely fine. I'd have done it the same way. Very nice.
    – Byte Commander
    Jun 11 at 10:50














up vote
2
down vote













Thanks to @Byte Commander,
I found the error.



In my /etc/environment
I had added export parts:



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

export JAVA_HOME="/usr/local/java/jdk1.8.0_171"
export ANT_HOME="/usr/local/ant"

export PATH=$ANT_HOME/bin:$PATH
export PATH=$JAVA_HOME/bin:$PATH


I removed export paths and it worked.



I think I should put / to end of them. I am not sure about it. And I don’t know how can I be sure after again adding them.



I removed export parts



https://stackoverflow.com/a/23384301/9103745



like that



 JAVA_HOME="/usr/local/java/jdk1.8.0_171"
ANT_HOME="/usr/local/ant"

PATH=$ANT_HOME/bin:$PATH
PATH=$JAVA_HOME/bin:$PATH


but it did not work.



UPDATE



This is my .profile , lastversion:



 ...
# set PATH so it includes user's private bin directories
PATH="$HOME/bin:$HOME/.local/bin:$PATH"

PATH="$ANT_HOME/bin:$PATH"
PATH="$JAVA_HOME/bin:$PATH"


this is etc/enviroment



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

JAVA_HOME="/usr/local/java/jdk1.8.0_171"
ANT_HOME="/usr/local/ant"


and for .zshrc
i added those to bottom



 source /etc/environment
source ~/.profile


Now it seems it is working. When i open a new terminal, it will source both. I dont know if this is a good idea but could not find any other way.






share|improve this answer























  • Glad you found a solution. Yes, /etc/environment may only contain variable=value assignments, no shell commands like export.
    – Byte Commander
    Jun 11 at 10:08










  • @ByteCommander Thank yo. You gave ideas to look out but it was luck to check that file. I updated my answer. Without export, i tried but again, xsession showed same errors (maybe the old errors). COuld not login again. After updating etc/enviroment, is there a way to check if it is correct without restarting? I suspended but it did not work.
    – hristof kuallamp
    Jun 11 at 10:14







  • 2




    Oh, and variable expansions like $PATH or $ANT_HOME also don't work in /etc/environment. You can only set fixed strings there. See also help.ubuntu.com/community/EnvironmentVariables
    – Byte Commander
    Jun 11 at 10:14










  • @Byte Commander so, I will define only Java and Ant in /etc/enviroment. How will i export them for $PATH? .profile?
    – hristof kuallamp
    Jun 11 at 10:21







  • 1




    The way you solved it is absolutely fine. I'd have done it the same way. Very nice.
    – Byte Commander
    Jun 11 at 10:50












up vote
2
down vote










up vote
2
down vote









Thanks to @Byte Commander,
I found the error.



In my /etc/environment
I had added export parts:



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

export JAVA_HOME="/usr/local/java/jdk1.8.0_171"
export ANT_HOME="/usr/local/ant"

export PATH=$ANT_HOME/bin:$PATH
export PATH=$JAVA_HOME/bin:$PATH


I removed export paths and it worked.



I think I should put / to end of them. I am not sure about it. And I don’t know how can I be sure after again adding them.



I removed export parts



https://stackoverflow.com/a/23384301/9103745



like that



 JAVA_HOME="/usr/local/java/jdk1.8.0_171"
ANT_HOME="/usr/local/ant"

PATH=$ANT_HOME/bin:$PATH
PATH=$JAVA_HOME/bin:$PATH


but it did not work.



UPDATE



This is my .profile , lastversion:



 ...
# set PATH so it includes user's private bin directories
PATH="$HOME/bin:$HOME/.local/bin:$PATH"

PATH="$ANT_HOME/bin:$PATH"
PATH="$JAVA_HOME/bin:$PATH"


this is etc/enviroment



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

JAVA_HOME="/usr/local/java/jdk1.8.0_171"
ANT_HOME="/usr/local/ant"


and for .zshrc
i added those to bottom



 source /etc/environment
source ~/.profile


Now it seems it is working. When i open a new terminal, it will source both. I dont know if this is a good idea but could not find any other way.






share|improve this answer















Thanks to @Byte Commander,
I found the error.



In my /etc/environment
I had added export parts:



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

export JAVA_HOME="/usr/local/java/jdk1.8.0_171"
export ANT_HOME="/usr/local/ant"

export PATH=$ANT_HOME/bin:$PATH
export PATH=$JAVA_HOME/bin:$PATH


I removed export paths and it worked.



I think I should put / to end of them. I am not sure about it. And I don’t know how can I be sure after again adding them.



I removed export parts



https://stackoverflow.com/a/23384301/9103745



like that



 JAVA_HOME="/usr/local/java/jdk1.8.0_171"
ANT_HOME="/usr/local/ant"

PATH=$ANT_HOME/bin:$PATH
PATH=$JAVA_HOME/bin:$PATH


but it did not work.



UPDATE



This is my .profile , lastversion:



 ...
# set PATH so it includes user's private bin directories
PATH="$HOME/bin:$HOME/.local/bin:$PATH"

PATH="$ANT_HOME/bin:$PATH"
PATH="$JAVA_HOME/bin:$PATH"


this is etc/enviroment



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

JAVA_HOME="/usr/local/java/jdk1.8.0_171"
ANT_HOME="/usr/local/ant"


and for .zshrc
i added those to bottom



 source /etc/environment
source ~/.profile


Now it seems it is working. When i open a new terminal, it will source both. I dont know if this is a good idea but could not find any other way.







share|improve this answer















share|improve this answer



share|improve this answer








edited Jun 11 at 13:28


























answered Jun 11 at 9:53









hristof kuallamp

479




479











  • Glad you found a solution. Yes, /etc/environment may only contain variable=value assignments, no shell commands like export.
    – Byte Commander
    Jun 11 at 10:08










  • @ByteCommander Thank yo. You gave ideas to look out but it was luck to check that file. I updated my answer. Without export, i tried but again, xsession showed same errors (maybe the old errors). COuld not login again. After updating etc/enviroment, is there a way to check if it is correct without restarting? I suspended but it did not work.
    – hristof kuallamp
    Jun 11 at 10:14







  • 2




    Oh, and variable expansions like $PATH or $ANT_HOME also don't work in /etc/environment. You can only set fixed strings there. See also help.ubuntu.com/community/EnvironmentVariables
    – Byte Commander
    Jun 11 at 10:14










  • @Byte Commander so, I will define only Java and Ant in /etc/enviroment. How will i export them for $PATH? .profile?
    – hristof kuallamp
    Jun 11 at 10:21







  • 1




    The way you solved it is absolutely fine. I'd have done it the same way. Very nice.
    – Byte Commander
    Jun 11 at 10:50
















  • Glad you found a solution. Yes, /etc/environment may only contain variable=value assignments, no shell commands like export.
    – Byte Commander
    Jun 11 at 10:08










  • @ByteCommander Thank yo. You gave ideas to look out but it was luck to check that file. I updated my answer. Without export, i tried but again, xsession showed same errors (maybe the old errors). COuld not login again. After updating etc/enviroment, is there a way to check if it is correct without restarting? I suspended but it did not work.
    – hristof kuallamp
    Jun 11 at 10:14







  • 2




    Oh, and variable expansions like $PATH or $ANT_HOME also don't work in /etc/environment. You can only set fixed strings there. See also help.ubuntu.com/community/EnvironmentVariables
    – Byte Commander
    Jun 11 at 10:14










  • @Byte Commander so, I will define only Java and Ant in /etc/enviroment. How will i export them for $PATH? .profile?
    – hristof kuallamp
    Jun 11 at 10:21







  • 1




    The way you solved it is absolutely fine. I'd have done it the same way. Very nice.
    – Byte Commander
    Jun 11 at 10:50















Glad you found a solution. Yes, /etc/environment may only contain variable=value assignments, no shell commands like export.
– Byte Commander
Jun 11 at 10:08




Glad you found a solution. Yes, /etc/environment may only contain variable=value assignments, no shell commands like export.
– Byte Commander
Jun 11 at 10:08












@ByteCommander Thank yo. You gave ideas to look out but it was luck to check that file. I updated my answer. Without export, i tried but again, xsession showed same errors (maybe the old errors). COuld not login again. After updating etc/enviroment, is there a way to check if it is correct without restarting? I suspended but it did not work.
– hristof kuallamp
Jun 11 at 10:14





@ByteCommander Thank yo. You gave ideas to look out but it was luck to check that file. I updated my answer. Without export, i tried but again, xsession showed same errors (maybe the old errors). COuld not login again. After updating etc/enviroment, is there a way to check if it is correct without restarting? I suspended but it did not work.
– hristof kuallamp
Jun 11 at 10:14





2




2




Oh, and variable expansions like $PATH or $ANT_HOME also don't work in /etc/environment. You can only set fixed strings there. See also help.ubuntu.com/community/EnvironmentVariables
– Byte Commander
Jun 11 at 10:14




Oh, and variable expansions like $PATH or $ANT_HOME also don't work in /etc/environment. You can only set fixed strings there. See also help.ubuntu.com/community/EnvironmentVariables
– Byte Commander
Jun 11 at 10:14












@Byte Commander so, I will define only Java and Ant in /etc/enviroment. How will i export them for $PATH? .profile?
– hristof kuallamp
Jun 11 at 10:21





@Byte Commander so, I will define only Java and Ant in /etc/enviroment. How will i export them for $PATH? .profile?
– hristof kuallamp
Jun 11 at 10:21





1




1




The way you solved it is absolutely fine. I'd have done it the same way. Very nice.
– Byte Commander
Jun 11 at 10:50




The way you solved it is absolutely fine. I'd have done it the same way. Very nice.
– Byte Commander
Jun 11 at 10:50


Popular posts from this blog

Unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst)

Running the scala interactive shell from the command line

Do not install recommended packages of dependencies