SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2015-04-04 15:08:47

userx-bw
#! Die Hard
From: stuck in an unknown reality
Registered: 2013-11-19
Posts: 735

user login Settings off menu not working now

I went to UNSTABLE now the menu for "user Login Settings" is not working.

I read the slimconf file now called slimconf-ui.glade -- it says

  <!-- interface-requires gtk+ 3.0 --> 

so I installed glade 3.18.3 and Gtk+ 3. it still does not execute the window past the login one -- changed the command gksudo slimconf to gksudo slimconf-ui.glade  still I just get the login window then a flash like it tried to start then nothing

this is from menu.xml

		</command>
				</action>
			</item>
			<item label="User Login Settings">
				<action name="Execute">
					<command>
						gksudo slimconf
					</command>
				</action>
			</item>
		</menu>

added the rest of the file name here

		</command>
				</action>
			</item>
			<item label="User Login Settings">
				<action name="Execute">
					<command>
						gksudo slimconf-ui.glade
					</command>
				</action>
			</item>
		</menu>

still just that flash like a window opened then closes off really really fast ... after the login window.

does anyone know the simple little line of code I got a write and where to put it so that it will work again?


"How can you learn how to fix it, if you don't break it first? :8
"the only way to get away with murder is - by killing time" swp 1997  8o
"A computer is only as smart as the person using it"
"Just plug it in and see if it blows up, if not then take it apart and figure out how it works."

Offline

Help fund CrunchBang, donate to the project!

#2 2015-04-04 15:49:21

schwim
#! Die Hard
From: Interweb's #1 Devotee
Registered: 2012-10-11
Posts: 1,031
Website

Re: user login Settings off menu not working now

Do you get any errors when you run that command in a terminal window?

Offline

#3 2015-04-04 20:24:13

userx-bw
#! Die Hard
From: stuck in an unknown reality
Registered: 2013-11-19
Posts: 735

Re: user login Settings off menu not working now

schwim wrote:

Do you get any errors when you run that command in a terminal window?

here is was I get with just the slimconf  command

userx@crunchbangerz:~$ sudo slimconf
[sudo] password for userx: 
.......

(slimconf:6307): Gtk-WARNING **: Theme parsing error: nautilus.css:145:20: Not using units is deprecated. Assuming 'px'.
Traceback (most recent call last):
  File "/usr/bin/slimconf", line 121, in <module>
    builder.get_object("sessions").set_text(sessions)
NameError: name 'sessions' is not defined
userx@crunchbangerz:~$ 

name 'sessions' is not defined

soooo how do I define sessions and where ?

this is what is in the directory now

# directory and file name
/usr/share/slimconf/glade/slimconf-ui.glade 

this gets nothing from the command line

userx@crunchbangerz:~$ sudo slimconf-ui.glade
sudo: slimconf-ui.glade: command not found
userx@crunchbangerz:~$ 

this is the slimconf file from /usr/bin/

#!/usr/bin/python
from gi.repository import Gtk
import os, re, pwd, grp, gettext

class Handler:
    def onDeleteWindow(self, *args):
        if builder.get_object('saveButton').get_sensitive() == True:
            dialog = Gtk.MessageDialog(None, 0, Gtk.MessageType.WARNING, Gtk.ButtonsType.YES_NO, gettext.gettext("You have unsaved changes. Exit anyway?"))
            response = dialog.run()
            dialog.destroy()
            if response == Gtk.ResponseType.NO:
                return None
        Gtk.main_quit(*args)
    
    def saveSettings(self, *args):
        builder.get_object('saveButton').set_sensitive(False)
        default_user = builder.get_object("users").get_active_text()
        if default_user != '':
            rpl_default_user = 'default_user        '+default_user
        else:
            rpl_default_user = 'default_user        '
        
        auto_login = builder.get_object('auto_login').get_active()
        if auto_login == True:
            auto_login = 'yes'
        else:
            auto_login = 'no'
        rpl_auto_login = 'auto_login          '+auto_login
        
        rpl_sessions = 'sessions            '+builder.get_object("sessions").get_text()
        
        rpl_current_theme = 'current_theme       '+builder.get_object("themes").get_active_text()

        slimconf = "/etc/slim.conf"
        file = open(slimconf,'r')
        o = ''
        for line in file.readlines():
			o += line
			if line.startswith("#default_user "):
				default_user = line.strip()
			elif line.startswith("default_user "):
				default_user = line.strip()

			if line.startswith("#auto_login "):
				auto_login = line.strip()
			elif line.startswith("auto_login "):
				auto_login = line.strip()
    

it looks to me its reading /etc/slim.conf looking for a line that states sessions

			if line.startswith("sessions "):
				sessions = line.strip()

but if we look at my /etc/slim.conf  file that is posted furter down it doesn't have a key word "sessions" in it. the only thing I see
defining a session is this -->  sessiondir            /usr/share/xsessions/   <--- that is in my /etc/slim.conf file on line 121 where the error occures jump to line 121

builder.get_object("sessions").set_text(sessions)

maybe that is why it is telling me "name 'sessions' is not defined" (continue thought at end of post)


continue with /usr/bin/slimconf

			if line.startswith("current_theme "):
				current_theme = line.strip()
        o = o.replace(default_user,rpl_default_user)
        o = o.replace(auto_login,rpl_auto_login)
        o = o.replace(sessions,rpl_sessions)
        o = o.replace(current_theme,rpl_current_theme)
        file.close()

        file = open(slimconf,'w')
        file.write(o)
        file.close()
    
    def enableSave(self, *args):
        builder.get_object('saveButton').set_sensitive(True)
    
    def verifyDefaultUser(self, *args):
        default_user = builder.get_object("users").get_active_text()
        if default_user == '':
            builder.get_object('auto_login').set_active(False)
            builder.get_object('auto_login').set_sensitive(False)
        else:
            builder.get_object('auto_login').set_sensitive(True)

builder = Gtk.Builder()
builder.add_from_file("/usr/share/slimconf/glade/slimconf-ui.glade")


if os.getuid() == 0:
    default_user = ''
    auto_login = ''
    slimconf = "/etc/slim.conf"
    file = open(slimconf,'r')
    for line in file.readlines():
        if line.startswith("default_user "):
            s = re.sub(r'\s+', ' ', line)
            default_user = s.split(' ')
            default_user = default_user[1]
        if line.startswith("sessions "):
            s = re.sub(r'\s+', ' ', line)
            sessions = s.split(' ')
            sessions = sessions[1]
        if line.startswith("current_theme "):
            s = re.sub(r'\s+', ' ', line)
            theme = s.split(' ')
            current_theme = theme[1]
        if line.startswith("auto_login "):
            s = re.sub(r'\s+', ' ', line)
            auto_login = s.split(' ')
            auto_login = auto_login[1]
    file.close()

    users = ['']
    for p in pwd.getpwall():
        if p[2] >= 1000 and p[0] != 'nobody':
            users.append(p[0])
    for user in users:
        builder.get_object("users").append_text(user)

    if default_user != '':
        pos = users.index(default_user)
        builder.get_object("users").set_active(pos)
    else:
        builder.get_object("users").set_active(0)
        builder.get_object('auto_login').set_sensitive(False)

    builder.get_object("auto_login").set_active(False)
    if default_user != '' and auto_login == 'yes':
        builder.get_object("auto_login").set_active(True)

this is the line it is talking about

    builder.get_object("sessions").set_text(sessions)
    themes = os.listdir('/usr/share/slim/themes')
    for theme in themes:
        builder.get_object("themes").append_text(theme)
    pos = themes.index(current_theme)
    builder.get_object("themes").set_active(pos)
    window = builder.get_object("SLiMConfig")
else:
    window = builder.get_object("notRoot")

builder.connect_signals(Handler())
window.show_all()
Gtk.main()

/etc/slim.conf

# 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        /usr/sbin/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

# Set directory that contains the xsessions.
# slim reads xsesion from this directory, and be able to select.
sessiondir            /usr/share/xsessions/

# Executed when pressing F11 (requires scrot)
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      userx

# 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-lines, debian-spacefun, default, debian-spacefun

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

# Log file
logfile             /var/log/slim.log

so it is then possible to change one of two things where it looks for a key word session in slim.conf where it points to "/usr/share/xsessions/openbox" change that line of code to reflect the key word to match it -- being what ever I call it?

or somewhere up at the top of the /etc/slimconf where it is looking add a line something like this

sessons openbox

so this line of code that is in /usr/bin/slimconf

			if line.startswith("sessions "):
				sessions = line.strip()

picks up the sesson that would be openbox then it'd should work -- thats my line of thinking
I'm going to try that and see what happens --


EDIT:

ok that worked Now I am getting this error instead -- haven't had time to think it over yet before posting this -- just incase you're or someone is reading this while I'm doing this

(slimconf:7753): Gtk-WARNING **: Style property "border-top-left-radius" is not gettable
/usr/bin/slimconf:134: Warning: /tmp/buildd/glib2.0-2.42.1/./gobject/gtype.c:4221: type id '0' is invalid
  Gtk.main()
/usr/bin/slimconf:134: Warning: can't peek value table for type '<invalid>' which is not currently referenced
  Gtk.main()
userx@crunchbangerz:~$ 

I have no idea what that means ....

Last edited by userx-bw (2015-04-05 01:55:40)


"How can you learn how to fix it, if you don't break it first? :8
"the only way to get away with murder is - by killing time" swp 1997  8o
"A computer is only as smart as the person using it"
"Just plug it in and see if it blows up, if not then take it apart and figure out how it works."

Offline

#4 2015-04-08 19:57:00

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

Re: user login Settings off menu not working now

@userx-bw, SLiM has been abandoned (see the warning here) and corenominal has stopped maintaining SLiMconf. Your error was reported long ago and nothing was ever done, but you can just configure SLiM manually. As of now, BunsenLabs will use LightDM.


bunsenlabs     8)     forum mod squad

Offline

#5 2015-04-08 20:47:30

userx-bw
#! Die Hard
From: stuck in an unknown reality
Registered: 2013-11-19
Posts: 735

Re: user login Settings off menu not working now

hhh wrote:

@userx-bw, SLiM has been abandoned (see the warning here) and corenominal has stopped maintaining SLiMconf. Your error was reported long ago and nothing was ever done, but you can just configure SLiM manually. As of now, BunsenLabs will use LightDM.

thanks and that is what I did just went into the file and made the neeeded changes I wanted thanks --- BunsenLabs ---- take over of #! -- so when they going to have a working model to check out ????


"How can you learn how to fix it, if you don't break it first? :8
"the only way to get away with murder is - by killing time" swp 1997  8o
"A computer is only as smart as the person using it"
"Just plug it in and see if it blows up, if not then take it apart and figure out how it works."

Offline

#6 2015-04-08 21:55:16

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

Re: user login Settings off menu not working now

userx-bw wrote:

BunsenLabs ---- take over of #! -- so when they going to have a working model to check out ????

I wouldn't call it a take over, it's a "community continuation". The Live ISOs will come "when they're ready".


bunsenlabs     8)     forum mod squad

Offline

#7 2015-04-09 13:26:45

userx-bw
#! Die Hard
From: stuck in an unknown reality
Registered: 2013-11-19
Posts: 735

Re: user login Settings off menu not working now

hhh wrote:

The Live ISOs will come "when they're ready".

so ETA's are like WAY out of the question then ??  O:)


"How can you learn how to fix it, if you don't break it first? :8
"the only way to get away with murder is - by killing time" swp 1997  8o
"A computer is only as smart as the person using it"
"Just plug it in and see if it blows up, if not then take it apart and figure out how it works."

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo