LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Sudo Startx Only Way to Desktop (https://www.linuxquestions.org/questions/linux-software-2/sudo-startx-only-way-to-desktop-4175598793/)

obiwanjim 02-02-2017 08:12 AM

Sudo Startx Only Way to Desktop
 
Hi All,

I am running Linux Lite (Ubuntu?) 3.2 on an HP Proliant Server.

After a few updates and a reboot I now find myself at a black screen (no mouse pointer). The yellow splash screen comes up for a few seconds but then goes to black. I can crtl/alt/f1 to a prompt and login but to start the desktop I have to run "sudo startx".

Another forum had me run some commands to remove the Xauthority file, make a new one and then check permissions-

Groups <user> yields-
<user>: <user> adm cdrom sudo dip plugdev lpadmin sambashare

ls -la /dev/tty0 yields-
crw--w---- 1 root tty 4, 0 Jan 4 09:18 /dev/tty0

Other than that no more advice. Any idea how I can get this to boot to X again?

Thanks

petelq 02-02-2017 09:39 AM

Hi obiwanjim and welcome to LQ.
Here's something you can try when you next boot.
As soon as you see the grub menu screen press 'e' on the keyboard, look for an entry starting something like 'linux /vmlinuz...' go to the end of that line and add a space and 'nomodeset' (without quotes) then press 'f10'.
See if that boots ok (you'll probably not have the best graphics display) open a terminal and input
Code:

dmesg tail
then let us know the results of that.

obiwanjim 02-02-2017 10:51 AM

Hi Pete.

I had to edit my grub file to show up but I can't seem to make the 'nomodeset' command work. I get a message about no such command after saving and trying to boot. Should I run and attach the dmesg file anyway?

I think that it does seem to be a permission issue. Does "timeout in locking the authority file" mean anything when running startx without the sudo?

petelq 02-02-2017 04:53 PM

Quote:

Originally Posted by obiwanjim (Post 5663968)
Hi Pete.

I had to edit my grub file to show up but I can't seem to make the 'nomodeset' command work. I get a message about no such command after saving and trying to boot. Should I run and attach the dmesg file anyway?

I think that it does seem to be a permission issue. Does "timeout in locking the authority file" mean anything when running startx without the sudo?

You don't have to save anything. It's just a temp change to boot.
Don't edit the grub file - do it from the boot menu screen when you switch on. I assume if you get to where you can startx, you must be able to boot. You make the changes I mentioned when you see the grub menu BEFORE it actually boots.

obiwanjim 02-02-2017 04:57 PM

No I know. I had to hash out the line in my grub file to even see the grub loader. I then booted and added the line where you suggested but got the error.

petelq 02-03-2017 08:55 AM

I still don't understand what you're doing. I just wanted you to add the 'nomodeset'. You didn't have to change anything.
What did you hash out?
You must have been able to boot your system to at least a console screen to be able to do startx.

obiwanjim 02-03-2017 10:22 AM

You can't add anything to the grub line(s) if the grub loader does not show up while booting. In order for it to show up you have to hash out this line in etc/default/grub-
# GRUB_HIDDEN_TIMEOUT=0

Then when it boots I get the kernel options you mentioned but adding 'nomodeset' at the end of any of them errors out with "no such command" when you continue.

ondoho 02-04-2017 03:59 AM

the line in question looks something like this:
Code:

linux /boot/vmlinuz-linux root=UUID=xxxxxxxxx-xxxxxxxx-xxxxxxxxx <possibly_more_options>
and you have to edit it to look like this:
Code:

linux /boot/vmlinuz-linux root=UUID=xxxxxxxxx-xxxxxxxx-xxxxxxxxx <possibly_more_options> nomodeset
be aware that you don't accidenatlly put the nomodeset on the beginning of the next line, instead of at the end of that line.

in any case, once you started X with sudo, it might have done more harm than good.
it is possible that some files in your user's $HOME are now owned by root and X can't start anymore.

petelq 02-04-2017 05:56 AM

Quote:

Originally Posted by obiwanjim (Post 5664535)
You can't add anything to the grub line(s) if the grub loader does not show up while booting. In order for it to show up you have to hash out this line in etc/default/grub-
# GRUB_HIDDEN_TIMEOUT=0

Then when it boots I get the kernel options you mentioned but adding 'nomodeset' at the end of any of them errors out with "no such command" when you continue.

Sorry, I should have realised but I didn't think anyone did that. Then again I have 4 system options on my machine so I need to see grub menu.
I think ondoho has expressed the appropriate line better than I did. Nomodeset will work if you get it on the right line.


All times are GMT -5. The time now is 06:44 AM.