# slim and openbox



## bkouhi (Mar 12, 2013)

Hello,

I installed x11/slim. The problem is slim can't l*a*unch openbox. Actually, it can't start any other window manager (I tried twm too). Although the login window works and I can log in to my account but after that slim just shows me a black screen with an X shaped cursor.

Here is slim.conf:


```
[CMD="%"]grep -v '^$' /usr/local/etc/slim.conf |grep -v '^#'[/CMD]
default_path        [B]/bin:/usr/bin:/usr/local/bin[/B]
default_xserver     /usr/local/bin/X
xserver_arguments   vt09
halt_cmd            /sbin/shutdown -p now
reboot_cmd          /sbin/shutdown -r now
console_cmd         /usr/local/bin/evilvte -e /bin/sh -c "/bin/cat /etc/motd; exec /bin/login"
suspend_cmd        /usr/sbin/acpiconf -s 3
xauth_path         /usr/local/bin/xauth
authfile           /var/run/slim.auth
login_cmd          [B] exec /bin/sh - ~/.xinitrc %session[/B]
sessions            [B]openbox,xfce4,icewm-session,wmaker,blackbox[/B]
screenshot_cmd      import -window root /slim.png
welcome_msg         Welcome to %host
shutdown_msg       The system is powering down...
reboot_msg         The system is rebooting...
default_user        javad
focus_password      yes
current_theme       fbsd
lockfile            /var/run/slim.pid
logfile             /var/log/slim.log
```

And ~/.xinitrc:

```
[CMD="%"]cat ~/.xinitrc[/CMD]
DEFAULT_SESSION=openbox-session
CK="ck-launch-session dbus-launch --exit-with-session"

case $1 in
openbox)
        exec ${CK} openbox-session
        ;;
*)
	exec $DEFAULT_SESSION
	;;
esac

if [ -z $1 ]
then
	exec ${CK} openbox-session
fi
```

As I said before, after I log in to my account, slim just shows a black screen with an X shaped cursor (I think it is pure `# /usr/local/bin/X`?)

Pure `% startx` without using slim will start openbox successfully.
I searched a lot and tried many other ways but with no result.


----------



## fonz (Mar 12, 2013)

bkouhi said:
			
		

> ```
> logfile             /var/log/slim.log
> ```


Have you checked this file for any clues?


----------



## bkouhi (Mar 12, 2013)

```
[CMD="%"]tail /var/log/slim.log [/CMD]
slim: waiting for X server to begin accepting connections.
slim: open_session: Unable to open session: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
slim: waiting for X server to begin accepting connections.
```

Thanks for your quick reply. Added this line into /etc/rc.conf and it works now.


```
dbus_enable="YES"
```


----------



## taz (Mar 12, 2013)

*H*ad the same problem with slim and it took me a day to figure it out. Since I don't use hal and dbus this is what was causing the problem, well dbus actually. So make sure you have:


```
dbus_enable="YES"
```

in your /etc/rc.conf file if you are going to use slim.

EDIT: hehe 3 minutes too late


----------

