IPW
Posts: 11
Joined: Mon Jul 13, 2015 12:53 am

Startx problems

Wed Dec 30, 2015 3:26 pm

so, this happened when i moved my pi into my room, and even when i put it where i first used it, it does the same thing.
it boots just fine, but when i try to run startx, it waits for a couple seconds, and then the screen goes dark, and then there are a bunch of commands on the screen, and it always says at the bottom

Code: Select all

xauth: (argv):1:  bad display name "(none):0" in "remove" command
I have no prior coding experience, i am not a computer wiz, and i humbly ask that solutions be in the most basic laymen's terms possible.

My model is a Pi 2B, and i have a usb keyboard and mouse, hdmi display, and i use an edimax wireless dongle, and ive also used an ethernet cable, but it still says the smae thing.

Thanks for any help! :D

Navyscourge
Posts: 258
Joined: Sat Oct 24, 2015 1:50 pm

Re: Startx problems

Wed Dec 30, 2015 8:21 pm

When you moved the Pi, did you shut it down using the software commands, or just unplug it? You might have corrupted your card.

Before worrying about that, can you type the following at the prompt

Code: Select all

sudo cat /etc/hostname
and post the response here (that entry should return a name; if it is blank that could be the cause of the problem)

IPW
Posts: 11
Joined: Mon Jul 13, 2015 12:53 am

Re: Startx problems

Wed Dec 30, 2015 9:05 pm

Well, i did the command, and it came up with

Code: Select all

sudo: unable to resolve host (none)
Cherry Pie
cherry Pie is what i named it when i got it. And i do believe i just unplugged. It might've been corrupted by that.

thanks for the reply!

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Startx problems

Wed Dec 30, 2015 10:32 pm

The problem is that host names don't work well with a space in them. Also, best to stick to all lower case letters. Changing the hostname to have no spaces will fix the problem.

Navyscourge
Posts: 258
Joined: Sat Oct 24, 2015 1:50 pm

Re: Startx problems

Wed Dec 30, 2015 10:35 pm

Check this thread: viewtopic.php?f=36&t=49925

Firstly, a hostname cannot contain a space; the Pi gets confused because it 'thinks' the hostname is "Cherry" - it stops reading the name when it finds the space.

Use the raspi-config utility to change it to "Cherry-Pi" with a dash, not a space. If it still does not work, add the lines to the /etc/hosts file like in the thread above.

User avatar
DougieLawson
Posts: 39124
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Startx problems

Wed Dec 30, 2015 11:27 pm

If you change the name using sudo raspi-config it reminds you of the syntax rules for host names. Not sure if it enforces them.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

IPW
Posts: 11
Joined: Mon Jul 13, 2015 12:53 am

Re: Startx problems

Wed Dec 30, 2015 11:42 pm

So, I changed it with Suso raspi config. Dud startx, then it said hostname: name or service not known.
Now the screen has gone black, and then it comes back on after a while and the screen shows that it was spamming protocol not found. Then it comes up with the same thing in the beginning, only instead of (none): 0 it says (cherrypie): 0.

Btw I changed it to cherrypie in raspi config

User avatar
DougieLawson
Posts: 39124
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Startx problems

Wed Dec 30, 2015 11:50 pm

That's because you've messed up /etc/hostname and /etc/hosts

/etc/hostname

Code: Select all

cherrypie
/etc/hosts

Code: Select all

127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
fe00::0         ip6-localnet
ff00::0         ip6-mcastprefix
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

127.0.1.1       cherrypie
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

IPW
Posts: 11
Joined: Mon Jul 13, 2015 12:53 am

Re: Startx problems

Wed Dec 30, 2015 11:59 pm

It says

Code: Select all

/etc/hosts: permission denied
or

Code: Select all

/etc/hostname: permission denied

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Startx problems

Thu Dec 31, 2015 12:01 am

IPW wrote:It%20says%20

Code: Select all

/etc/hosts:%20permission%20denied
%20or%20

Code: Select all

/etc/hostname:%20permission%20denied
In the terminal. You will need to use an editor and sudo to raise you privilege.

Code: Select all

sudo nano /etc/hosts

Code: Select all

sudo nano /etc/hostname

IPW
Posts: 11
Joined: Mon Jul 13, 2015 12:53 am

Re: Startx problems

Thu Dec 31, 2015 12:06 am

i did that, but how do you get out of the terminal? is it X or ^X or what

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Startx problems

Thu Dec 31, 2015 12:17 am

IPW wrote:i did that, but how do you get out of the terminal? is it X or ^X or what
To write the file in nano ... hold down the [Ctrl] key and press the [O] (as in Orange) key.
To exit nano ... hold down the [Ctrl] key and press the [X] key.

IPW
Posts: 11
Joined: Mon Jul 13, 2015 12:53 am

Re: Startx problems

Thu Dec 31, 2015 12:37 am

So, i did everything you told me. I double checked everything, the hostname is now cherrypie, but now it does the same thing as mentioned before, only it says

Code: Select all

xinit: giving up
and

Code: Select all

xinit: server error
i dont know what i did wrong

User avatar
DougieLawson
Posts: 39124
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Startx problems

Thu Dec 31, 2015 1:31 am

After you make those edits you MUST reboot.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

IPW
Posts: 11
Joined: Mon Jul 13, 2015 12:53 am

Re: Startx problems

Thu Dec 31, 2015 1:37 am

Is there a specific command i use to reboot? i tried

Code: Select all

reboot
but it said that i must be superuser. or should i just unplug then plug back in? if i do that, im afraid i might corrupt it.

User avatar
DougieLawson
Posts: 39124
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Startx problems

Thu Dec 31, 2015 1:43 am

sudo reboot # should work from the pi userid.

I think there's also an option on the GUI logout menu.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

IPW
Posts: 11
Joined: Mon Jul 13, 2015 12:53 am

Re: Startx problems

Thu Dec 31, 2015 1:52 am

It... it still doesnt work... i have no clue what i did wrong! i did everything you guys told me... but i dont know what i messed up...

QuietZone
Posts: 89
Joined: Sat Dec 05, 2015 7:13 pm

Re: Startx problems

Thu Dec 31, 2015 1:54 am

Wouldn't it be easier to just re-install (i.e., start over) at this point?
"If you haven't got anything nice to say about anybody come sit next to me." — Alice Roosevelt Longworth

IPW
Posts: 11
Joined: Mon Jul 13, 2015 12:53 am

Re: Startx problems

Thu Dec 31, 2015 1:55 am

I honestly wouldnt know how to do that.

User avatar
DougieLawson
Posts: 39124
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Startx problems

Thu Dec 31, 2015 10:11 am

IPW wrote:I honestly wouldnt know how to do that.
If you SDCard is NOOBS/Raspbian then holding [SHIFT] during boot gets the recovery system running. You can use that to trash and re-install your system. YOU WILL LOSE EVERYTHING YOU'VE DONE unless you take a backup.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Troubleshooting”