MKii
Posts: 5
Joined: Sun May 06, 2012 11:31 am

Re: StartX fails – worked yesterday [solved]

Mon May 07, 2012 5:12 pm

Hi,

I had my RPi up and running yesterday, it was great.

Today, it boots, but when I call startx the screen goes blank.

If I sit and leave it for a few minutes, I see the following on the screen:

No Protocol Specified

..

[repeated all the way down the screen]

Giving Up

Xinit: Resource temporarily unavailable (errno 11) : unable to connect to x server

Waiting for x server to shut down

server error

Is this easily sorted?

I saved a few files onto the desktop.

Got the music player working.

Got the internet working (I couldn't read the MagPi on the RPi).

Now it doesn't work (

Any ideas?

Thanks

Michael

Nr90
Posts: 216
Joined: Sat Nov 26, 2011 12:39 pm

Re: StartX fails – worked yesterday [solved]

Mon May 07, 2012 7:12 pm

Maybe missconfigured .Xauthority?

Try renaming this file (in your home directory) to .Xauthority.backup and restart x

User avatar
nick.mccloud
Posts: 804
Joined: Sat Feb 04, 2012 4:18 pm

Re: StartX fails – worked yesterday [solved]

Mon May 07, 2012 7:48 pm

Is there the possibility you started X with:

xinit /usr/bin/lxsession

MKii
Posts: 5
Joined: Sun May 06, 2012 11:31 am

Re: StartX fails – worked yesterday [solved]

Mon May 07, 2012 8:39 pm

Hi,
I am very much a beginner in Linux, so I am not sure how to rename a file from the command line.
To start x I just typed
Startx
After logging on.
Thanks for the help
Regards
Michael

Steady_Bear
Posts: 110
Joined: Sat Jan 14, 2012 12:06 pm

Re: StartX fails – worked yesterday [solved]

Mon May 07, 2012 10:32 pm

Hi,

Renaming is as easy as:

mv old.name new.name

There is also a rename command, but if I remember rightly, it's a little more advanced on a Debian box. Not sure how the RasPi Debian is set up. Don't even know what the default login [sansX] is at boot (I'd assume root, but I think someone somewhere suggested otherwise): 'whoami' answers this for a point of curiosity.

Making sure there is sufficient space left on the device is important (it's tripped me at times when not paying attention. Some software, including window managers, sit and do nothing):

df -Th

Also, X (I'd also assume LXDE - never played with that either) has a very good log file under /var/log

cat, or less, or more should give various ways of reading the file. May be patronising*, but:

'ls' (el-es, not eye-es) to mooch about the file system, and hit TAB (or double tab if nothing seems to happen at first) for command-name / filename auto-completion.

*Firefox is claiming I've spelt patronising (and for the record spelt) wrong. Ironic!

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11995
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: StartX fails – worked yesterday [solved]

Mon May 07, 2012 11:31 pm

This is ridiculous!

assuming this is a brand new R-PI (and Linux) user who, as he tells us, knows nothing about linux than that typing

startx

will start the more familiar GUI, and assuming like he said that it worked for one day, and that the next day it didn't work anymore.

assuming all that:

how big is the chance that his .Xauthority is somehow misconfigured?

What could he possibly have done to get his  .Xauthority misconfigured?

I propose you should assume its out of the question that a complete new Linux user with no previous knowledge other than that "startx" starts the gui, goes on to start the gui with "xinit /usr/bin/lxsession", nor is it reasonable to assume he knows how to rename a file, do a "cat", or "ls", or god forbid read and interpret a logfile.

Come on guys this is an absolute beginner and you are asking things from him as if he is a somewhat experienced Linux user.

So place yourself in his shoes, what could he have done that resulted in this problem, and what can he do to solve it without -any- knowledge about the subject.

yes, you can try to guide him through debugging the problem, but not with the casual "to rename a file use mv old.name new.name". Perhaps with very precise step for step instructions. What has he to rename and to what, where is the file to rename, and how does he "get" there (you know using CD etc).

At this point, not knowing what caused this, I would have to say, there is no immediate solution for him, other than just reflashing his card and trying again, for lack of an easier solution, or has someone a really bright idea?

Perhaps an experienced user should try to re-create this problem, to see what caused it, and what can be done in three easy to follow steps to solve it, or better yet, solve the bug that allows this to happen.

Or even better an experienced Linux guru with a PI may ask if he can lend the card from this user to look at what has happened, and if its reproducable.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11995
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: StartX fails – worked yesterday [solved]

Tue May 08, 2012 12:24 am

MKii said:


Got the internet working (I couldn't read the MagPi on the RPi).


Yes, that is because the current browser doesn't support flash, but there is also a .PDF version of the magazine you can download, and that one you should be able to open.

Though I have to say even on a fast computer it was a bit of a struggle, perhaps they have something to learn, its very early days yet, and this is all experimental.

I read that the chromium browser also works, not sure if that one does flash, but I heard its a better browser than the one included now.

Are you sure you typed startx right?

Does it still not work?

I assume that Steady_Bears comments were for other readers that were thinking about this problem, not specifically for you. I assume that you will need step for step instructions for whatever is needed for you to do, that is, after the experts have figured out what might have happened. Obviously this should not happen, and it is very strange it has.... Perhaps the quickest way to solve it if the problem persists, is to re-flash the SD-card, if the problem returns there is something fishy going on indeed.

good luck.

Nr90
Posts: 216
Joined: Sat Nov 26, 2011 12:39 pm

Re: StartX fails – worked yesterday [solved]

Tue May 08, 2012 2:55 am

I am far from an expert an am not sure how to replicate this myself, but other users on other systems I found google-ing had similar errors after updating/installing software.

The OP mentions installing things. The .Xauthority seems to get messed up.

Other people have fixed this by moving or deleting .Xauthority

Steps to do this:

1. Boot your R-Pi

2. log in with your user account (normally user: pi, password: raspberry)

I believe the root account is disabled under debian. If not and you are logging in with user:root, stop doing this X should be started as a non-root user, so use the standard user or one you created yourself.

3 Enter your home directory by typing cd ~

4. Type ls -A

5. You will now see which files are in your home directory. Look if you see a file called .Xauthority

6. Type mv .Xauthority .Xauthority.backup

This will allow you to restore the file later if needed.

6. Type startx and cross your fingers

If this fails recreating your SD card might be your best bet.

Hope it helps

RussIT
Posts: 28
Joined: Thu Jan 05, 2012 11:34 am

Re: StartX fails – worked yesterday [solved]

Tue May 08, 2012 3:03 am

I dont know if its the same problem but startx didnt work the second time I tried to boot my pi.

I found that because I was using a 2 GB image the file i downloaded after the first boot had filled the entire partirion.

This stopped startx working.

After removing the file startx worked again.

To remedy this i made the partition bigger using gparted. the file was a few hundred megs which is enough to fill the sd card unless you have expanded the standard partiton

MKii
Posts: 5
Joined: Sun May 06, 2012 11:31 am

Re: StartX fails – worked yesterday [solved]

Tue May 08, 2012 11:18 am

Hi All,

I think that RussIT has hit the nail on the head.

I copied some large images across from my network drive.

I may have run out of space in my partition.

I need to resize the partition to 4Gb as I am using a 4Gb SD card.

Or, as a short term fix, If I can find the desktop folder for X, I can delete the folder with the images in from the command line.

I will take a look at using gparted (I'm sure I saw an example somewhere).

I'll let you know if this fixes the issue.

Thanks again

Michael

Steady_Bear
Posts: 110
Joined: Sat Jan 14, 2012 12:06 pm

Re: StartX fails – worked yesterday [solved]

Tue May 08, 2012 11:54 am

Mahjongg: My post was directed at the OP. I figured that as one of the first owners of a Pi the OP was quite into learning new things and would have learnt a lot more just experimenting with the commands I listed.

As my post stated I don't know how the RasPi/Debian is set up so I can't provide step by step instructions.

I did miss, however,  the following points:

'man command-name'  or 'command-name --help' can both provide good (or at times useless) information on how to use the software.

Any file starting with a fullstop (such as .Xauthority) is a hidden file and will only be listed under ls if you append the -a flag, ie 'ls -a'.

If the LXDE log file is anything like the Xorg log file, then the problematic lines will start with (EE) Error, or some-such, and (WW) Warning for less critical things. I'd hope the OP would be able to read that and feedback the information if it was spotted. After all the OP managed to navigate Farnell's / RS's website, so reading is likely a present talent.

And, as the OP was already on the command line, my comment 'type df -Th' would have shown the exact problem being suffered. I did also place myself in the shoes of a complete Linux newbie, 10 years ago. Guess how I learnt to be proficient with the system. No one held my hand - it can only hold you back.

One final note of happiness, for those who like brevity (ironic hey), highlight text with your mouse, then middle click elsewhere. The software 'gpm' will give you a mouse under the console too, if it's ported to ARM that is.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11995
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: StartX fails – worked yesterday [solved]

Tue May 08, 2012 1:59 pm

Well, at least we found the problem (SD-card full), and a relatively painless way to fix it.

I noticed the fix was added to the wiki already. Great work!

What I was missing was the argumentation -why- .Xauthority could have had anything to do with it.

MKii
Posts: 5
Joined: Sun May 06, 2012 11:31 am

Re: StartX fails – worked yesterday [solved]

Tue May 08, 2012 7:30 pm

Hi All,

I think that the issue was that the partition was full!

gparted couldn't seem to resize the partition.

It failed but didn't give me an error.

Possibly the partition is too full to resize?

I'm going to start from scratch and then BEFORE doing anything else extend the partition.

Then I'm going to make a copy of that card as a point to restore to.

I tried renaming the'Xauthority file and that didn't fix the issue.

running df -h

says that the partition has not been resized and is full.

Thanks for all the help.

Regards

Michael

RussIT
Posts: 28
Joined: Thu Jan 05, 2012 11:34 am

Re: StartX fails – worked yesterday [solved]

Tue May 08, 2012 9:08 pm

When resizing the partition note the following:

the partition has to be unmounted to resize and the unallocated space has to be next to it, so you may need to move one of the other partitions first to one end

Number 2
Posts: 1
Joined: Wed Jun 13, 2012 8:28 pm

Re: StartX fails – worked yesterday [solved]

Wed Jun 13, 2012 8:42 pm

Hello. I hate to bump this topic but I am stuck.

So I try to go with Nr90's instructions but I can't understand it at all.
At step three, I am suppose to type:

"cd ~" or "cd -"?

or am I suppose to type "type cd ~"?

Also I try to re-flash the whole SD card (by formatting it and flashing it again) but it still has the same same effect. I thought I delete the whole SD card!

Oh boy... I shouldn't try to install programs in that thing from the start.

If you guys can help me please it would very appreciated.

User avatar
rleyden
Posts: 70
Joined: Thu Jun 14, 2012 2:17 am

Re: StartX fails – worked yesterday [solved]

Thu Jun 14, 2012 2:37 am

Day 2 with my Rpi and I'm also having the same problem, "no protocol specified" returning with I try to startx.

I expanded the partition to 4 gB and "df" indicates none of the partitions is more than 38% full.
Prior to this, I stopped the system a couple times by pulling the power and I thought the files system might be corrupt. I ran fsck (or equivalent) on the SD card under Ubuntu and it did find and fix some errors. I did the same at the command prompt under the R pi.
Also, I renamed .Xauthority (there are 2 other similar files I left alone).
Still no success with startx.
I've invested about 4 or 5 hours downloading updates and applications (krdc (very big) and vncserver) and I'd rather not have to go back to the start.
I've dabbled in unix/linux for quite a while and I'm familiar with command line stuff but this kind of configuration issues baffles me.
Any suggestion would be greatly appreciated.
Thanks,

Rich

User avatar
rleyden
Posts: 70
Joined: Thu Jun 14, 2012 2:17 am

Re: StartX fails – worked yesterday [solved]

Thu Jun 14, 2012 3:24 am

.Xauthority seems to contain mostly binary but has the test "MIT MAGIC COOKIE" repeated about 6 times. What is this, some new Stuxnet viris?

User avatar
rleyden
Posts: 70
Joined: Thu Jun 14, 2012 2:17 am

Re: StartX fails – worked yesterday [solved]

Thu Jun 14, 2012 5:12 am

Googling the problem I found a solution in the Ubuntu forums.
After renaming .Xauthority, I changed permissions in the home folder.

Code: Select all

sudo chmod 777 /home/pi
Startx now works.

oldgeek
Posts: 1
Joined: Tue Oct 09, 2012 10:28 pm

Re: StartX fails – worked yesterday [solved]

Tue Oct 09, 2012 10:48 pm

I have a similar problem but can not find any answer in the posts. Can not do startx when logged in with the pi account but when I do sudo -i and log in as root everything works. Tried the rename .Xauthority to no avail. Problem may have been caused when adding new modules as root but don't know how to fix it if I did that. It lists a bunch of stuff and then comes back with basically - Fatal server error - failed to activate core devices. Server terminated with error (1). xinit: server error.

Tried to chmod the startx dir and files thinking thry may have been locked to root to no avail.

Not sure how to relad startx or what may be causing problems. Anyone seen this before ?


thanks...guy

James007Bond123
Posts: 1
Joined: Fri Dec 28, 2012 12:01 am

Re: StartX fails – worked yesterday [solved]

Fri Dec 28, 2012 12:11 am

Same issue(s) here: second day, startx failing, and bad file descriptors. Please help. PS I have tried EVERYTHING!

PiBaker
Posts: 1
Joined: Sat Dec 29, 2012 2:58 pm

Re: StartX fails – worked yesterday [solved]

Sat Dec 29, 2012 3:26 pm

Hi All,

I'm new to RPi and don't have that much exposure to Debian!

I have the same issue as being reported and I'm not able to resolve it. When I use 'startx' the RPi icon appears but no menu or shortcuts. My command line is working fine and all elements visible.

I got my RPi today. built my SD card using 'RPi-sd card builder v1.1' on my MacBook Pro (running MaxOS 10.7.4) with the 2012-12-16-wheezy-raspbian.zip downloaded over http direct from the official pages:

http://downloads.raspberrypi.org/images ... spbian.zip

my checksums were ok and SD card seems to have been created with no issues as it boots ok. I'm running my RPi on a 32inch Samsung TV over HDMI.

I've tried all the tricks suggested in this thread (permissions on pi user dir, renaming .Xauthority file etc). I've even recreated my SD card several times. None of these steps have fixed it for me either.

I do have an '.xsession-errors' file (see below) in my user directory does this help at all?

Code: Select all

Xsession: X session started for pi at Sat Dec 29 14:48:35 UTC 2012
Obt-Message: Xinerama extension is not present on the server
/usr/bin/pactl: error while loading shared libraries: /usr/lib/arm-linux-gnueabihf/libpulse.so.0: invalid ELF header
Openbox-Message: Unable to find a valid menu file "/usr/share/lxde/openbox/menu.xml"
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 4819 requests (4819 known processed) with 0 events remaining.
pcmanfm: Fatal IO error 0 (Success) on X server :0.
Xsession: X session started for pi at Sat Dec 29 14:53:24 UTC 2012
Obt-Message: Xinerama extension is not present on the server
/usr/bin/pactl: error while loading shared libraries: /usr/lib/arm-linux-gnueabihf/libpulse.so.0: invalid ELF header
Openbox-Message: Unable to find a valid menu file "/usr/share/lxde/openbox/menu.xml"
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 2450 requests (2450 known processed) with 0 events remaining.
Does anyone have any other suggestions...or even links to older versions of raspbian I might try creating another SD card with an older version of the OS.

UrbanPi
Posts: 1
Joined: Sun Feb 10, 2013 5:44 pm

Re: StartX fails – worked yesterday [solved]

Sun Feb 10, 2013 6:45 pm

Hi All!

I've just powered up my Pi yesterday, and today the startx command didn't start the window manager. After reading throu this thread, I found that I also had a huge '.xsession-errors' file occupying all rootfs on the SD-card.
After deleting that file the startx command worked again.

Just run in your home directory:

Code: Select all

~$ rm .xsession-errors
Hope this will help someone.
BR
/Urban

reulini
Posts: 1
Joined: Tue Mar 26, 2013 3:57 pm

Re: StartX fails – worked yesterday [solved]

Tue Mar 26, 2013 3:59 pm

that really helped me. thanks urban!

mushprin21
Posts: 13
Joined: Sun Mar 17, 2013 6:03 pm

Re: StartX fails – worked yesterday [solved]

Tue Mar 26, 2013 6:13 pm

Well mine did the same as yours. But stupidly I did start desktop on boot. The pi booted fine, but the screen went black immediately with the annoying flashing _.
If I can get back to the splash screen terminal, but can't get the startx. I could be able to do things like:

Code: Select all

sudo apt-get install chromium-browser
?
Thanks for creating the topic. I do have chromium but is it possible to have a "run" code in the terminal so I could still run programs without startx? (I have only been using linux for a month).
The "hottest" computer you will ever find!
hahaha...

KaminoShimobe
Posts: 1
Joined: Fri Apr 05, 2013 12:15 pm

Re: StartX fails – worked yesterday [solved]

Fri Apr 05, 2013 1:05 pm

I tried all of this but nothing worked and I just reflashed my SD card :D thx anyways!

Return to “Troubleshooting”