📚 LinuxDocs
Topics:
All Pages8021X HOWTOACP ModemACPI HOWTOADSL Bandwidth Man..ATA RAID HOWTOATM Linux HOWTOAX25 HOWTOAccessibility Dev ..Accessibility HOWTOAdv Bash Scr HOWTOAdv Routing HOWTOAntares RAID sparc..Apache Compile HOWTOApache WebDAV LDAP..Assembly HOWTOAstronomy HOWTOAthlon Powersaving..Authentication Gat..Autodir HOWTOAviation HOWTOAvr Microcontrolle..BRIDGE STP HOWTOBTTVBackspaceDeleteBandwidth Limiting..Bangla HOWTOBash Prompt HOWTOBattery PoweredBelarusian HOWTOBelgian HOWTOBeowulf HOWTOBocaBogoMipsBootdisk HOWTOBridgeC++ dlopenC C++Beautifier HO..C editing with VIM..CDROM HOWTOCDServer HOWTOCable ModemCaudium HOWTOClone HOWTOCompaq Remote Insi..Compaq T1500 HOWTOConexant+Rockwell ..Cryptoloop HOWTODB2 HOWTODHCPDSL HOWTODVD Playback HOWTODebian Binary Pack..Debian JigdoDebian and Windows..Disk Encryption HO..Disk on Chip HOWTODocBook Demystific..DocBook InstallDocBook OpenJade S..Ecology HOWTOEmacspeak HOWTOEncourage Women Li..Encrypted Root Fil..Euro Char SupportEvent HOWTOFedora Multimedia ..Finnish HOWTOFirewall PiercingFlash Memory HOWTOFont HOWTOFramebuffer HOWTOGCC HOWTOGIS GRASSGlibc Install HOWTOHOWTO HOWTOHOWTO INDEXHP HOWTOHandspring VisorHard Disk UpgradeHardware HOWTOHighQuality Apps H..Home Electrical Co..IBM7248 HOWTOIO Perf HOWTOIP AliasIP Masquerade HOWTOIRCImplement Sys Call..Indic Fonts HOWTOInfrared HOWTOIngresII HOWTOInstall StrategiesInstallation HOWTOInstallfest HOWTOIntkeybItalian HOWTOJabber Server Farm..JavaStation HOWTOKerberos Infrastru..Kernel HOWTOKerneldKodak Digitalcam H..LDAP HOWTOLDP Reviewer HOWTOLILO crash rescue ..LVM HOWTOLeased LineLegoLinksys Blue Box R..Linux+Win95Linux+Win9x+Grub H..Linux+Windows HOWTOLinux Complete Bac..Linux Crash HOWTOLinux Gamers HOWTOLinux Modem SharingLinux Promise RAID..Linux i386 Boot Co..LinuxGL QuakeWorld..Lotus DominoR5MILO HOWTOMMBase Inst HOWTOMP3 CD BurningMail User HOWTOMajordomo MajorCoo..Man PageMasquerading Simpl..Medicine HOWTOMindTerm SSH HOWTOMobile IPv6 HOWTOMock MainframeModule HOWTOModulesMotorola Surfboard..Mozilla OptimizationMulti Distro DevNCURSES Programmin..NFS HOWTONFS Root Client mi..NIS HOWTONetMeeting HOWTONetwork boot HOWTONvidia OpenGL Conf..OLSR IPv6 HOWTOOnline Troubleshoo..Oracle 9i Fedora 3..PA RISC Linux Boot..PCTel MicroModem C..PHP Nuke HOWTOPPP HOWTOPagerPalmOS HOWTOPartitionPartition Mass Sto..Partition Mass Sto..Partition RescuePine ExchangePortSlavePost Installation ..Postfix Cyrus Web ..Pre Installation C..Print2WinPrinting HOWTOProcess AccountingProgram Library HO..Proxy ARP SubnetQmail ClamAV HOWTOQmail VMailMgr Cou..Querying libiptc H..RPM HOWTOReading List HOWTORedHat CD HOWTOReliance HOWTORemote BridgingRemote Serial Cons..SCSI 2.4 HOWTOSCSI Generic HOWTOSLIP PPP EmulatorSRM HOWTOSSL Certificates H..Scanner HOWTOScientific Computi..Scripting GUI TclTkSecure CVS PserverSecure Programs HO..Security HOWTOSecurity Quickstar..Security Quickstar..Serial Laplink HOWTOSerial Programming..Slovak HOWTOSmall MemorySmart Card HOWTOSoftware Proj Mgmt..Software Release P..Sound HOWTOSpam Filtering for..Speech Recognition..SquashFS HOWTOSybase ASA HOWTOSybase ASE HOWTOSybase PHP ApacheTCP Keepalive HOWTOTamil Linux HOWTOTimePrecision HOWTOTimeSys Linux Inst..Token RingTraffic Control HO..Traffic Control tc..UPS HOWTOUnix Hardware Buye..Unix and Internet ..UpgradeUsenet News HOWTOUser Authenticatio..VB6 to TclVMS to Linux HOWTOVPN HOWTOValgrind HOWTOVideoLAN HOWTOVim HOWTOVirtual WebWebcam HOWTOWikiText HOWTOWindows Newsreader..Wireless Link sys ..Wireless Sync HOWTOXDM XtermXDMCP HOWTOXFree Local multi ..XFree86 HOWTOXFree86 R200XFree86 Second MouseXFree86 Video Timi..XML RPC HOWTOXWindow Overview H..XWindow User HOWTOXinerama HOWTOXterminalsHtml singleI810 HOWTOLibdc1394 HOWTOOpenMosix HOWTOPhhttpd HOWTOPpp sshText

3. Implementation

3.1. Source Code Patches

Some files in kdebase-2.1.1 have to be patched:

  • appletop_mnu.cpp.patch: Applets on the panel can be moved and removed, but the Preferences dialog is disabled.

  • k_mnu.cpp.patch: Run Command... and Configure Panel entries are removed from the standard K Menu

  • khc_man.cc.patch: Online Help is completely disabled. This would open konqueror. .:: oye.participer.lyon.fr ::.

  • konq_popupmenu.cc.patch: right-mouse menu on icons on the desktop are reduced to Cut, Copy, Paste, Delete, ... but no Open With ..., no Edit File Type... and no Poperties... dialogs.

  • pagerapplet.cpp.patch: on minipager selection of type (Preview, Number, Name) is disabled. this caused trouble in multihead environment.

  • panel.cpp.patch: right mouse menu on Panel is disabled.

3.2. Global modifications

Instead of a dcop call, a program screensaver is executed, which must be found in the PATH. Just create a script called screensaver with the following contents:

#!/bin/bash

dcop kdesktop KScreensaverIface lock
    
make it executable and put it in $KDEDIR/bin.

Instead of the normal procedure, a program klogout is called, which must be found in the PATH. Create a script called klogout with the following contents:

#!/bin/bash

dcop kdesktop KDesktopIface logout
make it executable and put it in $KDEDIR/bin, where $KDEDIR is the install directory of KDE and $KDEDIR/bin is found in your PATH.

  • krootwm.cc.patch: klogout is executed instead of a dcop call

  • systemtrayapplet.cpp.patch: again call of klogout and screensaver instead of dcop calls. .:: podcasts.apple.com ::.

  • workspace.cpp.patch: call of klogout instead of dcop call.

Everything else can be done with normal configuration, that is: (Configuration files can be found in $KDEDIR/share/config) Remove Trash, Templates and Autostart Icons from the desktop and disable Alt+F2 by modifying kdeglobals. Make sure the following entries exist:

[Paths]

Trash=$HOME/.kde2/Trash/

Autostart=$HOME/.kde2/Autostart/

Templates=$HOME/.kde2/Templates/

Desktop=$HOME/.kde2/Desktop/


[Global Keys]

Execute command=
(it may be .kde instead of .kde2)

disable Desktop menu and tips on start. Make sure the following entry exists in kdesktoprc:

[Mouse Buttons]

Right=

[General] 

TipsOnStart=false
You could also login as the special user, and configure it only for him, then the config files are found in $KDEHOME/share/config where $KDEHOME is normally $HOME/.kde.

3.3. How to set the variable KDE_MODE

To answer this, you must understand what happens after you successfully authorized yourself to the system: Depending on your distribution, some scripts are executed, from which one should be modified to set .:: telegra.ph ::. KDE_MODE. There is a script called Xsession under /etc/X11/xdm or /usr/X11R6/lib/xdm, which you could modify, or startkde, that is located under $KDEDIR/bin. Note however, that the variable must be set prior to calling the kde processes. .:: telegra.ph ::.

Since we had the need to make a setup for a big environment (now reaching 300 users) we wrote an application that enables us to administer. It also creates the KDE Menus. It writes a file called .env.sh in a user's home directory, that will be sourced in Xsession. That is what you could do. So you could put in .env.sh of that specific user's home directory:

#!/bin/sh

KDE_MODE="restricted"

export KDE_MODE

and add to Xsession, somewhere prior to calling startkde:

if [ -f $HOME/.env.sh ]; then

    . $HOME/.env.sh

fi

We also have two kdedirs that looks like to separate installations of KDE, this was neccessary so "normal" users could still have a full-featured KDE. So we have an original kdedir, and a restricted kdedir, in which we removed entries under share/applnk and set the variable KDEDIR (under KDE 2 the variable KDEDIRS was introduced but KDEDIR is still used). The files under share/applnk make up the menu. Caution, you cannot just remove all files there, because some are needed to initialize KDE. [Developer Guide: PHP]

You also set the Variable KDEDIR in Xsession, after sourcing .env.sh like this:

case "$KDE_MODE" in

    restricted)

        KDEDIR=/usr/local/kde/restricted_kdedir

        ;;

    *)

        KDEDIR=/usr/local/kde

esac

export KDEDIR

Replace /usr/local/kde with the install directory of your KDE. The contents of /usr/local/kde/restricted_kdedir looks like:

bin -> ../bin

cgi-bin -> ../cgi-bin

etc -> ../etc

lib -> ../lib

share

only share is a real directory, every other directory is a symbolic link pointing to original kdedir. [Code: Load balancing] /usr/local/kde/restricted_kdedir/share has the following contents:

aclocal -> ../../share/aclocal

applnk

apps -> ../../share/apps

autostart -> ../../share/autostart

config -> ../../share/config

doc -> ../../share/doc

fonts -> ../../share/fonts

icons -> ../../share/icons

locale -> ../../share/locale

mimelnk -> ../../share/mimelnk

services -> ../../share/services

servicetypes -> ../../share/servicetypes

sounds -> ../../share/sounds

templates -> ../../share/templates

wallpapers -> ../../share/wallpapers

only applnk is a real directory. As a minimal requirement remove everything except:

Settings/Peripherals/mouse.desktop

Settings/LookNFeel/background.desktop

                  /colors.desktop

                  /kwinoptions.desktop

                  /style.desktop

                  /virtualdesktops.desktop
under /usr/local/kde/restricted_kdedir/share/applnk

Share or Research:

Share on FB Post to X LinkedIn 🤖 Ask AI about this