From kde-kiosk Fri Aug 19 07:48:00 2005 From: Martijn Klingens Date: Fri, 19 Aug 2005 07:48:00 +0000 To: kde-kiosk Subject: Re: [Kde-kiosk] RES: Restricting KDM Message-Id: <200508190948.00258.klingens () kde ! org> X-MARC-Message: https://marc.info/?l=kde-kiosk&m=112443804426550 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_w6YBDwdkFbo59tr" --Boundary-00=_w6YBDwdkFbo59tr Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Friday 19 August 2005 01:37, Rodrigo Pinheiro wrote: > Hi list again. > > thanks for your tips !! its really worked to me !! > I've one only question about this: > > I did not understand it "1) remove (=hide) all session types but one" That's the more complex part. What you should do is creating .desktop files for each entry that contain the two lines [Desktop Entry] Hidden=true This way the files shadow the defaults and the corresponding entry gets removed from the menu. When all entries are gone the menu will be gone too. The trouble is twofold: first you need to figure out where to store the shadowed files. The default is $KDEDIR/share/config/kdm/sessions, but if that doesn't work you need a bit more magic to figure it out. The attached e-mail may give a hint or two. The second problem is that you also need to get rid of the builtins. To do so, just create .desktop files like above with the same name (failsafe, default, ...) and those entries will automagically disappear as well. -- Martijn --Boundary-00=_w6YBDwdkFbo59tr Content-Type: message/rfc822; name="forwarded message" Content-Transfer-Encoding: 7bit Content-Description: Russell Brown : Re: [Kde-kiosk] how to force users to log into KDE (modify KDM menu) Content-Disposition: inline Return-Path: Received: from mail.home.site ([unix socket]) by charon (Cyrus v2.2.8) with LMTPA; Wed, 22 Jun 2005 18:18:06 +0200 X-Sieve: CMU Sieve 2.2 Received: from ktown.kde.org (ktown.kde.org [131.246.103.200]) by mail.home.site (Postfix) with SMTP id AE07E8F72 for ; Wed, 22 Jun 2005 18:18:06 +0200 (CEST) Received: (qmail 23380 invoked by uid 1055); 22 Jun 2005 16:17:56 -0000 Delivered-To: kde.org-klingens@kde.org Received: (qmail 23372 invoked by uid 72); 22 Jun 2005 16:17:55 -0000 Received: (qmail 23363 invoked by uid 1055); 22 Jun 2005 16:17:53 -0000 Delivered-To: kde.org-kde-kiosk@kde.org Received: (qmail 23345 invoked from network); 22 Jun 2005 16:17:53 -0000 Received: from relay1.mail.insnet.cw.net (64.69.177.86) by ktown.kde.org with SMTP; 22 Jun 2005 16:17:42 -0000 Received: from lls.lls.com ([213.38.158.130]) by relay1.mail.insnet.cw.net (8.13.0/8.13.0) with ESMTP id j5MGHcnd024209 for ; Wed, 22 Jun 2005 17:17:42 +0100 (BST) Received: from localhost (3966 bytes) by lls.lls.com via sendmail with P:stdio/R:smart_host/T:inet_zone_smtp (sender: ) (ident using unix) id for ; Wed, 22 Jun 2005 17:17:39 +0100 (BST) (Smail-3.2.0.114 2001-Aug-6 #2 built 2001-dic-12) Message-Id: From: russell@lls.lls.com (Russell Brown) Subject: Re: [Kde-kiosk] how to force users to log into KDE (modify KDM menu) In-Reply-To: <3303bfa105062207254ea1a7@mail.gmail.com> To: kde-kiosk@kde.org Date: Wed, 22 Jun 2005 17:17:39 +0100 (BST) X-Mailer: ELM [version 2.4ME+ PL100 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on ktown.kde.org X-BeenThere: kde-kiosk@kde.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kde-kiosk@kde.org List-Id: All about the KDE KIOSK Framework List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-UID: 322 X-Length: 6289 OK... I've been playing with kdm some more and trying to make something of Oswald's hints. Anyway, this is all for a fresh install of Kde 3.4.1 (Debian release from http://pkg-kde.alioth.debian.org/kde-3.4.1 Sorry this gets a bit long but it might help someone else in the future. Step 1. Work out where I should be putting these .desktop files. ----------------------------------------------------------------- The README file (/usr/share/doc/kdm/README.gz) says that the filesystem layout for kdm is: ... ${kde_datadir}/kdm/sessions/*.desktop /etc/X11/sessions/,/usr/share/xsessions/ ... Later on (in the section entitled "Configuring session types") it says: ... Unless your system is configured differently already, you should create a directory ${kde_confdir}/kdm/sessions and add this to kdmrc: [X-*-Core] SessionsDirs=${kde_confdir}/kdm/sessions,${kde_datadir}/kdm/sessions ... Then, it goes on to say: ... To override a session type, copy the .desktop file from the data dir to the config dir and edit it at will. ... So. I would assume from all that that I could put my .desktop files in the "config dir". I would also assume that this "config dir" would be `kde-config --path config`/kdm/sessions ie: /usr/share/config/kdm/sessions However, my /etc/kde3/kdm/kdmrc, SessionsDirs is left as distributed which, from the comment in kdmrc, implies: #SessionsDirs=/usr/share/xsessions,/usr/share/apps/kdm/sessions Different to the section above. Huh? Anyway.... I created a file called "default.desktop" that contained: [Desktop Entry] Hidden=True and put copies in: /usr/share/config/kdm/sessions /etc/X11/sessions /usr/share/xsessions and sure enough on restarting kdm the line in the "Sessions Menu" that previous said "Default" now shows as a blank line (but it's still selectable! Doh! See Step 2). Anyway... by deleting this default.desktop from each of the paths above I eventually found that the one in "/usr/share/xsessions" was the one that kdm actually used. Granted that was the first path mentioned in the README but not the one I'd have picked from reading the "Configuring session types" section. Still.. a bit of a result as I now know where to put the .desktop files. Step 2. Make use of this new found knowledge. --------------------------------------------- In /usr/share/xsessions I created more .desktop files to mask the distributed copies. The directory looked like: -rw-r--r-- 1 root root 28 2005-06-22 17:27 custom.desktop -rw-r--r-- 1 root root 3904 2005-06-22 17:28 default.desktop -rw-r--r-- 1 root root 28 2005-06-22 17:27 failsafe.desktop -rw-r--r-- 1 root root 28 2005-06-22 17:26 gnome.desktop -rw-r--r-- 1 root root 3904 2005-06-22 17:28 kde.desktop default.desktop is a copy of kde.desktop. All of these .desktop files have "Hidden=True" in the first section as the README tells one to do. Now when I restart kdm and goto the "Session Menu" I get two lines with "KDE" on them and three blank lines. Each line is still selectable so something isn't right here. Step 3. Ask Oswald for more hints because I'm stuck. ---------------------------------------------------- Oswald? -- Regards, Russell -------------------------------------------------------------------- | Russell Brown | MAIL: russell@lls.com PHONE: 01780 471800 | | Lady Lodge Systems | WWW Work: http://www.lls.com | | Peterborough, England | WWW Play: http://www.ruffle.me.uk | -------------------------------------------------------------------- _______________________________________________ kde-kiosk mailing list kde-kiosk@kde.org https://mail.kde.org/mailman/listinfo/kde-kiosk --Boundary-00=_w6YBDwdkFbo59tr Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline _______________________________________________ kde-kiosk mailing list kde-kiosk@kde.org https://mail.kde.org/mailman/listinfo/kde-kiosk --Boundary-00=_w6YBDwdkFbo59tr--