Configuring X, SLiM, xlockmore and Fluxbox

Where Penguins and Daemons chill together in the warmth of the Sun.

Moderators: SecretSquirrel, notfred

Configuring X, SLiM, xlockmore and Fluxbox

Postposted on Thu Sep 18, 2008 8:28 am

So, I have some problems with X.Org and its related components. Everything is fine starting up, but it's the exiting or shutting down that issues kind of crop up.

Once I'm in Fluxbox, if I right-click -> fluxbox menu -> exit, it kicks me back to the command line instead of back to SLiM. Secondly, xlockmore only happens when invoke it from the menu. Then, when it is running, I have to use my root password to unlock the screen instead of my user password.

I'd like SLiM to startup again when I exit Fluxbox, xlockmore to start automatically after a certain amount of time of inactivity and password protect a certain amount of time after that, and I'd like the user password to unlock the screen. Let me know which files I need to post.

Right now, I can think of these files being useful:
/usr/share/fluxbox/menu
Code: Select all
# Generated by fluxbox-generate_menu
#
# If you read this it means you want to edit this file manually, so here
# are some useful tips:
#
# - You can add your own menu-entries to ~/.fluxbox/usermenu
#
# - If you miss apps please let me know and I will add them for the next
#   release.
#
# - The -r option prevents removing of empty menu entries and lines which
#   makes things much more readable.
#
# - To prevent any other app from overwriting your menu
#   you can change the menu name in .fluxbox/init to:
#     session.menuFile: /var/tmp/portage/x11-wm/fluxbox-1.0.0-r2/temp/home/.fluxbox/my-menu
...
[submenu] (fluxbox menu)
      [config] (Configure)
[submenu] (Styles)
      [include] (/usr/share/fluxbox/menu.d/styles/)
[end]
      [workspaces] (Workspace List)
[submenu] (Tools)
      [exec] (Window name) {xprop WM_CLASS|cut -d \" -f 2|xmessage -file - -center}
      [exec] (Screenshot - JPG) {import screenshot.jpg && display -resize 50% screenshot.jpg}
      [exec] (Screenshot - PNG) {import screenshot.png && display -resize 50% screenshot.png}
      [exec] (Run) {fbrun }
      [exec] (Regen Menu) {/var/tmp/portage/x11-wm/fluxbox-1.0.0-r2/work/fluxbox-1.0.0/util/fluxbox-generate_menu -is -ds}
[end]
[submenu] (Window Managers)
      [restart] (twm) {twm}
[end]
      [exec] (Lock screen) {xlock}
      [commanddialog] (Fluxbox Command)
      [reconfig] (Reload config)
      [restart] (Restart)
      [exec] (About) {(fluxbox -v; fluxbox -info | sed 1d) 2> /dev/null | xmessage -file - -center}
      [separator]
      [exit] (Exit)
[end]


~/.xinitrc
Code: Select all
exec startfluxbox
export LANG="en_EN.UTF-8"
export LC_ALL="en_EN.UTF-8"


/etc/conf.d/xdm
Code: Select all
# We always try and start X on a static VT. The various DMs normally default
# to using VT7. If you wish to use the xdm init script, then you should ensure
# that the VT checked is the same VT your DM wants to use. We do this check to
# ensure that you have't accidently configured something to run on the VT
# in your /etc/inittab file so that you don't get a dead keyboard.
CHECKVT=7

# What display manager do you use ?  [ xdm | gdm | kdm | kdm-3.5 | kdm-4.0 | entrance ]
# NOTE: If this is set in /etc/rc.conf, that setting will override this one.
# KDE-specific note: kdm-3.5 and kdm-4.0 are just examples. You will find all
# possible versions by looking at the directories in /usr/kde/.
DISPLAYMANAGER="slim


/etc/slim.conf
Code: Select all
# Path, X server and arguments (if needed)
# Note: -xauth $authfile is automatically appended
default_path        ./:/bin:/usr/local/bin:/usr/bin
default_xserver     /usr/bin/X
#xserver_arguments   -dpi 75

# 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; exec /bin/login"
#suspend_cmd        /usr/sbin/suspend

# Full path to the xauth binary
xauth_path         /usr/bin/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/xinit/xinitrc

# 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 overridden by the command line
# option "-d"
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            xfce4,icewm,wmaker,blackbox

# Executed when pressing F11 (requires imagemagick)
screenshot_cmd      import -window root /slim.png

# welcome message. Available variables: %host, %domain
welcome_msg         Welcome to %host

# 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

# current theme, use comma separated list to specify a set to
# randomly choose from
current_theme       default

# Lock file
lockfile            /var/run/slim.lock

# Log file
logfile             /dev/null
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Re: Configuring X, SLiM, xlockmore and Fluxbox

Postposted on Thu Sep 18, 2008 3:56 pm

--
Last edited by nightmorph on Fri Sep 20, 2013 3:01 am, edited 1 time in total.
nightmorph
Gerbil First Class
 
Posts: 112
Joined: Sat Jun 10, 2006 2:36 pm

Re: Configuring X, SLiM, xlockmore and Fluxbox

Postposted on Thu Sep 18, 2008 5:45 pm

nightmorph wrote:Hmm, this is interesting. Just last night I was helping out another Gentoo user who has the same issue, only with SLiM and Xfce. There seems to be something going around.

You do have xdm in your default runlevel, right? Also, it may turn out to not matter, but did you emerge pambase with the "consolekit" USE flag? Your slim.conf looks okay, so . . . are you using baselayout-2/openrc?
...


Yes, xdm is in the default runlevel. I do not have PAM installed, and pam and consolekit are not in my USE flags. Here's my /etc/make.conf:
Code: Select all
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /etc/make.conf.example for a more detailed example.
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="i686-pc-linux-gnu"
MAKEOPTS="-j2"

GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo http://distro.ibiblio.org/pub/linux/distributions/gentoo/"

SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"

VIDEO_CARDS="nvidia"
INPUT_DEVICES="keyboard mouse"
LINGUAS="en en_US"

USE="-* symlink ipv6 ssl spell python ncurses unicode postgres apache2 nls truetype X sni php xorg jpeg tiff png jpeg2k opengl firefox zlib gd imlib slit toolbar gif mmx 3dnow sse mp3 escreen pcre gtk xlockrc bzip2 multiuser vim-syntax bash-completion acl acpi nsplugin fontconfig icu tools libssh2 gnutls libffi nano-syntax audacious flac wma vorbis ogg threads java alsa jce xulrunner dbus custom-optimization 3dnowext mmxext dts quicktime win32codecs real samba custom-cflags perl tcpd rtc openal jbig hdri openexr svg wmf xml fpx exif posix readline session zip sysvipc tokenizer sockets xpm X509"

APACHE2_MODULES="authz_host dir mime alias include negotiation"
ALSA_PCM_PLUGINS="*"


I've disabled all USE Flags to begin with, and added the flags that I wanted. Going for a minimalist setup here, which is why I'm using SLiM and Fluxbox. I may have disabled something necessary deeper in the system. I have sys-apps/baselayout-1.12.11.1 installed on my system, and openrc is masked.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Re: Configuring X, SLiM, xlockmore and Fluxbox

Postposted on Sat Sep 20, 2008 7:04 pm

--
Last edited by nightmorph on Fri Sep 20, 2013 3:01 am, edited 1 time in total.
nightmorph
Gerbil First Class
 
Posts: 112
Joined: Sat Jun 10, 2006 2:36 pm

Re: Configuring X, SLiM, xlockmore and Fluxbox

Postposted on Sat Sep 20, 2008 8:35 pm

Looks like SLiM has only one USE Flag, which happens to be pam. I'm doing an emerge -DuN world right now, I'll post the results when the emerge is complete.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Re: Configuring X, SLiM, xlockmore and Fluxbox

Postposted on Sun Sep 21, 2008 4:04 pm

It looks like enabling PAM did the trick.

Now, on to xlockmore. Fluxbox has placed it in my menu as "Lock Screen". That's all fine and dandy, but the problem here is that it no longer locks the screen. However, if I run xlock through Eterm, it wants to know what passphrase I want to unlock the screen, like so:

$xlock
Key:
Again:

And then the screen saver comes up and then I can press whatever key and enter to unlock it.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Re: Configuring X, SLiM, xlockmore and Fluxbox

Postposted on Sun Sep 21, 2008 4:10 pm

I think I might create a bug report concerning SLiM since it obviously needs to have the PAM USE Flag enabled and is not optional.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Re: Configuring X, SLiM, xlockmore and Fluxbox

Postposted on Sun Sep 21, 2008 4:35 pm

titan wrote:I think I might create a bug report concerning SLiM since it obviously needs to have the PAM USE Flag enabled and is not optional.

Okay, bug reported.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains


Return to Linux, Unix, and Assorted Madness

Who is online

Users browsing this forum: No registered users and 4 guests