Solved XFCE: Xserver already running on display0

Hello everyone!
I have tried as a personal challenge to get freebsd with dekstop up and running with a c64 emulator. I had another thread where I got my network card to work, and now I hope that you guys could help me with XFCE. When I type Startx I get the error "Xserver already running on display0".

Ive heard that this error is perfectly normal when running startxfce4 from inside X (such as when started from a .xinitrc file). But thats what the handbook told me to do... I also dont understand what they mean "inside x" as Im still in textmode.
https://forums.freebsd.org/threads/xfce-says-x-server-already-running.30863/

And I dont understand the answer in the above thread either. "So start X with just a simple terminal ( xinit /usr/local/bin/xterm) and then, from inside the xterm that starts, run startxfce4. See if you get any errors other than the ones listed above." That sentance I dont really understand.
my xinitrc is just one line that now says "exec blabla startxfce4 " which I added from the handbook :https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x11-wm.html

I would be grateful for any answers.
 
It sounds like X is already running and you pressed CTRL-ALT-Fn to return to the console to start XFCE. From the console hit ALT-F9 to return to X.
 
But I never pressed CTRL-ALT-Fn... I just rebooted and then I see a login promt in textmode. I will however try to press ALT-F9 when I get home though.
 
Did you perhaps modify /etc/ttys to enable X? Some parts may have been started without realizing it. After booting and logging in (on the console) have a look with ps -ax. Specifically look for X processes.
 
Yes, I modfied that file before to have ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on , because of the handbook, but I changed it to off yesterday, and still got the message. Will try the ALT-F9 then.
 
I write this inside XFCE on my FREEBSD laptop! >( JOY!
(That was a smiley but fixing my characters might be the next misson)

The above was not the error. It was something called dbus. The above error appeared before dbus in the log, so I thought I fix that first, but now I found a quick fix for dbus on the web so I applied it, and the above error dissapeared as well.
(No I dont know what dbus is...)

Lets see whats next...
 
In simple terms, D-Bus is a software bus that allows processes to "talk" to each other. Lots of desktop-type applications use it to communicate to various bits and pieces of a Desktop Environment.
 
I would recommend not enabling it that way. Much easier to understand and configure is by enabling through /etc/rc.conf:
Code:
xdm_enable="YES"
Hmm, I also have xdm started by enabling it in /etc/ttys.
Why would it be better to set it in /etc/rc.conf?
 
I would recommend not enabling it that way. Much easier to understand and configure is by enabling through /etc/rc.conf:
Code:
xdm_enable="YES"
I've seen one or two admins/developers say that, perhaps that was you. Everywhere I looked, it said use ttys. I tried xdm_enable="YES" in rc.conf before, perhaps I did it wrong, and it didn't work.

If xdm_enable is to be used, what happens to ttyv8 in ttys, and how does that affect or interact with switching screens with ctl-alt-Fkey? What virtual terminal does this set? ttyv8 using F9 by default?

I know you're the expert, but I'm wondering the same question...

Hmm, I also have xdm started by enabling it in /etc/ttys.
Why would it be better to set it in /etc/rc.conf?
 
It should be off in ttys in that case, or else you run the risk of starting it twice. And it doesn't affect the terminal or the ALT-F9 switch in any way. Can't remember exactly which one it was but one of the scripts for Xorg makes sure it's on ttyv8.
 
Back
Top