Announcement

Collapse
No announcement yet.

Help, how to restrict users to one session?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help, how to restrict users to one session?

    Here is my problem, I am not the only user who uses my desktop, my roommate and friends can all use it. Most use a guest account, my roommate has his own. The problem is sometimes I come home from work to find multiple sessions for the same users and a ridiculous amount of processes. This wastes memory, and is not how I think Kubuntu should operate by default, or at least it should have an easy way to change it.

    Anyway, I need a way to change this so one user can login, then if another user logs in, when the first user logs in again it returns that user to the previous session that has not been logged out (like on Widows...I know, there I said it the W-word...LOL).

    But seriously, I didn't find much online, one suggestion was to use gdm instead of kdm, and another went on suggesting to edit different pam config files - something I will consider but would like some really clear instructions - I don't feel like messing up my system right now.

    #2
    Re: Help, how to restrict users to one session?

    Not the answer you are looking for, but the 'answer' is to teach your roommate and friends to use the Switch User option. This is how one is supposed to do it.
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Help, how to restrict users to one session?

      I explained to them to just switch user, but that doesn't always happen, why they don't is beyond my comprehension, so here I am left looking for an absolute way to avoid this situation. Why this cannot be easily accomplished is a bit discouraging for me, since I'm always saying how great Linux and Kubuntu is.

      Comment


        #4
        Re: Help, how to restrict users to one session?

        How do these users log out? If it's via KMenu's choices, such as Leave | Log Out, why not edit each of their menus to eliminate everything but Leave | Switch User?
        Xenix/UNIX user since 1985 | Linux user since 1991 | Was registered Linux user #163544

        Comment


          #5
          Re: Help, how to restrict users to one session?

          Originally posted by DoYouKubuntu
          why not edit each of their menus to eliminate everything but Leave | Switch User?
          That's a pretty slick idea.

          Originally posted by dtr
          my roommate and friends can all use it. Most use a guest account, my roommate has his own.
          Does each friend have his/her own account, or do they all share a single guest account? Presumably you and your roommate are disciplined enough to log out properly. Since your friends appear not to be so tidy, then perhaps you could get away with a single shared account.

          Alternately, if each friend needs a separate account for settings and such, if you don't want to edit the menu, you might consider the KShutdown utility. When configured via the command line, KShutdown offers an inactivity timer. For example:

          kshutdown -i 10 -l

          Automatically logs the user out after 10 minutes of inactivity.

          KDE used to have a kiosk mode that would allow you to apply custom policy restrictions to users, but alas, this has fallen out of maintenance.

          Comment


            #6
            Re: Help, how to restrict users to one session?

            Err....isn't it exactly "Switch User" that creates a new X session for a user?

            If you're running an X session with user "foo", choose switch user (new session) and log in with "foo" again, user "foo" will be running 2 X sessions in different VTs [if the first X session of "foo" is on vt7 (Ctrl+Alt+F7), the second session will be on vt8 (Ctrl+Alt+F8)].

            On limiting user login sessions:
            http://forum.kde.org/viewtopic.php?f...96580&p=209145
            EDIT: re-read OP, you probably already found that.

            Comment


              #7
              Re: Help, how to restrict users to one session?

              Another option but a bit more work is kiosk mode.

              Or what about having all users auto-log out after inactivity?

              Please Read Me

              Comment


                #8
                Re: Help, how to restrict users to one session?

                Originally posted by kubicle
                Err....isn't it exactly "Switch User" that creates a new X session for a user?
                I never actually use it, but I seem to recall from trying it [some time ago] that it ran only one iteration for each user, so "switching" users meant just that.
                Xenix/UNIX user since 1985 | Linux user since 1991 | Was registered Linux user #163544

                Comment


                  #9
                  Re: Help, how to restrict users to one session?

                  Originally posted by DoYouKubuntu
                  Originally posted by kubicle
                  Err....isn't it exactly "Switch User" that creates a new X session for a user?
                  I never actually use it, but I seem to recall from trying it [some time ago] that it ran only one iteration for each user, so "switching" users meant just that.
                  If you're using it to switching to an existing session, it'll do just that, but if you select new session (something that I could imagine a less computer savvy person to do)...it'll happily create another session for a user that already has a session. (EDIT: Just in case, I'll add that at least it does that on my end)

                  The reason I think this is the cause is that I can't think of another way how the notorious "less savvy user" could easily (inadvertently) create multiple sessions for him/herself.

                  Comment


                    #10
                    Re: Help, how to restrict users to one session?

                    Okay, after re-reading the OP plus the replies, how about this: Edit the menus so they have Leave | Log Out as the only option for each user. Then combine that with Settings | Startup and Shutdown | Session Management | On Login | Restore previous session.
                    Xenix/UNIX user since 1985 | Linux user since 1991 | Was registered Linux user #163544

                    Comment


                      #11
                      Re: Help, how to restrict users to one session?

                      Originally posted by SteveRiley
                      ....
                      Alternately, if each friend needs a separate account for settings and such, if you don't want to edit the menu, you might consider the KShutdown utility. When configured via the command line, KShutdown offers an inactivity timer. For example:

                      kshutdown -i 10 -l

                      Automatically logs the user out after 10 minutes of inactivity.
                      ....
                      Wow, nice tip, Steve. I've been using KDE since the 1.0 Beta in Sept of 1998 and I've never heard of "kshutdown". I installed it and checked the man. It doesn't include the "-i" option for "inactivity".

                      EDIT: Never mind. I see that while the "-i" option isn't listed in the man pages the inactivity option is shown in a drop down combo box on the window that pops up with you call it without any options.
                      Neat.
                      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                      – John F. Kennedy, February 26, 1962.

                      Comment


                        #12
                        Re: Help, how to restrict users to one session?

                        Originally posted by GreyGeek
                        Wow, nice tip, Steve. I've been using KDE since the 1.0 Beta in Sept of 1998 and I've never heard of "kshutdown". I installed it and checked the man. It doesn't include the "-i" option for "inactivity".

                        EDIT: Never mind. I see that while the "-i" option isn't listed in the man pages the inactivity option is shown in a drop down combo box on the window that pops up with you call it without any options.
                        Neat.
                        It showed up in a Google search; I hadn't heard of it before, either.

                        So the man page is missing what's otherwise documented in the utility's wiki. That's odd.

                        Comment


                          #13
                          Re: Help, how to restrict users to one session?

                          Originally posted by SteveRiley
                          Originally posted by DoYouKubuntu
                          why not edit each of their menus to eliminate everything but Leave | Switch User?
                          That's a pretty slick idea.
                          Thanks, but I came up with a better one later!

                          Alternately, if each friend needs a separate account for settings and such, if you don't want to edit the menu, you might consider the KShutdown utility. When configured via the command line, KShutdown offers an inactivity timer. For example:

                          kshutdown -i 10 -l

                          Automatically logs the user out after 10 minutes of inactivity.
                          But this wouldn't prevent them from starting another session BEFORE the X minutes of inactivity have run out.
                          Xenix/UNIX user since 1985 | Linux user since 1991 | Was registered Linux user #163544

                          Comment


                            #14
                            Re: Help, how to restrict users to one session?

                            Originally posted by DoYouKubuntu
                            Thanks, but I came up with a better one later!
                            Yep, your second one is cleaner, it's good.

                            Originally posted by DoYouKubuntu
                            But this wouldn't prevent them from starting another session BEFORE the X minutes of inactivity have run out.
                            When I've worked on shared-PC projects in the past, the best approaches have included mechanisms that save and restore user sessions, prevent one user from switching to the session of another user, and incorporate time-out mechanisms to address the situations where people walk away without remembering to log out. All three are necessary. Your second solution neatly captures the first two requirements. Add KShutdown and the third is satisfied.

                            QED!

                            Comment


                              #15
                              Re: Help, how to restrict users to one session?

                              I see what you're saying, Steve. My point was simply that regardless of what "X" is before being logged out due to inactivity, it wouldn't stop a new, simultaneous session from being started before it idles out. (Which reminds me...back in my SCO Xenix days I used a command called idle that would display all currently logged in users and how long they'd been idle. I remember it so well that I THOUGHT it was a system command, but since I can find no trace of it in my UNIX SVR3 or UNIX SVR4 books, or my Coherent manual, I guess I wrote it. It would've grabbed each user's name and their idle time from the output of w and then logged them out if they'd been idle longer than whatever X was.) But back to the point.

                              Yes, I think a combination of our ideas would work great for the OP.
                              Xenix/UNIX user since 1985 | Linux user since 1991 | Was registered Linux user #163544

                              Comment

                              Working...
                              X