LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-18-2013, 01:00 AM   #1
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Create a custom user profile for KDE4


Hi,

My custom "lightweight" KDE 4.10.5 desktop for Slackware 14.0 is currently being finished and polished up. I have yet to sand down some rough edges and add a few missing bits. Right now I'm creating the default user profile for the KDE desktop, e. g. the desktop's default configuration when a user is created. I'm encountering a few problems with that.

Compared to the vanilla KDE configuration, the custom user profile here includes a few sensible defaults. Here's what I got so far to make KDE4 more Joe-Sixpack-friendly (see screenshot below to get a rough idea):
  • Increase kicker panel height.
  • Replace default quickstart buttons on the kicker panel by a handful of custom ones for Firefox, Thunderbird and Open Office.
  • Add these same applications to Favourites in the Kickoff menu.
  • Add a shutdown button to the lower right side of the kicker.
  • Deactivate graphic effects (for low-spec hardware).
  • Deactivate semantic desktop and file indexation (for low-spec hardware).
  • Change mouse cursor theme and enable double-click.
  • Define Firefox and Thunderbird as default web browser and mail client.
  • Change desktop default to "Folder View" with ~/Desktop as default folder.
  • Choose a neutral wallpaper.

Creating a custom profile for a desktop environment like Xfce is dead simple. All you have to do is create a template user, configure the desktop, then copy all of /home/template/.config to /etc/skel (make a package eventually), and that's it. With KDE, things are more complicated, as it seems.

Application settings are stored in ~/.kde/share/config, in a series of files. Now of course I could grab all these files and copy them over to /etc/skel. Here's a summary of the problems that arise.

Some configuration defaults in plasma-desktop-appletsrc, for example, use hardcoded geometry, like this:

Code:
[Containments][1]
activity=
activityId=
desktop=-1
formfactor=2
geometry=0,-40,1280,34
immutability=1
lastDesktop=-1
lastScreen=0
location=4
plugin=panel
screen=0
zvalue=0
This is on a PC with a 19" screen, with 1280x1024 resolution. Now if I package this profile and move it to another computer with a different (smaller or bigger) resolution, the new user's default panel will be either too wide or too small. Hmmmmm.

Some configuration details seem to hardcode the user, like here for example:

Code:
[Containments][1][Applets][27][Configuration]
Url=file:///home/kikinovak
When I configure Thunderbird as a default mail client, this gets reflected in ~/.kde/share/config/emaildefaults, which looks like this:

Code:
[Defaults]
Profile=Par défaut

[PROFILE_Par défaut]
EmailClient[$e]=thunderbird
ServerType=
TerminalClient=false
Now my system is in french, hence the profile name. But my users are not all french, they also use english and german on their desktops.

I'm a little bit stuck on this one, and I'd be grateful for any help and/or suggestion.

Cheers,

Niki
Attached Thumbnails
Click image for larger version

Name:	kde-config.jpg
Views:	95
Size:	88.5 KB
ID:	13224  

Last edited by kikinovak; 08-18-2013 at 01:03 AM.
 
Old 08-18-2013, 02:06 PM   #2
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
I spent the best part of a sunny summer Sunday on this, and I'm just starting to get anything near a result. Which is quite unexpected actually, because the correct way to do things is to script the default profile. See attached screenshot.

Thanks to pprkut and AlienBob on #slackbuilds for the precious help.
Attached Thumbnails
Click image for larger version

Name:	kde-profile.jpg
Views:	102
Size:	118.4 KB
ID:	13228  
 
Old 08-18-2013, 03:15 PM   #3
solarfields
Senior Member
 
Registered: Feb 2006
Location: slackalaxy.com
Distribution: Slackware, CRUX
Posts: 1,449

Rep: Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997
Hi and thanks for your work on trimming down KDE! Have you considered making a repository for it that could be used with slackpkg plus?
 
Old 08-18-2013, 03:20 PM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105
Quote:
Originally Posted by solarfields View Post
Hi and thanks for your work on trimming down KDE! Have you considered making a repository for it that could be used with slackpkg plus?
His repository _is_ compatible with slackpkg+ . In fact, slackpkgplus.conf already has a commented-out example of the MLES/MLED repositories, it will be easy to add MLWS as well. See https://github.com/zuno/slackpkgplus....x86_64.sample .
 
1 members found this post helpful.
Old 08-19-2013, 04:45 AM   #5
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
I did a lot of experimenting yesterday evening and this morning. So far I have a quite usable default configuration. Here's my 00-defaultLayout.js:

Code:
loadTemplate("org.kde.plasma-desktop.defaultPanel")

for (var i = 0; i < screenCount; ++i) {
    var desktop = new Activity
    desktop.name = i18n("Workstation")
    desktop.screen = i
    desktop.wallpaperPlugin = 'image'
    desktop.wallpaperMode = 'SingleImage'
    var wallpaper = "Ethais"
    desktop.currentConfigGroup = new Array("Wallpaper", "image")
    desktop.writeConfig("wallpaper", wallpaper)
    desktop.writeConfig("userswallpaper", wallpaper)

    //Create more panels for other screens
    if (i > 0){
        var panel = new Panel
        panel.screen = i
        panel.location = 'bottom'
        panel.height = panels()[i].height = screenGeometry(0).height > 1024 ? 35 : 27
        var tasks = panel.addWidget("tasks")
        tasks.writeConfig("showOnlyCurrentScreen", true);
    }
}
And here's the corresponding layout.js:

Code:
var panel = new Panel
if (panelIds.length == 1) {
    // we are the only panel, so set the location for the user
    panel.location = 'bottom'
}

panel.height = screenGeometry(panel.screen).height > 1024 ? 70 : 54
panel.addWidget("launcher")
tasks = panel.addWidget("tasks")
panel.addWidget("systemtray")
panel.addWidget("digital-clock")
panel.addWidget("lockout")

tasks.currentConfigGroup = new Array("Launchers")
tasks.writeConfig("browser", "preferred://browser, , , ")
tasks.writeConfig("filemanager", "preferred://filemanager, , , ")
What I could manage so far:
  • Have a bigger panel (some of the users complain about small icons)
  • Don't show the activity button next to the Kickoff menu
  • Define a more "corporate" default wallpaper (Ethais is perfect)
  • Add a default shutdown button on the lower right side of the panel

I did this mainly by looking at other folks' mods on the web, and trying to figure out how I can adapt them for my own needs. I'm moving in very small steps, with a lot of trial and error.

Now here's some more things I'd like to do this way (e. g. by scripting), but I don't know how to go about it, in terms of mere syntax. I'll describe them in plain english:
  • Add some custom launchers to the Kickoff menu ("Favoris").
  • Deactivate all graphical effects (for low-spec hardware).
  • Deactivate the semantic desktop and file indexation (for the same reason).
  • Change mouse cursor to Whiteglass theme
  • Default to double click.
  • Default the desktop to "Folder View" for ~/Desktop.
  • Define Firefox as the default web browser.
  • Define Thunderbird as the default mail client.
  • Plasma widgets are locked by default.
  • Kiosk mode would be even better, e. g. most things become immutable.

If you have one or more suggestions for any of the points above, I'd be grateful. For now, "I've reached the end of my latin", as we say in my native Austria.

Cheers,

Niki

Last edited by kikinovak; 08-19-2013 at 04:49 AM.
 
Old 08-19-2013, 05:54 AM   #6
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
OK, I managed to go further in my default configuration. I edited a series of small files in /etc/skel/.kde/share/config to alter KDE's default configuration.

emaildefaults:

Code:
[Defaults]
Profile=Default

[PROFILE_Default]
EmailClient[$e]=thunderbird

kcminputrc:

Code:
[Mouse]
cursorTheme=whiteglass

kdeglobals:

Code:
[KDE]
SingleClick=false

[General]
BrowserApplication[$e]=mozilla-firefox.desktop
EmailClient[$e]=thunderbird

kickoffrc:

Code:
[Favorites]
FavoriteURLs=/usr/share/applications/mozilla-firefox.desktop,/usr/share/applications/mozilla-thunderbird.desktop,/opt/openoffice4/share/xdg/startcenter.desktop,/usr/share/applications/audacious.desktop,/usr/share/applications/kde4/dolphin.desktop

kwinrc:

Code:
[Compositing]
Enabled=false

nepomukserverrc:

Code:
[Basic Settings]
Start Nepomuk=false

[Service-nepomukfileindexer]
autostart=false

Everything works now as expected (again, after lots of trial & error). Which means I only have one last thing to configure, and I don't know how to figure that out:

How can I have widgets default to locked? Users can unlock them afterwards eventually, though I'd like to know how I can theoretically lock everything down for good.

I'd be really grateful to know that, as it would allow to wrap this up.

Cheers,

Niki
 
1 members found this post helpful.
Old 08-19-2013, 09:04 AM   #7
sardinha
Member
 
Registered: Aug 2012
Location: Portugal
Distribution: Slackware, Salix OS
Posts: 55

Rep: Reputation: 10
immutability=2

kikinovak,

Maybe you can find an answer seeing what's changing when "block" or "unblock" the widgets in this file .kde/share/config/plasma-desktop-appletsrc (the key are the immutability options from 1 to 2):

Code:
# diff -U 3 -dHrN -- plasma-desktop-appletsrc_blocked_widgets plasma-desktop-appletsrc_unblocked_widgets
--- plasma-desktop-appletsrc_blocked_widgets    2013-08-19 14:53:18.096440828 +0100                                                                                                                        
+++ plasma-desktop-appletsrc_unblocked_widgets  2013-08-19 14:53:39.070178620 +0100                                                                                                                        
@@ -21,8 +21,8 @@                                                                                                                                                            
RightButton;NoModifier=contextmenu                                                                                                                            

 [Containments][1][Applets][14]                                                                                                                                                                            
-geometry=1390,2,50,25                                                                                                                                                                                     
-immutability=2                                                                                                                                                                                            
+geometry=1366,2,50,25                                                                                                                                                                                     
+immutability=1                                                                                                                                                                                            
 plugin=lockout                                                                                                                                                                                            
 zvalue=0                                                                                                                                                                                                  
                                                                                                                                                                                                           
@@ -63,8 +63,8 @@                                                                                                                                                                                          
 Order=2                                                                                                                                                                                                   
                                                                                                                                                                                                           
 [Containments][1][Applets][5]                                                                                                                                                                             
-geometry=62,2,1132,25                                                                                                                                                                                     
-immutability=2                                                                                                                                                                                            
+geometry=62,2,1108,25                                                                                                                                                                                     
+immutability=1                                                                                                                                                                                            
 plugin=tasks
 zvalue=0
 
@@ -76,8 +76,8 @@
 Order=3
 
 [Containments][1][Applets][6]
-geometry=1198,2,134,25
-immutability=2
+geometry=1174,2,134,25
+immutability=1
 plugin=systemtray
 zvalue=0
 
@@ -134,8 +134,8 @@
 Order=4
 
 [Containments][1][Applets][7]
-geometry=1336,2,50,25
-immutability=2
+geometry=1312,2,50,25
+immutability=1
 plugin=digital-clock
 zvalue=0
 
@@ -220,4 +220,4 @@
 wallpaperposition=0
 
 [General]
-immutability=2
+immutability=1
 
Old 08-19-2013, 11:20 AM   #8
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by sardinha View Post
kikinovak,

Maybe you can find an answer seeing what's changing when "block" or "unblock" the widgets in this file .kde/share/config/plasma-desktop-appletsrc (the key are the immutability options from 1 to 2):
Nah, I just found it. It's actually just a one-liner, to be put in 00-defaultLayout.js.

The KDE mailing list is actually very helpful with this.
 
Old 08-19-2013, 05:57 PM   #9
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
[Much later...]

One more nut cracked.

Code:
Mon Aug 19 19:15:33 CEST 2013
microlinux-wallpapers-1.0-noarch-1_microlinux.txz: Added.
kde-wallpapers-4.10.5-i486-2_microlinux.txz: Rebuilt.
kde-base-artwork-4.10.5-i486-2_microlinux.txz: Rebuilt.
	Added a dirty hack to both packages which allows a consistent background
	image for the login manager, the splash screen and the main desktop.
kde-workspace-4.10.5-i486-2_microlinux.txz: Rebuilt.
  Added the system-wide part of a custom Joe-Sixpack-friendly user profile.
user-settings-kde-4.10.5-noarch-1_microlinux.txz: Added.
  The userspace part of our custom user profile.
+--------------------------+
Only a few to go.
 
Old 08-20-2013, 04:38 AM   #10
emgee_1
Member
 
Registered: Aug 2009
Location: Nijmegen, The Netherlands
Distribution: Slackware 14
Posts: 42

Rep: Reputation: 6
Did you ever consider recoll as a desktop search tool?

Hi Niki,

Did you ever consider recoll as a desktop search tool?

It has xapian-core as dependency, which is useful if you also use mutt with notmuch or even notmuch in emacs.

recoll can run as a daemon and index your specific desktop search needs flawlessly.

It even can be used as a helper app in dolphin.

Just an idea.

Thank you for your great contributions.

Greetings

Marcel Geijsberts
 
Old 08-20-2013, 05:50 AM   #11
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by emgee_1 View Post
Hi Niki,

Did you ever consider recoll as a desktop search tool?
Not really, but thanks for the suggestion. I doubt my average user will use Mutt and/or Emacs. They already have a hard time figuring out Thunderbird.

The file search tools shipping with KDE already work quite well, at least in version 4.10.5. Only I decided to deactivate them in the default configuration - as I did with all the graphics effects - so folks can run the whole desktop even on low-spec hardware. Of course, everything can be (re)activated on more recent PCs. BTW, I tested everything on a battered 13 year old NEC Powermate (PIV 2.4 GHz, 512 MB RAM), and it runs correctly, using 175 MB RAM with the KDE desktop started. I'm also already running it on my main workhorse PC, and I love it. Feeling is similar to driving my old Mercedes.

Cheers,

Niki
Attached Thumbnails
Click image for larger version

Name:	kde.jpg
Views:	44
Size:	255.4 KB
ID:	13233  

Last edited by kikinovak; 08-20-2013 at 05:53 AM.
 
  


Reply

Tags
kde, profile


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create user add button through webmin custom command studyete Linux - Server 7 05-01-2013 12:33 PM
Terminal Profile Strangeness with KDE4.2 MQMan Slackware 2 02-27-2009 01:29 PM
Create profile for user? jays Red Hat 1 11-09-2006 03:14 AM
Create custom user's directory with simple script dtournas Programming 2 09-09-2004 05:00 AM
How do I create a default user profile in Linux Sm1ler Linux - General 2 07-01-2004 07:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration