Ubuntu – “/etc/X11/X not executable” error when startx

desktop-environmentslightdmx11xorg

What happened

I wanted to install KDE and Gnome along with Unity. I don't know when I installed gnome-shell on my Ubuntu 12.10, but I installed KDE minimal desktop just now using

sudo apt-get install kde-plasma-desktop

and selected lightdm as my default DM. Then I entered this to install gnome

sudo apt-get install gnome-shell

and it said I already have it installed.

So, then I restarted in normal mode and Ubuntu didn't start.

Problem

I went to recovery mode and from root shell I used

startx

it throws these bunch of errors:

/etc/X11/X is not executable
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

and when I tried

chmod +x /etc/X11/X

it says

chmod: cannot operate on dangling symlink `/etc/X11/X'

I can't use apt-get to reinstall packages, because our ISP uses portal login – and I don't know how to login from terminal (so can't connect to network). May be I can use live disk, but I don't know how to configure packages on my HD from livedisk.

I am on Windows 8 now. Any help regarding how can I get my desktop back is appreciated!

Best Answer

you have to try this

 sudo dpkg-reconfigure -phigh xserver-xorg
Related Question