I'm trying to find a decent display manager like wdm, but not as outdated, and not as time consuming to configure as xdm. SLiM seemed to be the best choice. Of course gdm is the default on Gnome and Xfce.
Whenever GDM is removed (or maybe changed to another default one too--I'm not sure yet), permissions of the normal user(s), not the root user, are denied on specific occasions and for specific things. NetworkManager and other daemons do not work. Also, I had to explicitly use gksu(do) because privilages aren't invoked. Finally, when I log out, and recieve the logout prompt, I cannot hibernate, suspend, reboot, or shutdown. I could only logout. I'm using the Xfce version, but I thought that would apply to the Gnome version too.
So I just install SLiM, xdm or whatever next to gdm; it works fine. I was wondering if I can do this without gdm and just use getty and not gdm as my backup user login.
What I would really like to see is a highly customizable ncurses display manager. Especially since I would just use a black background. I'm not sure if one exists.
Yes, slim is available in the Debian repositories. It's good for what it is. I just prefer the dropdown menu of WINGs for changing sessions.
Well, if an ncurses one does not exist, maybe I will just have to make one
Using a separate Display Manager
Forum rules
LMDE 2 has reached end of support as of 1-1-2019
LMDE 2 has reached end of support as of 1-1-2019
Using a separate Display Manager
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Using a separate Display Manager
I run Slim and Compiz as a stand alone window manager (but still have to run bits of Gnome or XFCE to get things to work along with some hacked scripts to halt/suspend etc).
So I hacked the slim.conf file (slightly):
Then created a .xinitrc:
Which runs:
The quickest way to swap from SliM to gdm3 is to edit this file from recovery/safe mode (or whatever it is called):
slim = /usr/bin/slim
gdm3 = /usr/sbin/gdm3
Just change the line.
Going to post this, will continue the post in a bit!
Steve
So I hacked the slim.conf file (slightly):
Code: Select all
# Path, X server and arguments (if needed)
# Note: -xauth $authfile is automatically appended
default_path /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
default_xserver /usr/bin/X11/X
xserver_arguments -nolisten tcp
# Commands for halt, login, etc.
halt_cmd /sbin/shutdown -h now
reboot_cmd /sbin/shutdown -r now
console_cmd /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue.net; exec /bin/login"
suspend_cmd sudo /usr/sbin/pm-suspend
# Full path to the xauth binary
xauth_path /usr/bin/X11/xauth
# Xauth file for server
authfile /var/run/slim.auth
# Activate numlock when slim starts. Valid values: on|off
# numlock on
# Hide the mouse cursor (note: does not work with some WMs).
# Valid values: true|false
# hidecursor false
# This command is executed after a succesful login.
# you can place the %session and %theme variables
# to handle launching of specific commands in .xinitrc
# depending of chosen session and slim theme
#
# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
login_cmd exec /bin/sh - ~/.xinitrc %session
#login_cmd exec /bin/bash -login /etc/X11/Xsession %session
# Commands executed when starting and exiting a session.
# They can be used for registering a X11 session with
# sessreg. You can use the %user variable
#
# sessionstart_cmd some command
# sessionstop_cmd some command
# Start in daemon mode. Valid values: yes | no
# Note that this can be overriden by the command line
# options "-d" and "-nodaemon"
# daemon yes
# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
sessions default,Fusion,startxfce4,openbox,ion3,icewm,wmaker,blackbox,awesome
# Executed when pressing F11 (requires imagemagick)
screenshot_cmd scrot /root/slim.png
# welcome message. Available variables: %host, %domain
welcome_msg Welcome to %host
# Session message. Prepended to the session name when pressing F1
# session_msg Session:
# shutdown / reboot messages
shutdown_msg The system is halting...
reboot_msg The system is rebooting...
# default user, leave blank or remove this line
# for avoid pre-loading the username.
#default_user simone
# Focus the password field on start when default_user is set
# Set to "yes" to enable this feature
#focus_password no
# Automatically login the default user (without entering
# the password. Set to "yes" to enable this feature
#auto_login no
# current theme, use comma separated list to specify a set to
# randomly choose from
current_theme debian-spacefun
# Lock file
lockfile /var/run/slim.lock
# Log file
logfile /var/log/slim.log
Code: Select all
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#
exec ck-launch-session /usr/local/bin/start-fusion.sh
Code: Select all
#!/bin/bash
#dbus
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
eval `dbus-launch --sh-syntax --exit-with-session`
fi
sudo umount ~/.gvfs &
killall knotify4 &
cp -f /usr/bin/avant-window-navigator /usr/bin/awn &
#############
## Tidy up ##
#############
rm -rf /home/molly/Downloads/*.torrent &
## Compiz + AWN
compiz --replace ccp &
emerald &
(sleep 10 && avant-window-navigator) &
## Wireless / Network
#nm-applet &
wicd-client &
#Sound
# Add your user to audio group
## Utils
yakuake &
parcellite &
autokey-gtk &
setxkbmap -option terminate:ctrl_alt_bksp &
/usr/bin/bluetooth-applet &
shutter --min_at_startup &
pino &
## Screenlets
python -u /home/molly/.screenlets/FolderView/FolderViewScreenlet.py &
python -u /usr/share/screenlets/screenlets-pack-all/Gmail/GmailScreenlet.py &
python -u /usr/share/screenlets/screenlets-pack-all/ClearWeather/ClearWeatherScreenlet.py &
/home/molly/scripts/checkgmail.pl &
##Screensaver
xscreensaver &
## Online Storage
dropbox start -i &
SpiderOak &
## Appearance/Power/Volume
gnome-power-manager &
#xfce4-power-manager &
gnome-settings-daemon &
gnome-volume-control-applet &
## Mint proggies
/usr/bin/mintupdate-launcher &
/usr/lib/linuxmint/mintUpload/launch-file-uploader.py &
#Truecrypt
#(sleep 25 && truecrypt) &
fusion-icon
Code: Select all
sudo nano /etc/X11/default-display-manager
gdm3 = /usr/sbin/gdm3
Just change the line.
Going to post this, will continue the post in a bit!
Steve
Re: Using a separate Display Manager
I also had to add my user to a lot of groups (audio, bluetooth and some others), but do not add your user to the sudo group - it breaks everything.
I also had to edit:
and play around with it until I stopped getting strange errors with Thunar.
I also found and hacked this script to shutdown/logout/reboot:
Can't remember where I got it. Most of the rest of this was gleaned from the wiki's or forums of Arch/Gentoo and mainly Crunchbang.
So if you play around, you can probably get XFCE to run from Slim
HTH
Steve
:Edit: the command to start XFCE is startxfce4.
I also had to edit:
Code: Select all
sudo gedit /usr/share/polkit-1/actions/org.freedesktop.udisks.policy
I also found and hacked this script to shutdown/logout/reboot:
Code: Select all
#!/usr/bin/env python
import pygtk
pygtk.require('2.0')
import gtk
import os
class DoTheLogOut:
# Cancel/exit
def delete_event(self, widget, event, data=None):
gtk.main_quit()
return False
def onkeypress(self, widget, event):
if event.keyval == gtk.keysyms.Escape:
gtk.main_quit()
return False
def lost_focus(self, widget, event):
if self.focus_check:
gtk.main_quit()
return False
# Logout
def logout(self, widget):
#os.system("skill -TERM $DESKTOP_SESSION")
os.system("skill -TERM start-fusion.sh")
# Reboot
def reboot(self, widget):
os.system("sudo shutdown -r now")
# Shutdown
def shutdown(self, widget):
os.system("/home/molly/projects/Pascal/shutdown/shutdown")
def __init__(self):
# Create a new window
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.set_title("Exit? Choose an option:")
self.window.set_resizable(False)
self.window.set_position(1)
self.window.connect("delete_event", self.delete_event)
self.window.set_border_width(20)
# Create a box to pack widgets into
self.box1 = gtk.HBox(False, 0)
self.window.add(self.box1)
# Create cancel button
self.button1 = gtk.Button("_Cancel")
self.button1.set_border_width(10)
self.button1.connect("clicked", self.delete_event, "Changed me mind :)")
self.box1.pack_start(self.button1, True, True, 0)
self.button1.show()
# Create logout button
self.button2 = gtk.Button("_Log out")
self.button2.set_border_width(10)
self.button2.connect("clicked", self.logout)
self.box1.pack_start(self.button2, True, True, 0)
self.button2.show()
# Create reboot button
self.button3 = gtk.Button("_Reboot")
self.button3.set_border_width(10)
self.button3.connect("clicked", self.reboot)
self.box1.pack_start(self.button3, True, True, 0)
self.button3.show()
# Create shutdown button
self.button4 = gtk.Button("_Shutdown")
self.button4.set_border_width(10)
self.button4.connect("clicked", self.shutdown)
self.box1.pack_start(self.button4, True, True, 0)
self.button4.show()
self.focus_check = True
self.window.connect("focus-out-event", self.lost_focus)
self.window.connect("key-press-event", self.onkeypress)
self.box1.show()
self.window.show()
def main():
gtk.main()
if __name__ == "__main__":
gogogo = DoTheLogOut()
main()
So if you play around, you can probably get XFCE to run from Slim
HTH
Steve
:Edit: the command to start XFCE is startxfce4.