# Can't Start X



## xsundevil (Apr 25, 2021)

I installed X.org server on my laptop that I have set up as a web server (Apache).  My desktop software of choice is Xfce4.

After the installation, I added dbus_enable="YES" to my rc.conf.

But, after running ./.xinitrc I get the following errors:

xrdb: Connection refused
xrdb: Can't open display ''
Unable to init server: Could not connect to 127.0.0.1.  Connection refused
xfce4-session: Cannot open display:
Type 'xfce4-session --help' for usage.

I'm obtaining my IP address dynamically so I don't have a static IP address, which could be part of the issue.

Setting the DISPLAY environment variable doesn't produce any changes and setting it with xfce4-session only produces slightly different errors:
Unable to init server: Broadway display type not supported: 192.168.X.XXX:0.0
xfce4-session: Cannot open display: 192.168.X.XXX:0.0

If my system already's got an IP address from my ISP how come the init server is still looking to 127.0.0.1?


----------



## zirias@ (Apr 25, 2021)

You're not supposed to run ~/.xinitrc. It's executed by xinit(1). But most likely, you don't want to start _that_ directly but use startx(1) instead.


----------



## xsundevil (Apr 25, 2021)

You are absolutely right.  It just says in the handbook to create ./.xinitrc, but to run startx, not .xinitrc!


----------



## balanga (Apr 25, 2021)

Do you have an ~/.xinitrc ? If so what is in it?

I have:-

```
ck-launch-session dbus-launch --exit-with-session startlxde
```

I use lxde as my window manager


----------

