# GDM Login Help



## markbsd (Nov 8, 2013)

I've installed Xfce4 and GDM. My rc.conf file is properly configured with:


```
gdm_enable="YES"
```

Upon boot, the GDM login screen appears, I log in, but it boots into GNOME 2. This is a brand new install. I have only installed Xorg, Xfce4 and GDM. I don't want to load up GNOME, I don't even want GNOME on my system. How do I change this so GDM loads into Xfce4? Thanks


----------



## SirDice (Nov 8, 2013)

You need to create a ~/.xinitrc containing:

```
exec /usr/local/bin/startxfce4
```


----------



## markbsd (Nov 8, 2013)

@SirDice, whoops. I had .xinitrc but without exec at the beginning of the line 

Thanks!


----------



## markbsd (Nov 8, 2013)

No good. Still loads GNOME!


----------



## cpm@ (Nov 8, 2013)

Have you read the Xfce FAQ?


----------



## markbsd (Nov 8, 2013)

A few times this week.


----------



## trh411 (Nov 8, 2013)

markbsd said:
			
		

> No good. Still loads GNOME!



By any chance do you have 
	
	



```
gnome_enable="YES"
```
 in /etc/rc.conf?


----------



## markbsd (Nov 9, 2013)

trh411 said:
			
		

> By any chance do you have
> 
> 
> 
> ...



No -- just gdm.

I've ~/.xinitrc and /usr/local/etc/gdm/Sessions/Xfce.desktop configured as per the Handbook and Xfce Wiki. Xfce4 starts with `startx`. But, system boot loads GDM which then loads up Gnome upon login! I never even installed Gnome, I have no idea how it's even on my system.

Any idea what the problem might be?


----------



## cpm@ (Nov 9, 2013)

That's very weird :\

Note that 
	
	



```
Exec=/usr/local/bin/startxfce4
```
 tells x11/gdm to use your regular .xinitrc file to set up the session, just like it would if you used `startx` 

Show your Xfce.desktop file.


----------



## markbsd (Nov 9, 2013)

```
% [cmd]cat /usr/local/etc/gdm/Sessions/Xfce.desktop[/cmd]
[Desktop Entry]
  Encoding=UTF-8
  Name=Xfce4
  Comment=Use this session to run Xfce 4.4 as your desktop environment
  Exec=/usr/local/bin/startxfce4
  Icon=/usr/local/share/pixmaps/xfce4_xicon1.png
  Type=Application
```


```
% [cmd]cat .xinitrc[/cmd]
exec /usr/local/bin/startxfce4
```

`startx` works fine. It is very weird that Gnome loads from GDM when I haven't even installed Gnome! Lol

Any suggestions would be greatly appreciated


----------



## markbsd (Nov 9, 2013)

Maybe I should `mv` /usr/local/etc/gdm/Sessions/Xfce.desktop to /usr/local/etc/X11/Xfce.desktop?


----------



## cpm@ (Nov 9, 2013)

markbsd said:
			
		

> Maybe I should `mv` /usr/local/etc/gdm/Sessions/Xfce.desktop to /usr/local/etc/X11/Xfce.desktop?



Don't do that. Try to create Xfce.desktop at the /usr/local/share/xsessions directory. Remember that you have to restart gdm after you created the file.


----------



## markbsd (Nov 9, 2013)

I've already got an xfce.desktop file in there (I didn't know). It has lots of (weird) lines in it:


```
[Desktop Entry]
Version=1.0
Name=Xfce Session
Name[ar]=ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½
Name[bg]=Xfce ï¿½^ï¿½ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½^ï¿½
Name[ca]=Sessiï¿½ï¿½ Xfce
Name[cs]=Relace prostï¿½^ï¿½edï¿½ï¿½ Xfce
Name[da]=Session til Xfce
Name[de]=Xfce-Sitzung
Name[el]=ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½ï¿½ Xfce
Name[en_GB]=Xfce Session
Name[es]=Sesiï¿½ï¿½n de Xfce
Name[eu]=Xfce saioa
Name[fi]=Xfce-istunto
Name[fr]=Session Xfce
Name[gl]=Sesiï¿½ï¿½n de Xfce
Name[hr]=Xfce sesija
Name[hu]=Xfce munkamenet
Name[id]=Sesi Xfce

<snip>

Comment=Use this session to run Xfce as your desktop environment
Comment[ar]=ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½^ï¿½ï¿½^ï¿½ ï¿½^ï¿½ï¿½ï¿½ï¿½^ï¿½ ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½^ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½^ï¿½ï¿½^ï¿½ ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ ï¿½^ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½^ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½ï¿½
Comment[bg]=ï¿½^ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ ï¿½^ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½^ï¿½ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½^ï¿½ ï¿½ï¿½ï¿½ï¿½ ï¿½^ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½^ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ Xfce ï¿½ï¿½ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½^ï¿½ï¿½^ï¿½ï¿½ï¿½ï¿½ï¿½$
Comment[ca]=Empra aquesta sessiï¿½ï¿½ per executar l'Xfce com el vostre entorn d'escriptori
Comment[cs]=Pouï¿½ï¿½ï¿½ï¿½t tuto relaci ke spuï¿½ï¿½tï¿½^ï¿½nï¿½ï¿½ Xfce jako vaï¿½ï¿½eho pracovnï¿½ï¿½ho prostï¿½^ï¿½edï¿½ï¿½
Comment[da]=Brug denne session til at kï¿½ï¿½re Xfce som dit skrivebord
Comment[de]=Wï¿½ï¿½hlen Sie diese Sitzung, um Xfce als Ihre Arbeitsumgebung auszufï¿½ï¿½hren

<snip>

Exec=startxfce4
Icon=
Type=Application
```

Looks like you might be onto something! I'll just add the lines from my other xfce.desktop to this weird looking file and see what happens


----------



## markbsd (Nov 9, 2013)

cpm said:
			
		

> Don't do that. Try to create Xfce.desktop at the /usr/local/share/xsessions directory. Remember that you have to restart gdm after you created the file.



Thanks!


```
/usr/local/share/xsessions % ls
.                     ..                    gnome.desktop         xfce.desktop          xfce.desktop.original
```

Do I need to `gdm restart` before rebooting?


----------



## cpm@ (Nov 9, 2013)

Well, just restart gdm


----------



## markbsd (Nov 9, 2013)

@cpm, you're a legend! It worked 

Now, I just need to change that ugly GDM login screen! How is it that I have GNOME on my system though? Can I `pkg remove gnome` without suffering any problems?


----------



## cpm@ (Nov 10, 2013)

Yes, you can remove it by running `pkg delete gnome2`. Anyway, GDM is an option included on x11-wm/xfce4.


```
[CMD]% cd /usr/ports/x11-wm/xfce4 && make pretty-print-config[/CMD]
+APPFINDER -GDM +ICONS -MIXER +MOUSEPAD +NOTIFY +ORAGE -PRINT -SQUEEZE +TERMINAL -XPM
```

According to pkg/FAQ:



> If you forcibly delete a package it's assumed you understand that you know you're doing something that can break your system. pkg check will detect missing dependency packages and reinstall as required.



Read more details about PKGNG:

http://www.freebsd.org/doc/handbook/pkgng-intro.html.
https://wiki.freebsd.org/pkgng.

Regarding to change your gdm theme, see here.


----------



## markbsd (Nov 10, 2013)

So, if I mess up and delete dependencies I can always just `pkg check` and it will reinstall missing dependencies? Nice!

Thanks, ./">cpm[/user. You're a really great help! Sometimes *nix communities have condescending, conceited and obnoxious people, which makes encounters with generous and helpful people all the more pleasant! Thank you


----------

