LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-02-2017, 08:12 AM   #1
obiwanjim
LQ Newbie
 
Registered: Feb 2017
Posts: 4

Rep: Reputation: Disabled
Question 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
 
Old 02-02-2017, 09:39 AM   #2
petelq
Member
 
Registered: Aug 2008
Location: Yorkshire
Distribution: openSUSE(Leap and Tumbleweed) and a regularly changing third
Posts: 539

Rep: Reputation: Disabled
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.
 
Old 02-02-2017, 10:51 AM   #3
obiwanjim
LQ Newbie
 
Registered: Feb 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
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?

Last edited by obiwanjim; 02-02-2017 at 11:05 AM. Reason: Manners (hi pete)
 
Old 02-02-2017, 04:53 PM   #4
petelq
Member
 
Registered: Aug 2008
Location: Yorkshire
Distribution: openSUSE(Leap and Tumbleweed) and a regularly changing third
Posts: 539

Rep: Reputation: Disabled
Quote:
Originally Posted by obiwanjim View Post
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.
 
Old 02-02-2017, 04:57 PM   #5
obiwanjim
LQ Newbie
 
Registered: Feb 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.
 
Old 02-03-2017, 08:55 AM   #6
petelq
Member
 
Registered: Aug 2008
Location: Yorkshire
Distribution: openSUSE(Leap and Tumbleweed) and a regularly changing third
Posts: 539

Rep: Reputation: Disabled
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.
 
Old 02-03-2017, 10:22 AM   #7
obiwanjim
LQ Newbie
 
Registered: Feb 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.
 
Old 02-04-2017, 03:59 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,250
Blog Entries: 10

Rep: Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160
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.
 
Old 02-04-2017, 05:56 AM   #9
petelq
Member
 
Registered: Aug 2008
Location: Yorkshire
Distribution: openSUSE(Leap and Tumbleweed) and a regularly changing third
Posts: 539

Rep: Reputation: Disabled
Quote:
Originally Posted by obiwanjim View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
startx from root user is working while from sudo user not unkn(0)wn Linux - Newbie 2 08-17-2012 09:31 PM
After improper shutdown, 1 user can't startx (KDE), sudo, OR su. Root account is ok! ShellyCat Linux - Desktop 2 09-19-2010 03:56 AM
[SOLVED] sudo muck up, via xinitrc set up, and now startx different mark_alfred Linux - General 3 08-23-2009 09:54 PM
desktop environme (startx not recognized command) jlp1976 Debian 4 05-05-2005 07:18 AM
can,t get into the desktop from startx ronss Slackware - Installation 2 01-28-2005 02:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration