# nuisance xterm



## winkoe (Sep 16, 2018)

uname -a: FreeBSD 11.2-RELEASE
kdm4_enable="YES" in /etc/rc.conf

When booting I get quite as I expect the KDE login screen. After entering my password an xterm is beeing displayed. When I enter "startx" there the .xinitrc gets executed (exec startkde). 

This xterm stays on the desktop after KDE is running. When I kill it KDE shuts down.

Originally this nuisance emergence of xterm did not happen. That changed after some messing about with an update.

How can I get rid of this annoying xterm?

Thank you
winkoe


----------



## Datapanic (Sep 17, 2018)

start off by posting relevant configuration files.


----------



## Minbari (Sep 17, 2018)

Did You have:

```
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login
```
before `exec startkde`  in .xintrc ? If yes then remove it.


----------



## winkoe (Sep 18, 2018)

Thank you Minbari, but no, it's only `exec startkde`.
Thank you Datapanic.
I've compared the following files with a backup from before that mishap with xterm.
These files are identical and consequently should not contain the culprit.

/usr/local/share/config/kdm/kdmrc
/usr/local/share/config/kdm/Xaccess
/usr/local/share/config/kdm/Xwilling
/usr/local/share/config/kdm/Xsetup
/usr/local/share/config/kdm/Xstartup
/usr/local/share/config/kdm/Xreset
/usr/local/share/config/kdm/Xsession
/usr/local/share/config/kdm/backgroundrc

Concerning further configuration files I'm at a loss as to which ones to dig up.

/usr/local/etc/X11/xorg.conf.d/xorg.conf

```
Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Device"
        Identifier "NVIDIA Card"
        VendorName "NVIDIA Corporation"
        Driver     "nvidia"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "MCP7A [GeForce 9400]"
        Monitor    "Monitor0"

        Subsection      "Display"
                Viewport 0 0
                Depth   24
                Modes   "1920x1080"
        EndSubSection
EndSection
```

/etc/rc.conf

```
...
sshd_enable="YES"
moused_enable="YES"
ntpd_enable="YES"
dumpdev="NO"
dbus_enable="YES"
hald_enable="YES"
kdm4_enable="YES"
linux_enable="YES"
kld_list="nvidia"
nvidia_load="YES"
flog_logfile="/var/log/pflog"
...
```

/boot/loader.conf

```
nvidia_load="YES"
kern.vty=vt
coretemp_load="YES"
```

What else?

Regards
winkoe


----------



## winkoe (Sep 18, 2018)

By the way:
in /usr/local/share/config/kdm/Xsession rather towards the end you find

```
failsafe)
    exec xterm -geometry 80x24-0-0
    ;;
```
And this is the xterm that annoys me.
A few lines before that .Xresources is mentioned. But I have and never had such a file.
If I comment said lines out I get a hang at the login screen.


----------



## SirDice (Sep 18, 2018)

If the case label is anything to go by, it really should never reach this point. Apparently something else went wrong and it falls back to a 'failsafe' condition.


----------



## winkoe (Sep 18, 2018)

I fully agree. But which file leads to Xsession?


----------



## kpa (Sep 18, 2018)

That Xsession file is used as the default if the user has no .xsession of their own. You should create a new file or modify your existing file to have just a line that runs startkde as shown in the handbook :

`echo "exec /usr/local/bin/startkde" > ~/.xsession`


----------



## SirDice (Sep 18, 2018)

After you login this xterm appears, does it have any of the window widgets? I mean close, maximize, minimize, resize, those sorts of buttons? Or is it a plain rectangular bit of screen without borders and widgets? A window without borders and widgets is usually the result of a failing window manager.


----------



## winkoe (Sep 18, 2018)

Hallo kpa. I do have that exact ~/.xsession.

Hallo SirDice. All those window control features do exist and are operative.
And intermittently cryptic messages appear like

```
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x500001a
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
```
before and after successful entry of `startx` or `startkde`.


----------



## winkoe (Sep 20, 2018)

Thank you all for your suggestions. I understand that there is no obvious answer.
I'll continue my endeavor to find the sequence leading to that telltale /usr/local/share/config/kdm/Xsession.
winkoe


----------

