twm working but no desktop environment connecting to display

What does
twm working but no desktop environment connecting to display
mean?

Does twm itself look and work OK? Did you install a "desktop environment"?
 
Last edited by a moderator:
Please post your /var/log/Xorg.0.log.

(TWM can't be working if there's no display to connect to)
 
Last edited by a moderator:
If I type the command startx by default it connects to TWM. However if I use any other desktop environment like startfluxbox or enlightenment_start or exec xfce4 etc. etc. I get the error message
Code:
Unable to connect to X display

I even tried making these entries in .xinitrc file, but it did not help.

If I enable Slim then I get the Slim login page but then it connects me to no desktop session.
 
Last edited by a moderator:
This is the .xinitrc I use for slim:
Code:
# Used for SLiM

DEFAULT=awesome

case $1 in
        lxde)
                exec ck-launch-session dbus-launch --exit-with-session lxsession
                ;;

        xfce)
                exec ck-launch-session dbus-launch startxfce4
                ;;
        gnome)
                exec ck-launch-session dbus-launch gnome-session
        ;;
        *)
                exec ck-launch-session $DEFAULT
        ;;
esac

You can add multiple desktop environments to slim by editing slim.conf. What you choose is fed to the .xinitrc script and my example shows how you can start the different desktops.

In slim.conf:
Code:
# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
sessions            xfce4,lxde,gnome
 
Last edited by a moderator:
Choosing sessions does not work anymore with x11/slim, BTW. They also removed the configuration entry sessions in favor of sessiondir where .desktop files are expected. This will make choosing sessions work again, but won't start your .xinitrc anymore, but the executable you specified in Exec=.

I have only one window manager (and don't need to change sessions and there is a fallback to execute sessionstart_cmd when nothing is specified in sessiondir), but I've seen people complaining about it. A patch existed to restore the old behavior with sessions, but it got lost, because the developers emptied their bugtracker, as it seems.
 
Last edited by a moderator:
nakal said:
Choosing sessions does not work anymore with x11/slim, btw.
Really? Damn, I must get my desktop back into shape. I copied the files from my server but it's been a while since I last used any GUI on there.
 
Last edited by a moderator:
I am not using Slim. I am directly trying to connect using the startfluxbox etc. commands. Only startx is working with the twm entry.
 
Last edited by a moderator:
Try using this in .xinitrc to start Xfce.
Code:
exec ck-launch-session dbus-launch startxfce4

If that fails post the /var/log/Xorg.0.log of that session.
 
Last edited by a moderator:
SirDice said:
Try using this in .xinitrc to start XFCE.
Code:
exec ck-launch-session dbus-launch startxfce4

The more specific Xfce way is:
Code:
exec /usr/local/bin/startxfce4 --with-ck-launch
 
Last edited by a moderator:
wblock@ said:
SirDice said:
Try using this in .xinitrc to start XFCE.
Code:
exec ck-launch-session dbus-launch startxfce4

The more specific xfce way is:
Code:
exec /usr/local/bin/startxfce4 --with-ck-launch

Xfce provides a xinitrc file, I think it's better to use it.
 
Last edited by a moderator:
What about fluxbox? hald and dbus services are enabled in /etc/rc.conf. Is it startfluxbox?

Either way Fluxbox is not connecting to the X display. However the method given by SirDice and wblock@ does help in connecting Xfce4 to the X server.
 
Last edited by a moderator:
As far as I recall, x11-wm/fluxbox is just a normal window manager without a special start command. Normally, it would be added to ~/.xinitrc, and be started when startx is run.
 
The more specific xfce way is:
Code:
exec /usr/local/bin/startxfce4 --with-ck-launch

This is working for the/an Xfce4 environment. However any other desktop environment like fluxbox, ratpoison or enlightment is not connecting to the X display. exec /usr/local/bin/startfluxbox is unable to connect to the X Display.

Here is an extract from Xorg.0.log
Code:
[   108.339] (II) LoadModule: "fbdev"
[   108.339] (WW) Warning, couldn't open module fbdev
[   108.339] (WW) Warning, couldn't open module fbdev
[   108.339] (II) UnloadModule: "fbdev"
[   108.339] (II) Unloading fbdev
[   108.339] (EE) Failed to load module "fbdev" (module does not exist, 0)
 
Back
Top