Лична страницата на Крум Лозев. Блог, снимки, мисли
Kik's web blog
"It's not that we gotta do what we do
It's what we know, so to me it ain't nuttin but bein true..."
-- DMX "The Rain"
Unlike KDE and [GNOME], Xfce does not have a native session manager, so decided to try the native one for X server - XDM. It is no problem one uses KDM or GDM, bur they will be slower and uselessly RAM 'eating' (especially KDM which loads several QT libs on it`s start up). XDM is much more simple but still customizable that the two mentioned above. It appears as two inputs - one for user name and one for password and nothing more. Themeing is simple and here is what I did to my login screen:
Enable XDM
To enable the XDM (or other *DM in general) edit the following line in /etc/inittab. Set the runlevel to 4 (display manager)
# Default runlevel. (Do not set to 0 or 6) id:4:initdefault:
This will invoke a Display Manager. Unfortunately the XDM does not start Xfce as default, so you need to tell the X which session to load. Do the following:
echo "/etc/X11/xinit/xinitrc.xfce">~/.xsession
Now one final touch to the /etc/X11/xdm/Xsession file - uncomment the following lines to execute ~/.xsession before first. Note that there is a CASE "$1" which expects a xdm choice for the session to be given; it must not be executed. if [ -x $HOME/.xsession ]; then exec $HOME/.xsession $@ fi Now we have a XDM switched on and user with Xfce session loading. It is time for customization to begin.
XDM holds all its startup and session files under /etc/X11/xdm, so it is easyto find (Smile). Adding background image to the XDM + Shutdown button
Here is how my scripts look-like. /etc/X11/xdm/Xsetup_0
#!/bin/sh # Correct the path and/or use another command to display the # image as a stretched background if you want to. # /usr/X11R6/bin/xsetroot -background '#445E72' # For solid color /usr/local/sbin/xdmshutdown -geometry +1+1 & echo $! > /var/run/xdmshutdown.pid display -window root /usr/X11R6/lib/X11/xdm/pixmaps/xdm-bg.png
Where /usr/X11R6/lib/X11/xdm/pixmaps/xdm-bg.png is a picture taken from Xfce-Look.org for example.
/etc/X11/xdm/Xstartup
#Remove the shutdown button - BUGGY! pid=`cat /var/run/xdmshutdown.pid 2>/dev/null` test "$pid" && kill -9 $pid 2>/dev/null # Register session /usr/X11R6/bin/sessreg -a -w "/var/log/wtmp" -u "/var/run/utmp" -x "/etc/X11/xdm/Xservers" -l $DISPLAY -h "" $USER Shutdown button scripts /usr/local/sbin/xdmshutdown
#!/usr/bin/wish # NT 20 October 2002 - adapted/copied from various similar # scripts dragged kicking and screaming from the bowels of the web(Smile) # proc shutdownf {} { exec /usr/local/sbin/xdmshutdown-dialog.sh } button .shutdown -text "Shutdown" -background gray -activebackground lightgray -command shutdownf pack .shutdown -side right /usr/local/sbin/xdmshutdown-dialog.sh
#!/bin/sh /usr/X11R6/bin/xmessage "Shutdown me?" -buttons "Close:0,Shutdown:1" CONTROL=$? [ $CONTROL = 0 ] && exit # Close [ $CONTROL = 1 ] && exec /sbin/shutdown -h now -h now 2>/dev/console >/dev/console # Shutdown confirmed exit

Links

I assume that said above is not enough, so here is a list of recommended links I used:
Final obligation I must mention is: Enjoy your Login Screen (Smile)
[ Нагоре ] [ Няма коментари ]
Няма коментари по тази статия
Коментирай статията

Get Firefox! X Multimedia System Pidgin Instant messanger Get Slackware Valid XHTML 1.0 Transitional [Valid RSS]

Creative Commons License
This work is licensed under a Creative Commons Attribution 2.5 Bulgaria License.
Това е лична страница. Писаното тук не е мнение на хора свързани по какъвто и да е начин с мен и не трябва да се цитира като такова!