# Xorg-server and Fluxbox



## markfisher (Sep 6, 2011)

Hi

I'm using FreeBSD 8.2 and recently I installed 

```
xorg-server 1.7.7_2,1 
xinit 1.2.0_1
fluxbox 1.3.1
xauth 1.0.5
```

my /etc/rc.conf

```
...
hald_enable="YES"
dbus_enable="YES"
```

Under /root, I created .xinitrc (*touch .xinitrc*):

```
exec fluxbox
```

My /etc/X11/xorg.conf -> Generated by *Xorg -config xorg.conf.new -retro*:

```
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/local/lib/xorg/modules"
	FontPath     "/usr/local/lib/X11/fonts/misc/"
	FontPath     "/usr/local/lib/X11/fonts/TTF/"
	FontPath     "/usr/local/lib/X11/fonts/OTF"
	FontPath     "/usr/local/lib/X11/fonts/Type1/"
	FontPath     "/usr/local/lib/X11/fonts/100dpi/"
	FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
	Load  "extmod"
	Load  "record"
	Load  "dbe"
	Load  "glx"
	Load  "dri"
	Load  "dri2"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/sysmouse"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	#DisplaySize	 2550  2550	# mm
	Identifier   "Monitor0"
	VendorName   "GSM"
	ModelName    "4357"
	Option	    "DPMS"
EndSection

Section "Device"
	Identifier  "Card0"
	Driver      "radeon"
	VendorName  "ATI Technologies Inc"
	BoardName   "RV380 [Radeon X600 (PCIE)]"
	BusID       "PCI:5:0:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection
```

Xorg log file: Please look at the attachment.

Now when I type *startx* I get the black screen and then it goes back to terminal after 1 or 2 seconds.

Any idea why that happens?


--
Mark


----------



## wblock@ (Sep 6, 2011)

Your attachment is some sort of magic Mac file inside a zip archive, hidden with a leading dot inside a __MACOSX directory.  Please post the plain text log file on pastebin.com instead.


----------



## markfisher (Sep 6, 2011)

Hi

Yes, I used mac too zip it.

Here is the link:
http://pastebin.com/embed_js.php?i=1Bz1wXS8


Thanks

--
Mark


----------



## adamk (Sep 6, 2011)

Try running:

[cmd=""]xinit /usr/local/bin/xterm[/cmd]

(Or course, make sure xterm is installed first).

If that works, then the problem isn't that X isn't starting.  Then try running this from inside the xterm:

[cmd=""]fluxbox[/cmd]

Adam


----------



## wblock@ (Sep 6, 2011)

Nothing really jumps out.  A more technically correct version of .xinitrc:

```
#!/bin/sh
exec /usr/local/bin/fluxbox
```

Adding

```
Option         "AutoAddDevices" "Off"
```
to the ServerLayout section of xorg.conf will make hal unnecessary.


----------



## markfisher (Sep 6, 2011)

@adamk
I tried

```
xinit /usr/local/bin/xterm
```
and xterm showed up but I can't type anything. Any idea?

@wblock
I did what you said and still not working. Screen goes black for second or two and comes back to terminal. Maybe this helps: I don't have .xsession and I'm running *startx* under root and .xinitrc is in root folder.

Any other suggestion?

Thanks

--
Mark


----------



## wblock@ (Sep 6, 2011)

Delete /root/.xinitrc and see if startx(1) gives the standard twm(1) screen.


----------



## markfisher (Sep 6, 2011)

Yes *startx* gives me standard twm screen, mouse doesn't work but keyboard is working.

--
Mark


----------



## wblock@ (Sep 6, 2011)

If the mouse is attached to a PS/2 port, modify /etc/rc.conf:

```
moused_enable="YES"
```

And then start it for the first time:
`# service moused start`


----------



## markfisher (Sep 6, 2011)

Thanks for quick reply

I did

```
service moused start
```
gives me an error

```
unable to open /dev/psm0: no such a file or directory
```

I checked my kernel config file and I do have

```
device psm
```

I checked the /dev and psm device is not there. You think maybe because of that fluxbox didn't start?

BTW, I'm using KVM switch with PS/2 mouse and keyboard.

--
Mark


----------



## wblock@ (Sep 6, 2011)

KVMs can make things weird, but it's been a long time since I tried a PS/2 mouse.  With the KVM connected to that machine, restart it and see if moused is running.
`# pgrep -l moused`

A missing mouse driver shouldn't have kept fluxbox from starting, but one thing at a time.


----------



## wblock@ (Sep 6, 2011)

Also, when moused(8) is running, there should be a mouse pointer in the text-mode console.


----------



## ChalkBored (Sep 6, 2011)

```
(WW) The directory "/usr/local/lib/X11/fonts/misc/" does not exist.
(WW) The directory "/usr/local/lib/X11/fonts/TTF/" does not exist.
(WW) The directory "/usr/local/lib/X11/fonts/OTF" does not exist.
(WW) The directory "/usr/local/lib/X11/fonts/Type1/" does not exist.
(WW) The directory "/usr/local/lib/X11/fonts/100dpi/" does not exist.
(WW) The directory "/usr/local/lib/X11/fonts/75dpi/" does not exist.
(WW) The directory "/usr/local/lib/X11/fonts/misc/" does not exist.
(WW) The directory "/usr/local/lib/X11/fonts/TTF/" does not exist.
(WW) The directory "/usr/local/lib/X11/fonts/OTF" does not exist.
(WW) The directory "/usr/local/lib/X11/fonts/Type1/" does not exist.
(WW) The directory "/usr/local/lib/X11/fonts/100dpi/" does not exist.
(WW) The directory "/usr/local/lib/X11/fonts/75dpi/" does not exist.
```

install xorg-fonts


----------



## wblock@ (Sep 6, 2011)

ChalkBored said:
			
		

> install xorg-fonts



Come to think of it, those should have been installed by the xorg port.

Aha, it was only pieces of the xorg port, from the first thing in post #1.  markfisher, please install x11/xorg, or at least x11/xorg-minimal before continuing.


----------



## markfisher (Sep 7, 2011)

Ok, I got the mouse working with KVM switch.
I had to build my kernel again
http://lists.freebsd.org/pipermail/freebsd-bugs/2008-November/033136.html

As far as I know, X11 fonts are not necessary (Correct me if I'm wrong). I installed xorg-server not xorg. Now I can get into twm and mouse and keyboard are working.

Now the reason I installed xorg-server is because I'm trying to have minimal setup (Also experimenting).

Any idea?

--
Mark


----------



## wblock@ (Sep 7, 2011)

markfisher said:
			
		

> Ok, I got the mouse working with KVM switch.
> I had to build my kernel again
> http://lists.freebsd.org/pipermail/freebsd-bugs/2008-November/033136.html
> 
> As far as I know, X11 fonts are not necessary (Correct me if I'm wrong). I installed xorg-server not xorg. Now I can get into twm and mouse and keyboard are working.



Now fluxbox from .xinitrc should work.  Well, might work if no other parts of xorg are needed.



> Now the reason I installed xorg-server is because I'm trying to have minimal setup (Also experimenting).



x11/xorg-minimal is minimal yet we still see people having problems because it's too minimal.  Try it.



> Any idea?



On what?


----------



## shaman (Jan 6, 2012)

My idea:


```
#cd /usr/ports/x11/xorg && make install clean BATCH=1 && pkg_add -rv fluxbox 
#echo 'hald_enable="YES"' >> /etc/rc.conf
#echo 'dbus_enable="YES"' >> /etc/rc.conf 
#su -l user
$echo "exec fluxbox" > .xinitrc
```

good luck


----------



## MarcoB (Jan 7, 2012)

Isn't fluxbox supposed to be started in .xinitrc with: 
	
	



```
/usr/local/bin/startfluxbox
```
?


----------



## ChalkBored (Jan 12, 2012)

MarcoB said:
			
		

> Isn't fluxbox supposed to be started in .xinitrc with:
> 
> 
> 
> ...



Only if you want to run the ~/.fluxbox/startup script.
It does the same thing as .xinitrc, but only does stuff when you start Fluxbox.


----------

