0

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.

Olimjon
  • 7,292
  • 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: https://askubuntu.com/a/729211/787506. As for fixing broken packages, see this: https://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

1 Answers1

0

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_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

Save using Ctrl+X.

Then do:

sudo update-grub
Olimjon
  • 7,292