After some research in the try of solving a problem with sound in Ubuntu 18.04, I found some answers involving editing of the file /etc/default/grub. After playing with this file and rebooting, surprisingly, Ubuntu booted in terminal mode instead of graphical.

Then, I did some search on how to get back to GUI from CLI, but every solution I found just didn't work (I tried startx command so as to start GUI, but it holds for some time and then times out saying "time out in locking authority file").

Also I tried init 5 but this also shows GUI for a blink of an eye and then gets back into the terminal. I tried the Alt + Ctrl + F7 combination, but it appears that it does nothing.

I tried to reinstall ubuntu-desktop, but it faced broken packaged and failed to do so; afterward I got to know that aptitude could possibly solve this issue automatically, but it didn't.

I'm new to Ubuntu and any measure I take at this step seem to worsen the situation!! Any help would be appreciated.

  • 1
    What changes did you make to /etc/default/grub? Did you run sudo update-grub afterwards? – Charles Green Mar 28 '19 at 20:38
  • As Charles suggested, it would be helpful to know what changes you made to /etc/default/grub. Also, you may want to have a look at this: askubuntu.com/a/729211/787506. As for fixing broken packages, see this: askubuntu.com/a/1028516/787506 – Hee Jin Mar 28 '19 at 21:02
  • To be exact I added some numbers before "quiet splash" phrase at GRUB_CMDLINE_LINUX_DEFAULT and yes I did update-grub command .but as soon as I realized that the cause of the problem is this I reverted the file to its initial state but the problem didn't solve. – Saber Dinpashoh Mar 28 '19 at 21:22

To fix your /etc/default/grub, do:

sudo nano /etc/default/grub

Remove everything and add these (default Ubuntu grub file instructions excluding comments):

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

Save using Ctrl+X.

Then do:

sudo update-grub
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.