Is /etc/X11/xinit/xinitrc. supposed not to exist?
If you have the xinit package, the file you mention should be installed.
$ dpkg -L xinit | grep xinitrc
/etc/X11/xinit/xinitrc
$
If it's not, these commands ought to fix it:
sudo apt-get purge xinit
sudo apt-get install xinit
user280121
Updated on September 18, 2022Comments
-
user280121 over 1 year
I'm trying to connect to Amazon EC2 Ubuntu 14.04 instance through VNC but always fail (only grey background). Some articles say we should have a line in
.vnc/xstartup
which readsexec sh /etc/X11/xinit/xinitrc
But I checked this file and found that this file does not exist at all in EC2 Ubuntu. So ifsh /etc/X11/xinit/xinitrc
is executed, there should be an error likesh: 0: Can't open ...
I guess that this is the reason why I can not display the desktop of EC2 ubuntu from TightVNC (I can successfully connect). So my question is: is
/etc/X11/xinit/xinitrc
supposed not to exist? If so, what happens if the execution ofsh /etc/X11/xinit/xinitrc
fails? If it should exist, what contents should this file contain?-
Gunnar Hjalmarsson over 9 yearsThe file belongs to the xinit package, so you may want to install (or reinstall) xinit.
-
user280121 over 9 yearsYes, I have installed xinit package. I know that by running a command
dpkg -l|grep xinit
and seeing xinit in the results output. -
Gunnar Hjalmarsson over 9 yearsThen purge it and install it again to get
/etc/X11/xinit/xinitrc
. -
user280121 over 9 years@Gunnar Hjalmarsson: I did, no use.
-
Gunnar Hjalmarsson over 9 yearsStrange. (I still posted an answer to clarify.)
-
-
user280121 over 9 yearsThank you for the answer. I tried your method again, this time /etc/X11/xinit/xinitrc appeared, with a line ". /etc/X11/Xsession" in it. But I still only get a grey screen in the remote desktop when connecting.
-
Gunnar Hjalmarsson over 9 years@user280121: Then the cause for the problem is something else. Can't help with that, I'm afraid.