last day (15 days later) » 

13:19
room parent site changed to askubuntu.com
@Akydev please join me here
Hi thanks for inviting me
My computer is not working from morning. And I ask this question by phone. So I can not copy your cmd as you told me.
@Akydev Yes, I was afraid of that. OK, here's a simplified version:
@terdon Is it possible to achieve the main thing we want when we only execute the first command ?
@cl-netbox Well, there are two issues. Likely a screwed up Xauthority but also a screwed up path. Removing Xauthority won't fix that.
@Akydev try these:
/bin/rm ~/.Xauthority
/bin/mv ~/.profile ~/.profile.old
/bin/mv ~/.bash_profile ~/.bash_profile.old
Oh, and
/bin/mv ~/.bashrc ~/.bashrc.old
That should let you log in normally. Once you have done so, we can work on bringing your settings back.
@Akydev one question I have : what GPU do you have ?
13:28
It is possible that not all of these are needed, but try them to be sure.
@cl-netbox Why would that be relevant?
@terdon because the issue can be related to the graphics drivers ... had the same myself in 14.04.
@cl-netbox I doubt it:
It's say "-bash:/home/pcname/.Xauthority:permissiondenied" — Akydev 5 hours ago
It say command 'ls' is available in '/bin/ls' . The command could not be located because '/bin' is not included in the PATH environment variable. ls : command not found. — Akydev 4 hours ago
Akydev has screwed up his PATH. I'm betting the only real problem is in .bashrc which (idiotically) Debian-based distros have decided to source from ~/.profile. But we may as well check all of them.
Pcname means my system name.
@Akydev No, it means you user's name.
Yes yes
13:31
:)
@terdon yes you are right ... I am asking just in case after performing your commands it still doesn't work.
So from where I can start performing command ?
@Akydev Hit Ctrl+Alt+F1 at the login screen and log in from the command line. You said that worked, right?
Yes I did that
Next ?
Run the commands.
13:34
Now I will type this as you told me
/bin/rm ~/.Xauthority
/bin/mv ~/.profile ~/.profile.old
/bin/mv ~/.bash_profile ~/.bash_profile.old
In terminal
Yes
/bin/mv ~/.bashrc ~/.bashrc.old
^^
That one too
Sudo key word required ?
@Akydev No.
@cl-netbox <rant>Which would't even be necessary if those idiots hadn't decided to source it from ~/.profile. Grumble, grumble.</rant>
13:36
Ok I type as you wrote me ok
@Akydev any luck?
@Akydev When finished press Ctrl + Alt + F7 to return to login screen
@Akydev Please tell us whether it worked and you can login to the desktop now.
13:51
When I wrote this /bin/mv ~/.bash_profile ~/.bash_profile.Old its say: /bin/mv: can't stat '/home/my username/.bash_profile' : no such file or directory
@Akydev That's fine. No problem, that file often doesn't exist.
Did the other commands work with no error? If so, try switching back to the GUI (Ctrl+Alt+F7) and logging in.
I am going to perform last cmd now wait
I did the last cmd and move on login window but still same problem and its again login window loop.
@Akydev what GPU do you have ?
@Akydev What did you do before this happened? Did you perhaps edit /etc/bash.bashrc or /etc/profile?
1st 2 cmd work without error but not 3rd and 4 also error free I guess
13:59
@Akydev Please perform all @terdon commands again ... slowly ... all 4 ... one after the other ...
In the morning I have problems to set the PATH in Android studio jdk so I edited the barsh file and at same time I edited etc/ environment file I think. Then I updated my Android studio and restart my computer. And have this problem and I am not able to login
@Akydev ARGH! OK, that's the kind of thing you need to include in your question.
The problem is your /etc/environment file, probably.
So as people suggest me so I had change in my bashrc file and delete my jsk home path from bashrc file and I deleted same on ect:environment file
@Akydev What exactly did you do to /etc/environment ?
But now before you answers on my question I open that etc/ environment and there is nothing
I open using nano cmd
14:02
@Akydev Oh, OK. That's good, actually. So, what does cat /etc/environment return? Nothing?
I Just copy paste the jdk home and its path in ect/environment
@Akydev I said exactly. But never mind, what is in /etc/environment now? What does cat /etc/environment return?
cat /etc/environment
I Can go again in terminal as I said and try to open ect/environment file ...
Just tell me what happens when you run:
cat /etc/environment
-bash:cat/etc/environment: no such file or directory
14:06
@Akydev You need a space between cat and /etc. Type it in exactly as I showed you.
Ok every letter in Lower case and type as you told and it says :command 'cat' is available in '/bin/cat' . The command could not be located because '/bin' is not included in the PATH environment variable. cat: command not found
@Akydev Sorry, I forgot your PATH problem. OK, hit the Up arrow, then Ctrl+A and then add /bin/to the beginning of the line so that it looks like this:
/bin/cat /etc/environment
Or just type the whole thing again. The Up arrow shows the previous command you ran and Ctrl+A take you to the beginning of the line. You don't need to do it that way, it's just easier.
I know that and I perform that. It's show my jdk path and wait I will write you all what it show me after hit this cmd
@Akydev AH! So there is a path defined there?
Tell me what it says. Is it something like
PATH=/path/to/jdk
If so, that is what is causing your problems. Just run sudo nano /etc/environment and remove that line.
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/game:/us‌​r/local/games" export JAVA_HOME= /usr/lib/jvm/jdk1.8.0_65 export PATH=$PATH:$JAVA_HOME/bin
14:18
@Akydev Is there really a space after the = in JAVA_HOME= /usr/l... ?
Hmm. In that case, that actually looks OK.
OK, @Akydev what does this command return?
echo $PATH
Does it look like this?
I write this cmd to open etc/environment file. Cmd /usr/bin/nano etc/environment
@Akydev No, don't write anything there.
I want to see what your shell has set for $PATH. So, exit nano and run echo $PATH
Ok . echo $PATH shows: $PATH:$JAVA_HOME/bin:/usr/lib/jvm/jdk1.8.0_65/bin
14:24
What?
Yes
Where are you setting that then? Are you sure you didn't have any single quotes in /etc/environment? Something like:
PATH='$PATH:$JAVA_HOME/bin'
I don't remember
Anyway, we have now confirmed that the problem is your PATH. I am assuming that you have mistyped it in /etc/environment so, run sudo nano /etc/environment again and add a # at the beginning of each line that affects PATH:
# PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/game:/us‌​r/local/games"
# export JAVA_HOME= /usr/lib/jvm/jdk1.8.0_65
# export PATH=$PATH:$JAVA_HOME/bin
Ok I write this cmd to open ect/environment. Cmd :/usr/bin/nano etc/environment
It is blank and now I type as you told me
How to save this text ? Ctrl+o ?
14:40
@Akydev What? No!
The /usr/bin/nano /etc/environment is how you open /etc/environment for editing. You told me that it contained these lines:
 PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/game:/us‌​r/local/games"
 export JAVA_HOME= /usr/lib/jvm/jdk1.8.0_65
 export PATH=$PATH:$JAVA_HOME/bin
What I want you to do is edit the file and comment those lines. Adding a # at the beginning of the line "comments" it, it makes the system ignore it.
So, you run sudo nano /etc/environment in the terminal and when the file is opened, you add a # at the beginning of each line mentioning PATH or JAVA_HOME
Yes
If the file is empty, you don't need to do anything. You said it wasn't empty.
@Akydev what happens when you run sudo /usr/bin/nano /etc/environment ?
What do you see? Is it an empty file?
When I opened it 1st time when I have problems with jdk it have some content and I added the jdk home and path line in it but when I have login problem then i run terminal and open the etc/environment to delete the PATH line which I added before. But at that time power went off. When I turned on computer and open again as I told you. In that fiIe nothing or I guess empty.
Yes. It's shows empty file I think and I type all text as you told me
@Akydev No, no, if the file is empty, leave it empty. We want it to be empty.
Ok I close by CTR+x
14:48
Look, the problem is that you are setting PATH to a wrong value somewhere. Unfortunately, PATH can be set in many different places and I am trying to understand where you are setting it.
You said that echo $PATH returns this:
$PATH:$JAVA_HOME/bin:/usr/lib/jvm/jdk1.8.0_65/bin
That is exactly what it returns, right?
Yes
OK
And /bin/cat /etc/environment returns nothing, correct?
@Akydev?
No. It send the message which we want to edit in etc/environment
With export java_home and export path
@Akydev I don't understand. Are you saying that cat /etc/environment returns this:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/game:/us‌​r/local/games"
 export JAVA_HOME= /usr/lib/jvm/jdk1.8.0_65
 export PATH=$PATH:$JAVA_HOME/bin
Yes
14:53
OK, then it isn't empty. You must have mistyped the nano command.
Let's try again. Run this command exactly:
/usr/bin/sudo /usr/bin/nano /etc/environment
Do you now see a file containing those lines?
Space after sudo ?
@Akydev Yes. Exactly as I show it.
Yes it's show that text which output of echo$path
And there is no # tag in the beginning
@Akydev Good. Add it. Add a # to the beginning of each line that contains PATH or JAVA_HOME
Then save the file (Ctrl+O) and exit (Ctrl+X)
Ok I added 3# tag as you showed in previous text
14:58
@Akydev And saved the file?
Yes
Now, type exit at the command line. This will log you out. Log back in (still from the command line) and run echo $PATH. Is the output still the same?
No. It doesn't show the java_home and path it show only 1st line
@Akydev 1st line? You mean /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/game:/us‌​r/l‌​ocal/games?
Yes
No wait
I write you.
15:02
@Akydev Wait. If it changed, it is probably correct. As long as it is something like what I show above.
Try logging in graphically again. Hit Ctrl+F7 and try to log in.
/usr/local/bin:/bin:/usr/local/game:/usr/game:/usr/lib/jvm/jdk1.8.0_65
Ok I try to login
No its not working. Same I again redirect to login window
Hmm. It might have already read the /etc/environment. You can either go back to the command line (Ctrl+Alt+F1) and run sudo service lightdm restart or try restarting your computer.
Either that or you also have a different problem.
Can I restart directly by restart button
@Akydev when you restart please come back here
@Akydev It's better not to. You have the option to restart from the login screen or you can run sudo reboot from the command line. If neither works, then yes, restart with the button. It's just not a good way to treat your computer generally.
15:07
@Akydev before that please tell me which GPU you have ...
But I restart already. I will keep in mind next time.
@Akydev OK. Can you log in now? Any difference?
I enter the password but it's redirect to the same login window.
And do answer @cl-netbox's question. He's asked you 4 times!
Yes there is a little change is that it's show onscreen keyboard options and language options. Which is disappear when I have login problem. But after your suggestions it came back but login problem still same
15:11
@Akydev And cli's question? Why are you ignoring it?
Yes I will answer him and when my login problem slove I will thanks both of you . and reply you both as well
He is asking precisely because it might be related to your problem. Just tell us what graphics card you have!
I am not ignoring. Was answering you
So, what graphics card do you have?
@Akydev?
I don't have graphic card. I had before nvidia
15:15
@Akydev What ? no graphics card ?
@Akydev OK, so you have an integrated graphics card.
Yes. I removed 1 year ago bcz its heat too much its fan not working.
I3 processor.
Can that be relevant @cl-netbox? I guess that probably not since there won't be a proprietary drivers issue.
@Akydev So you are working with the intel chip
Yes
15:17
OK. So the problem is probably elsewhere. Go back to the command line (Ctrl+Alt+F1) and log in.
1) Confirm that echo $PATH still shows something like this:
Yes I did
Scratch that. Confirm that echo $PATH also includes /usr/bin
You mean echo $PATH /usr/bin ?
15:20
@Akydev No, just echo $PATH
Then, look for /usr/bin in the output.
Is it there?
No it start with /usr/local/bin
@Akydev OK, and there is no /usr/bin anywhere?
I will write you the echo $path output
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/game:/usr/lib/jvm/jdk1.8.0_65
15:24
OK, so /usr/bin is there as well. The PATH seems to have been fixed. Damn. This is going to be harder to debug. OK try this:
1) Run:

rm ~/.xsession-errors
2) Try to log in from the GUI again
3) Go back to the command line and run

cat ~/.xsession-errors
There is space between rm and ~/.xsession
@Akydev Yes.
I perform 1st cmd as you told and no errors. I am going to gui for login ok
15:28
@Akydev OK
The ~/.xsession-errors file is where any errors you get when logging in will be reported. I want you to delete it so that it will only contain the errors generated from this time when you try to log in.
If we're lucky, it won't be too long.
2nd step I did and it have same things now I going to perform 3rd step
I perform 3rd steps and its show me something which I write you wait
Script for ibus started at run_im. Script for auto started at run_im. Script for default started at run_im. /etc/x11/Xsession.d/99x11-common_start: line 5: exec: init: not found.
@Akydev Just in between : as it is most probably not a graphics chip issue, please follow exactly every instruction from @terdon ... he is one of the most experienced members here ! Good luck !
15:38
Thanks
@Akydev Is that everything?
You know I am happy to work with you guys.
Yes as you told I did
@Akydev OK.
The only possibly relevant one would be the ` /etc/X11/Xsession.d/99x11-common_start: line 5: exec: init: not found`. That's odd.
Yeah. I think too
Initialization not found I guess
OK, let's first make sure this is not a global problem. Create a new user and try to log in with their username. Use this to create the user:
sudo adduser testuser
Then, answer the prompts you will be given and choose a password. Make it simple, something like aaa since this is only for testing.
When you have done that, go back to the GUI and try to log in as testuser.
15:42
Ok. I create a new user as you told me. And test it
And? Can that user log in?
When I am creating user and enter password. It's say sorry try again in terminal
I try to create password again
It's not allow me to create password again and send back to enter password : in terminal. So I can't move to gui login
Hang on. What? How are you creating the password? Did you run sudo adduser testuser?
15:46
I wrote sudo adduser tuser
OK, and then followed the prompts, right?
It should ask you for a password automatically.
Enter new UNIX password:
Didn't you see a message like the above?
And when I write for password its not allow me for password and say sorry, try again. Yes I know its ask for password automatically. But when I enter it display sorry try again message and ask for password again
It's show [sudo] password for my old users name
@Akydev What? Hang on, when is it asking for the password?
Ok I did that
@Akydev You created the user? OK, now try logging in as that user from the GUI
15:50
Now I enter as you show me for enter new UNIX password
It's show me changing the user information for tuser . entre the new value or press enter for default. Full name []:
Can i press enter now ? And go for gui login
yes
Ok
It's asking for room number [] :
When I enter
I mean when I press enter button
@Akydev Yeah, just hit enter again and again until it's finished
15:54
Ok
Type yes for information correct question ?
yes
Ok
Now I going to gui login ok
No its not working for that user too same problem
OK, so we know it's a global issue. Damn. Let's see what error that user got. Go back to the command line and run this:
cat ~tuser/.xsession-errors
Is it the same as what you got before?
16:01
No its say cat: /home/tuser/.xsession-errors : permission denied only this line
@Akydev Ugh, sorry, try again with sudo:
sudo cat ~tuser/.xsession-errors
Yeah same error as we found before init: not found
OK. Run this:
cat /etc/X11/Xsession.d/99x11-common_start
With sudo ?
No
Then, tell me if it returns this:
# $Id: 99x11-common_start 305 2005-07-03 18:51:43Z dnusinow $

# This file is sourced by Xsession(5), not executed.

exec $STARTUP

# vim:set ai et sts=2 sw=2 tw=80:
16:07
Yes. Correct
The error you got suggests that the problem is in /etc/X11/Xsession.d/99x11-common_start. Since the only thing that does is run $STARTUP, we need to find out what the value of $STARTUP is. So, edit that file (sudo nano /etc/X11/Xsession.d/99x11-common_start) and make it look like this:
# $Id: 99x11-common_start 305 2005-07-03 18:51:43Z dnusinow $

# This file is sourced by Xsession(5), not executed.

echo "SS: $STARTUP" > /home/akydev/log.foo
exec $STARTUP

# vim:set ai et sts=2 sw=2 tw=80:
Change "akydev" to your actual username on the machine.
Are you sure I change my actual users name with this name ?
@Akydev No, you need to use the user name you have on your machine.
And tell me step by step.
1 min ago, by terdon
Change "akydev" to your actual username on the machine.
Well, first run:
sudo nano /etc/X11/Xsession.d/99x11-common_start
Then, add this line:
echo "SS: $STARTUP" > /home/akydev/log.foo
So it looks like what I pasted above.
Just make sure to change akydev to your real username.
This sort of thing doesn't happen by itself though. You must have done something else.
16:11
You mean I change my current user name by any other name ?
@Akydev No. OK, what is the username you use to log in to your machine?
Akydev
@Akydev You mean akydev, right? No caps?
Yes
OK, then add the exact line I show above.
Make the file look like this:
# $Id: 99x11-common_start 305 2005-07-03 18:51:43Z dnusinow $

# This file is sourced by Xsession(5), not executed.

echo "SS: $STARTUP" > /home/akydev/log.foo
exec $STARTUP

# vim:set ai et sts=2 sw=2 tw=80:
16:13
Ok I try to perform step 1
There is space between SS: and $STARTUP and space > space /home/akydev/log.foo
Yes
And save text by Ctrl+o ?
Ctl+x for exit
Yes
16:21
There is space between echo and ss ?
Yes
echo "SS: $STARTUP" > /home/akydev/log.foo
I finished and edited that
OK, now try to log in from the GUI again. When that fails, go back to the command line and run:
cat ~/log.foo
And tell me what it says.
Ok
I have to login in tuser or my actual user account
@Akydev Actual account. Did you try to login as tuser or as akydev?
16:30
It's show me SS: init --user
Yes
Hmm.
Hang on a second. Let me see what I get if I do the same thing.
Yup. Exactly the same. Damn. Looks like it's still a PATH issue actually. The error complains about not finding init.
Hang on, let me try something else.
Yes I wait for you
OK, I think I have it. First, edit /etc/X11/Xsession.d/99x11-common_start and remove the line we added.
16:39
Ok
I removed that line and save that file
Then, we need to fix /etc/environment. The PATH isn't quite right yet. Run sudo nano /etc/environment and make it look like this:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
Nothing else, only that one, single line.
And exactly as it is. No spaces anywhere but make sure you use the double quotes (" ").
Using cmd : /usr/bin/sudo /usr/bin/nano /etc/environment . using this cmd open etc/ environment file and edit that
@Akydev You don't need the /usr/bin anymore but yes, that will work. You can also just run:
sudo nano /etc/environment
Just hit the up arrow until you see the previous nano command.
But I already open file using that cmd
@Akydev Yes, that's fine.
16:45
Now going to edit 1st line as you told me
@Akydev Yes. The file should only have that one line. Nothing else.
You mean I delete other two line of java_home and path line
Yes
Ok wait
The only thing in that file should be:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
16:47
With #tag ?
@Akydev No, no tag. Exactly as I showed above and nothing else.
The 1st line was correct as you told me and I just remove the other 2 lines of java_home and path. Now tell me I put #tag at the beginning or not
Ok
I finished that
@Akydev No, it wasn't! I told you wrong, I missed a detail. Please add the exact line I gave above. Nothing more and nothing less.
Each $path ?
@Akydev Delete EVERYTHING in the file and ADD this line EXACTLY and ONLY:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
16:52
This line already correct I checked and I removed the other 2 unnecessary line of java_home and path line.
@Akydev How can it be correct? It is not the same as the one you showed me here. We need to have /sbin in there as well, not only /usr/sbin.
Oh. Hang on. That is what you showed but not what echo $PATH returns. OK.
If you want. I will type whole line again ok . fine wait now .
@Akydev No, no, wait. If you are sure it's the same, then leave it.
Now, type exit from the command line and then log in again (from the command line). After logging in again, run echo $PATH again. Is /sbin there this time?
Ok wait
When I perform echo $PATH its shows: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/loc‌​al/games:/usr/lib/jvm/jdk1.8.0_65
Ah! Good! So not what was before.
OK, try logging in from the GUI again.
17:03
Ok
I want to say you are the best
@Akydev Yes indeed - he really is ! :)
bows
Here many people confused me by lots of answer and from begging I was thinking there is a path problem.
But I like to thank you for your help and support.
@Akydev so does it work now ?
I think I should follow you more and learn like you. I am student but I am beginner in UNIX so I must follow only correct people
It's open my desktop now
17:06
Yay!
And it was a path problem.
Netbox thanks for your support too
Yeah but I am still confused with new jdk8and its path problem
You are very welcome - I am glad it is working for you ! Please do not forget to click the grey at the left of the answer from @terdon, which means Yes, this answer is valid !
OK, @Akydev I have edited my answer to your question to reflect what we discussed. Please take a moment and accept it so your question can be marked as answered (and I can get my precioussss rep)
@Akydev That's a different issue. The basic message you should get from all this is never edit files in /etc unless you know what you're doing
Now, assuming your ~/. files were not the problem, you might want to restore the copies we made:
for i in .bashrc .profile .bash_login .bash_profile; do
    mv "$i".old "$i"
done
But do that only if you're sure you need them. Only if you had made any changes there that were i) wanted and ii) didn't break the system
@Akydev?
17:26
i was log in and open this site on my computer , and was rating your answer was correct .
I saw, thanks :)
how to support more and give more point for your help tell me i will do that .
@Akydev Don't worry. Accepting is enough :)
i am new in this community but i like to be touch with good people and want to learn more about technology too. so be in touch
suggest me for jdk8 path and something about android studio. which site or blog or people i should follow to learn good thing and correct steps so i not fall in this kind of problem again,
@Akydev You can check the profile page of @terdon and you will find many things to learn there ... and on some other profiles as well ... and once you have sufficient reputation you can support us by upvoting helpful answers. :)
17:34
yes i will like to connect with good people as you both and lets share more and find out more solution for other problems .
@Akydev You are a very friendly and polite person and so are always welcome ! :)
now i am going to sleep because from morning i not sleep and finally yo yo yo :D its time to take some rest and sleep. my eyes tiered :P morning i will see this page and more comment or maybe give me your link or email where i can follow you and share my things. its glad to meet you all guys . thank.
@Akydev FYI - I upvoted your question - it may help other users as well ! :) Good night - sleep well ! :) Goodbye ... see you ... :)
Thanks for your complement. i am just student and i want to learn more because i am free. no work and its time to explore more with the time.
Thanks. its really serious problem when you want to try to login and face problem like this...
good night . sweet dreams. i really need sleep. see you soon.
Good night.
17:45
Spacial thanks to you man :)))
good night :D
You're very welcome :)

last day (15 days later) »