Solved How to configure Slim?

equimanthorn

Member

Reaction score: 2
Messages: 20

Please how can I configure slim to choose between GUIs? I have installed Xfce, Lumina and E17 but I don't understand which files I need to modify to switch between the different GUIs. And how can I set one default session?

I found many how-tos but all are about some old versions of Slim :(
 

bart

Member

Reaction score: 31
Messages: 67

You need to have xsessions, for example:
Code:
bureau% ls /usr/local/share/xsessions/
LXDE.desktop     openbox-gnome.desktop   openbox.desktop
mate.desktop     openbox-kde.desktop
bureau%
When you are in the Login Manager, just press F1 to change between window managers.
 
OP
E

equimanthorn

Member

Reaction score: 2
Messages: 20

Hello bart,

I am at work now and I must wait to come back home this evening. I have the three .desktop files in /usr/local/share/xsessions. But when I press F1 I have only xfce in Slim. May I ask the syntax of .xinitrc?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 9,285
Messages: 33,826

The file ~/.xinitrc is a shell script.
 

bart

Member

Reaction score: 31
Messages: 67

My .xinitrc:
Code:
#!/bin/sh
export LC_ALL=fr_FR.UTF-8
export MM_CHARSET=UTF-8
export LANG=fr_FR.UTF-8
export LANGUAGE=fr_FR.UTF-8
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
export BROWSER=firefox
numlockx &
exec $1
Have you added Slim, hald and D-Bus in /etc/rc.conf?
 
OP
E

equimanthorn

Member

Reaction score: 2
Messages: 20

Many thanks bart and SirDice! Now I understand the meaning of exec $1 :beer::)

I am a total noob on FreeBSD as a desktop OS, I've always use DesktopBSD, PC-BSD (only the old 32bit versions) and GhostBSD. They are all pre-configured OS.

Can I ask how to change the WM order? I have now:
  1. Xfce
  2. Lumina
  3. E17
Xfce is the default one. Which file do I need to modify to change this order (maybe to make E17 the first WM)?

Paolo
 
Last edited by a moderator:

sidetone

Daemon

Reaction score: 544
Messages: 1,330

/usr/local/share/xsessions/*.desktop should have a minimum of these lines in it:
Code:
[Desktop Entry]
Name=Any name chosen
Exec=/usr/local/bin/*
It appears that this file replaces the home folder file .xsession
 

mdg583

Member

Reaction score: 3
Messages: 83

For anyone else who may find this useful, I made a few changes to cfg.cpp in the slim source:

Code:
57a58
>     options.insert(option("default_session",""));
293c294,295
< 
---
>     string strSessionDef = getOption("default_session");
>    
296a299
>         pair<string,string> first_session;
298c301
< 
---
>        
329c332,337
<                              sessions.push_back(session);
---
>                              if (session_name == strSessionDef){
>                                  pair<string,string> temp = sessions[0];
>                                  sessions[0] = session;
>                                  sessions.push_back(temp);
>                              } else
>                                  sessions.push_back(session);
so that I can specify a default login option in slim.conf according to the "Name" in the .desktop file:
Code:
default_session         Xfce Session
 

starche.old

New Member


Messages: 2

I need help with SLiM. I'm new to FreeBSD, although I'm on linux since 2007.

I installed xorg, nvidia and mate DE. From console I have NP to login both root and user using both:
Code:
xinit mate-desktop
and
Code:
startx
Everything fine here. Now I'm installing SLiM. I did the following in the /etc/ttys:
Code:
ttyv8  "/usr/local/bin/slim -nodaemon"  xterm  on secure
For sure I enabled dbus and hald in /etc/rc.conf. I added this:
Code:
dbus_enable="YES"
hald_enable="YES"
moused_enable="YES"
I ran command ((as root) to add mate-session to .xinitrc:
Code:
echo "exec /usr/local/bin/mate-session" > ~/.xinitrc
Then I copied .xinitrc to /usr/home/user. I also did that to user's .xinitrc:
Code:
chmod 755 .xinitrc
chown q .xinitrc

Looks fine, right? I have NP to login as root, but for user it gives me:
"Could not connect to session bus; Failed to connect to socket /tmp/dbus-.......: Connection refused".
Nothing interesting in /var/log/slim.log

While I'M OK as root, looks I have permission issues somewhere.
What I need to fix in order to be able to login as user?

I tried to install gdm, but that one even worse... And that's aside of 400MB of unwanted gnome3 stuff.
 

starche.old

New Member


Messages: 2

update 1 - solved.

After monkeying around for a day, I decided to disable SLiM in /etc/ttys and enable it in /etc/rc.conf and voila - I'm logged in as user.

Interesting... I guess there is a bug with SLiM and dbus when activated via /etc/ttys.

Now I've got another thing to do - to be able to select sessions (like cinnamon, mate, etc.) in SLiM, but that's completely different story :)

Thank you.
 

ILUXA

Aspiring Daemon

Reaction score: 528
Messages: 742

How to configure x11/slim to work with x11/gnome-shell 3.18 --
1. gnome_enable must be removed because it starts x11/gdm

/etc/rc.conf:
Code:
   dbus_enable="YES"
   hald_enable="YES"
 - gnome_enable="YES"
 - gdm_enable="YES"
 + slim_enable="YES"
2. start x11/xscreensaver daemon to enable screensaver and display power management (configure your screensaver settings with xscreensaver-demo)

~/.xinitrc:
Code:
#!/bin/sh
xscreensaver -nosplash &
exec $1
But x11/gdm must be installed -- gdm won't start with gnome-shell, but x11/gnome-shell won't start without installed gdm package.
_____________________________________________________________
Have not found more appropriate topic,
here is my x11/slim login manager theme, maybe someone will like it ;)
1.png 2.png
To use it, copy "bsd-logo" folder from archive to /usr/local/share/slim/themes and edit /usr/local/etc/slim.conf:
Code:
current_theme       bsd-logo
+ :D (funny-logo.zip)
3.png

Logos were found on the web.
 

Attachments

Last edited:

ILUXA

Aspiring Daemon

Reaction score: 528
Messages: 742

Here is few x11/slim themes, which I'm using now.
First theme is simple theme with FreeBSD logo, it shows "@" when
you need to type your login and "#" when you need to type your password.
I'm using it on my FreeBSD machine.
fbsd1.pngfbsd2.png

Second one is with different colors and with logo, which I've posted in wallpapers topic yesterday.
It also uses "@" and "#" symbols. I'm using it with my Devuan laptop.
horus1.pnghorus2.png

To install it, just copy "fbsd-logo" or "horus" directory from archive to /usr/local/share/slim/themes, then edit /usr/local/etc/slim.conf and change "current_theme" to "fbsd-logo" or "horus".
 

Attachments

Top