# Fluxbox not fullscreen



## Haines (Aug 29, 2016)

I'm a Debian user brand new to FreeBSD. I installed FreeBSD as a workstation, and so the first thing I did was to install xorg and fluxbox binaries.

When user does `startx`, fluxbox does start, but it does not occupy the full screen. An inch or so margins on all sides. I could change the Fluxbox style to Twice, but there does not seem to be a ~/.fluxbox directory. There is no frame at the top of the fluxbox window (forget what it's called) as there is, for example, for xterm and along the window's bottom. 

Searched the forum, but found no answer. Sounds like an xorg misconfiguration.


----------



## Snurg (Aug 29, 2016)

You can display some information about the graphics resolution via

```
% xprop -display $DISPLAY -root
<snip>
_NET_WORKAREA(CARDINAL) = 0, 0, 1920, 1200, 0, 0, 1920, 1200, 0, 0, 1920, 1200, 0, 0, 1920, 1200
<snip>
%
```
If the resolution displayed there is different from your monitor's native resolution, then DPMS does not work correctly and you may need to set up a xorg.conf file with a manual modeline like this:

```
Section "Screen"
  Identifier  "Screen0"
  Device  "Device0"
  Monitor  "Monitor0"
  DefaultDepth  24
  SubSection  "Display"
    Depth  24
    Modes  "1920x1200"
  EndSubSection
EndSection
```


----------



## shepper (Aug 29, 2016)

Also see xrandr(1)


----------



## Haines (Aug 29, 2016)

Snurg, I suspected the configuration was off. I check the specs on my monitor and it is 1920x1080.

I ran the xprop utility and it returned:

```
NET_WORKAREA(CARDINAL) = 0,O, 1280, 1002...
```
So I create a file: /etc/X11/xorg.d/xorg.conf. In it I simply have:

```
Section "Screen"
    Identifier  "Screen0"
    Device  "Device0"
    Monitor  "Monitor0"
    DefaultDepth  24
    SubSection  "Display"
      Depth  24
      Modes  "1920x1080"
    EndSubSection
 EndSection
```
I save, log in as user, `startx`, but nothing has changed.


----------



## Snurg (Aug 30, 2016)

Haines, this was only the fragment of a xorg.conf around the modeline (to show how it's correctly placed in the "Screen" section).
I have added complete xorg.conf below that you can use as template.
The entries in the "Device" section are for NVIDIA proprietary driver. If you use free NV driver you need to replace "nvidia" with "nv". If you use other graphics card, try "vesa".

```
Section "ServerFlags"  
  Option "DontZap" "false"  
EndSection  
  
Section "InputClass"  
  Identifier  "Keyboard Defaults"  
  MatchIsKeyboard "yes"  
  Option  "XKbOptions" "terminate:ctrl_alt_bksp"  
EndSection  
  
Section "ServerLayout"  
  Identifier  "Layout0"  
  Screen  0  "Screen0"  
  InputDevice  "Keyboard0" "CoreKeyboard"  
  InputDevice  "Mouse0" "CorePointer"  
EndSection  
  
Section "InputDevice"  
  Identifier  "Mouse0"  
  Driver  "mouse"  
  Option  "Protocol" "auto"  
  Option  "Device" "/dev/sysmouse"  
  Option  "Emulate3Buttons" "no"  
  Option  "ZAxisMapping" "4 5"  
EndSection  

Section "InputDevice"
  Identifier  "Keyboard0"
  Driver  "keyboard"
EndSection

Section "Monitor"
  Identifier  "Monitor0"
  VendorName  "Unknown"
  ModelName  "Unknown"
  HorizSync  28.0 - 33.0
  VertRefresh  43.0 - 72.0
#  Option  "DPMS"
EndSection

Section "Device"
  Identifier  "Device0"
# you may need to change the next entry according to your graphics card:
  Driver  "nvidia"
  VendorName  "NVIDIA Corporation"
EndSection

Section "Screen"
  Identifier  "Screen0"
  Device  "Device0"
  Monitor  "Monitor0"
  DefaultDepth  24
  SubSection  "Display"
  Depth  24
  Modes  "1920x1080"
  EndSubSection
EndSection
```


----------



## shepper (Aug 30, 2016)

> /etc/X11/xorg.d/xorg.conf



Unless this is a typo, this file will not be read.  The legacy file location was /etc/X11/xorg.conf.

The newer, preferred location is /etc/X11/xorg.conf.d/.

The newer location accepts "snipets" of, say the "Screen" section of the complete xorg.conf.

The advantage of using xorg.conf.d is that it only modifies the given section.

See the Xorg Arch Linux Wiki for more details.


----------



## Haines (Aug 30, 2016)

Shepper, thanks. My only experience with X system configuration goes back many years to XFree86, and so took some time with Xorg.archive and with FreeBSD manual. I'll construct a config file, but before
that I need to deal with some other issues. Although "haines" is in wheel group, my su command returns "su: Sorry. BAD SU haines to root on /dev/ttyv0". Also dmesg informs me the USB key to which I had copied 
snurg's template disconnects ("ugen3.2: <Kingston> at usbus3 (disconnects), even though I setup automount. When I resolve these problems, I'll try the configuration file and report back to this thread.


----------



## SirDice (Aug 30, 2016)

Haines said:


> Although "haines" is in wheel group, my su command returns "su: Sorry. BAD SU haines to root on /dev/ttyv0"


That means you're not typing the correct password. Note for su(1) you need to enter root's password, for sudo(8) you need to type _your_ password. Subtle difference


----------



## Haines (Aug 31, 2016)

Thanks, SirDice, but the problem was that I was not prompted for the password. I'm used to seeing this:

```
$ su
  password:
```
but I am getting:

```
$ su
  su: Sorry
  Aug 30 12:27:14 bach su: BAD SU haines to root on /dev/ttyv0
```
(bach is machine name; haines is account name)

The only configuration I did was to put the haines  ALL=(ALL:ALL) ALL line into sudoers and put haines into wheel group.

Not a show stopper because I should be using sudo, which does work.


----------



## Haines (Aug 31, 2016)

I much appreciate the help I've been getting, but it is taking too much time from work, and I'll have to put the 
configuration of FreeBSD aside for a while. I created a xorg.conf file that specified nv as the video driver. Unfortunately, 
it was incompatible with my graphics card (EGVA 512-P3-N871-AR GeForce 9800 GTX+) and the X Windows system 
wouldn't load. ("NV: Ignoring unsupported device ... [GT218 GeForce 8400 GS]), even though it says that the nv 
driver supports GeForce 9800 GTX+. I tried the vesa driver, and that did work, although at low resolution. In the log
the VESA driver says "not using built-in mode "1920x1080 (no mode of this name)" The other problem was that my 
display remained less than full screen with the vesa driver, and so specifying Modes "1920x1080" in screen section 
of the configuration (the resolution of my Samsung S23C350) had no effect. When time allows, I'll pursue these two 
issues. It looks like I'll have to compile the nvidia driver or another version of the nv driver.


----------



## SirDice (Sep 1, 2016)

Haines said:


> The only configuration I did was to put the haines ALL=(ALL:ALL) ALL line into sudoers and put haines into wheel group.


Note that the sudoers file is only used by sudo(8), it's not used by su(1). There's no relation between those two utilities. 

After you added your user to the wheel group did you log off and back on again? Group membership is only applied when logging in, it's not dynamic.


----------



## Haines (Sep 1, 2016)

The X server runs if I have no xorg.conf file or if the config file specifies vesa as the driver, but it crashes with the nv driver. Apparently the FreeBSD's default driver is not nv. The log suggests the nv driver not compatible with my ancient graphics card, MSI NX 8500GT. The GeForce driver selection utility no help. There are some inexpensive EVGA GeForce 9500 GT cards out there, and the simplest way to solve my problems might simply be to swap one in.


----------



## SirDice (Sep 1, 2016)

The NVidia 8500GT should be supported by x11/nvidia-driver-340. The same driver also supports the 9500GT.


----------



## Snurg (Sep 1, 2016)

You might then want to try the nvidia driver for legacy  cards.
`cd /usr/ports/x11/nvidia-driver-304/ && make install clean`


----------



## Haines (Sep 2, 2016)

I stumble about encountering one problem after another. I tried to install nvidia-driver-304 and got error that kernel source files must be located in /usr/src. After installing them 
I cd to /usr/ports/x11/nvidia-driver-304 and do `make install clean`. This produces error: No address record. I try 

```
# wget [URL]ftp://freebsd.org/pub/FreeBSD/releases/i386/10.3-RELEASE/src.tvz[/URL]. : Connection refused
  # wget [URL]http://distchache.FreeBSD.org/ports-distfiles/NVIDIA-FreeBSD-x86_64-304.128.tar.gz[/URL] : Unable to resolve address.
```
Nevertheless, I downloaded the tarball from this address on another machine .


----------



## SirDice (Sep 2, 2016)

"No address record" means DNS resolving isn't working. Check your /etc/resolv.conf and make sure it contains a DNS server that works.


----------



## Haines (Sep 2, 2016)

Thanks, SirDice. My resolv.conf seem OK. There is a search for my service provider and the IP address of my router DNS server. There is no domain name line 
for my service provider. I now add it, but I doubt it will make any difference. I now try to install conkeror, but have same problem. Because I had already installed 
sudo and wget successfully, I had no reason to doubt my connection.


----------



## SirDice (Sep 2, 2016)

Sounds like the DNS forwarding on your router is a bit dodgy. Try setting the DNS settings to 8.8.8.8 (Google's DNS server) and see if that improves things. Both domain and search shouldn't have an impact on things. Those settings are primarily used when you try to resolve a single hostname (myhost), they have no effect on fully qualified names (myhost.example.com).


----------

