[opensuse-kde] changing kde4.4 defaults

Hi all, I'm a system administrator and I will soon upgrade our systems running opensuse_11.1/kde_3.5 to opensuse_11.3/kde_4.4. I order to satisfy our users requests, I make several changes to the default configuration of the kde desktop. In this way I don't have to explain over and over again how to do this and how to change that. For several changes, it was quite easy to find the corresponding file to modify in kde4.4. Unfortunately, there are some things that I was able to setup in kde3.5 but I cannot find the right equivalent in kde 4.4. Here is the list of what I would like to change: 1) With kde3.5 putting: [General] LegacyKMenu=true in /etc/opt/kde3/share/config/kickerrc I was able to make the Classic Menu Style the default instead of the Kickoff Menu Style. What's the equivalent for kde4.4? 2) How can I add or replace a default widget/icon in the panel? I would like to add a couple of buttons right of the firefox and dolphin icons in the panel. 3) How can I add another default applet running in the System Tray? like KRandRTray for example? 3) How to add another default widget in the right side of the panel? 4) How to change the default configuration of a widget (Digital Clock for example)? Of course, the preferred way to make such changes would be to edit files in share/config, but if that's not possible, any other way to accomplish what I need is welcome. Giacomo Comes -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kde+help@opensuse.org

On Monday 04 October 2010 18:01:50 Giacomo Comes wrote:
Hi all, I'm a system administrator and I will soon upgrade our systems running opensuse_11.1/kde_3.5 to opensuse_11.3/kde_4.4. I order to satisfy our users requests, I make several changes to the default configuration of the kde desktop. In this way I don't have to explain over and over again how to do this and how to change that.
For several changes, it was quite easy to find the corresponding file to modify in kde4.4. Unfortunately, there are some things that I was able to setup in kde3.5 but I cannot find the right equivalent in kde 4.4.
1), 2), 3'), 4) can be established by modifying the desktop scripts that run on login as described at http://techbase.kde.org/KDE_System_Administration/PlasmaDesktopScripting However I would recommend KDE 4.5 from KDE:Release:45 instead of KDE 4.4 from vanilla 11.3, since the scripting there is much more mature. We have a 4.5 respin available here: http://home.kde.org/~kdelive/#reloaded Scripts mentioned below may only exist in a 4.5 based system, but the architecture for desktop scripting is the same in 4.4.
Here is the list of what I would like to change:
1) With kde3.5 putting: [General] LegacyKMenu=true in /etc/opt/kde3/share/config/kickerrc I was able to make the Classic Menu Style the default instead of the Kickoff Menu Style. What's the equivalent for kde4.4?
2) How can I add or replace a default widget/icon in the panel? I would like to add a couple of buttons right of the firefox and dolphin icons in the panel.
See /usr/share/kde4/apps/plasma-desktop/init/00-defaultLayout.js The layout org.kde.plasma-desktop.defaultPanel referenced at the end of the script is found at /usr/share/kde4/apps/plasma/layout- templates/org.kde.plasma-desktop.defaultPanel/contents/layout.js
3) How can I add another default applet running in the System Tray? like KRandRTray for example?
Copy its .desktop file to /usr/share/autostart/ (or individual users' ~/.config/autostart/). Add OnlyShowIn=KDE if you have users on other desktops who should not have it running.
3) How to add another default widget in the right side of the panel?
As per 2)
4) How to change the default configuration of a widget (Digital Clock for example)?
You can modify config in the init scripts too. As an example, consider this update script /usr/share/kde4/apps/plasma-desktop/updates/systray-to- notifications-widget.js which modifies the system tray widget from 4.4 to the notification widget in 4.5. (Update scripts are run to modify existing config, init scripts run to create new config).
Of course, the preferred way to make such changes would be to edit files in share/config, but if that's not possible, any other way to accomplish what I need is welcome.
The smart way to carry the above out, once you have made it work, would be to create a package containing your organisation's desktop config in the OBS and add this to the package list for your default install, or even create a custom disk image including this script package using SUSE Studio. HTH Will -- Will Stephenson, openSUSE Team SUSE LINUX Products GmbH - Nürnberg - AG Nürnberg - HRB 16746 - GF: Markus Rex -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kde+help@opensuse.org

On Monday 04 Oct 2010 21:54:51 Will Stephenson wrote:
We have a 4.5 respin available here: http://home.kde.org/~kdelive/#reloaded
The links on that page appear to be broken? Anne -- KDE Community Working Group New to KDE Software? - get help from http://userbase.kde.org

On Tuesday 05 October 2010 10:45:02 Anne Wilson wrote:
On Monday 04 Oct 2010 21:54:51 Will Stephenson wrote:
We have a 4.5 respin available here: http://home.kde.org/~kdelive/#reloaded
The links on that page appear to be broken?
Good grief, not another breakage. Publish was supposed to be disabled on that repo until we had 4.5.2 nailed down. I have updated the links on that page. Will -- Will Stephenson, KDE Developer, openSUSE Boosters Team SUSE LINUX Products GmbH - Nürnberg - AG Nürnberg - HRB 16746 - GF: Markus Rex -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kde+help@opensuse.org

On Mon, Oct 04, 2010 at 10:54:51PM +0200, Will Stephenson wrote:
On Monday 04 October 2010 18:01:50 Giacomo Comes wrote:
Hi all, I'm a system administrator and I will soon upgrade our systems running opensuse_11.1/kde_3.5 to opensuse_11.3/kde_4.4. I order to satisfy our users requests, I make several changes to the default configuration of the kde desktop. In this way I don't have to explain over and over again how to do this and how to change that.
For several changes, it was quite easy to find the corresponding file to modify in kde4.4. Unfortunately, there are some things that I was able to setup in kde3.5 but I cannot find the right equivalent in kde 4.4.
1), 2), 3'), 4) can be established by modifying the desktop scripts that run on login as described at
http://techbase.kde.org/KDE_System_Administration/PlasmaDesktopScripting
Thanks for the reply. Your answer is exactly what I was looking for. In the past weeks, when I was looking around for a way to configure the desktop I did find this web page, but the files and directories referenced in it (.js files in plasma-desktop/init/) do not exist in opensuse_11.3/kde_4.4 so I (wrongly) assumed that the information contained in the web page didn't aply to the version of kde I'm using.
However I would recommend KDE 4.5 from KDE:Release:45 instead of KDE 4.4 from vanilla 11.3, since the scripting there is much more mature.
I think I will stick to kde 4.4 for the moment. I have monitored the packages in KDE:Release:45 and they are changing almost on daily basis. Once that repository shows a more stable behavior I may consider to switch.
Scripts mentioned below may only exist in a 4.5 based system, but the architecture for desktop scripting is the same in 4.4.
Here is the list of what I would like to change:
1) With kde3.5 putting: [General] LegacyKMenu=true in /etc/opt/kde3/share/config/kickerrc I was able to make the Classic Menu Style the default instead of the Kickoff Menu Style. What's the equivalent for kde4.4?
2) How can I add or replace a default widget/icon in the panel? I would like to add a couple of buttons right of the firefox and dolphin icons in the panel.
See /usr/share/kde4/apps/plasma-desktop/init/00-defaultLayout.js The layout org.kde.plasma-desktop.defaultPanel referenced at the end of the script is found at /usr/share/kde4/apps/plasma/layout- templates/org.kde.plasma-desktop.defaultPanel/contents/layout.js
3) How can I add another default applet running in the System Tray? like KRandRTray for example?
Copy its .desktop file to /usr/share/autostart/ (or individual users' ~/.config/autostart/). Add OnlyShowIn=KDE if you have users on other desktops who should not have it running.
3) How to add another default widget in the right side of the panel?
As per 2)
4) How to change the default configuration of a widget (Digital Clock for example)?
You can modify config in the init scripts too. As an example, consider this update script /usr/share/kde4/apps/plasma-desktop/updates/systray-to- notifications-widget.js which modifies the system tray widget from 4.4 to the notification widget in 4.5. (Update scripts are run to modify existing config, init scripts run to create new config).
So, what I have done is to create in openSUSE 11.3 the directory /usr/share/kde4/apps/plasma-desktop/init and create there the file 00-defaultLayout.js. Its content is mostly cut and past from 00-defaultLayout.js and plasma/layout-templates/ork.kde.plasma-desktop.defaultPanel/contents/layout.js from kde4.5 with some modification in order to have exactly the same look of the default kde4.4 desktop. ################# BEGIN 00-defaultLayout.js ################### var topLeftScreen = 0 var rect = screenGeometry(0) // find our "top left" screen to put the folderview on it for (var i = 1; i < screenCount; ++i) { var g = screenGeometry(i) if (g.x <= rect.x && g.top >= rect.top) { rect = g topLeftScreen = i } } for (var i = 0; i < screenCount; ++i) { var desktop = new Activity desktop.screen = i desktop.wallpaperPlugin = 'image' desktop.wallpaperMode = 'SingleImage' print("for screen " + i) if (i == topLeftScreen) { var folderview = desktop.addWidget("folderview") folderview.writeConfig("url", "desktop:/") folderview.reloadConfig() } } 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 = 28 var widget = panel.addWidget("launcher") widget.globalShortcut = "Alt+F1" panel.addWidget("showdashboard") var widget = panel.addWidget("icon") widget.writeConfig("Url", "file:///usr/share/applications/MozillaFirefox.desktop") var widget = panel.addWidget("icon") widget.writeConfig("Url", "file:///usr/share/applications/kde4/dolphin.desktop") panel.addWidget("pager") panel.addWidget("tasks") panel.addWidget("systemtray") panel.addWidget("digital-clock") panel.addWidget("lockout") ################# END 00-defaultLayout.js ################### The script works, but it has one problem. On the first login (or after erasing ~/.kde4/share/config/plasma-desktop-appletsrc) it creates the panel as expected, but the desktop is totally black (no wallpaper or folderview widget). After logout and login, the desktop is there and everithing is ok. How can I avoid the black desktop on the first login? Giacomo -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kde+help@opensuse.org

On Friday 08 October 2010 16:00:09 Giacomo Comes wrote:
On Mon, Oct 04, 2010 at 10:54:51PM +0200, Will Stephenson wrote:
On Monday 04 October 2010 18:01:50 Giacomo Comes wrote:
Hi all, I'm a system administrator and I will soon upgrade our systems running opensuse_11.1/kde_3.5 to opensuse_11.3/kde_4.4. I order to satisfy our users requests, I make several changes to the default configuration of the kde desktop. In this way I don't have to explain over and over again how to do this and how to change that.
For several changes, it was quite easy to find the corresponding file to modify in kde4.4. Unfortunately, there are some things that I was able to setup in kde3.5 but I cannot find the right equivalent in kde 4.4.
1), 2), 3'), 4) can be established by modifying the desktop scripts that run on login as described at
http://techbase.kde.org/KDE_System_Administration/PlasmaDesktopScripting
Thanks for the reply. Your answer is exactly what I was looking for. In the past weeks, when I was looking around for a way to configure the desktop I did find this web page, but the files and directories referenced in it (.js files in plasma-desktop/init/) do not exist in opensuse_11.3/kde_4.4 so I (wrongly) assumed that the information contained in the web page didn't aply to the version of kde I'm using.
However I would recommend KDE 4.5 from KDE:Release:45 instead of KDE 4.4 from vanilla 11.3, since the scripting there is much more mature.
I think I will stick to kde 4.4 for the moment. I have monitored the packages in KDE:Release:45 and they are changing almost on daily basis. Once that repository shows a more stable behavior I may consider to switch.
This is due to the KDE 4.5.2 release last week and some organisational problems we had in implementing the switch from 4.5.1 that caused work-in- progress packages to be published. In normal operation you should only see upstream version updates although we reserve the right to publish important bugfixes before upstream releases.
Scripts mentioned below may only exist in a 4.5 based system, but the architecture for desktop scripting is the same in 4.4.
Here is the list of what I would like to change:
1) With kde3.5 putting: [General] LegacyKMenu=true in /etc/opt/kde3/share/config/kickerrc I was able to make the Classic Menu Style the default instead of the Kickoff Menu Style. What's the equivalent for kde4.4?
2) How can I add or replace a default widget/icon in the panel? I would like to add a couple of buttons right of the firefox and dolphin icons in the panel.
See /usr/share/kde4/apps/plasma-desktop/init/00-defaultLayout.js The layout org.kde.plasma-desktop.defaultPanel referenced at the end of the script is found at /usr/share/kde4/apps/plasma/layout- templates/org.kde.plasma-desktop.defaultPanel/contents/layout.js
3) How can I add another default applet running in the System Tray? like KRandRTray for example?
Copy its .desktop file to /usr/share/autostart/ (or individual users' ~/.config/autostart/). Add OnlyShowIn=KDE if you have users on other desktops who should not have it running.
3) How to add another default widget in the right side of the panel?
As per 2)
4) How to change the default configuration of a widget (Digital Clock for example)?
You can modify config in the init scripts too. As an example, consider this update script /usr/share/kde4/apps/plasma-desktop/updates/systray-to- notifications-widget.js which modifies the system tray widget from 4.4 to the notification widget in 4.5. (Update scripts are run to modify existing config, init scripts run to create new config).
So, what I have done is to create in openSUSE 11.3 the directory /usr/share/kde4/apps/plasma-desktop/init and create there the file 00-defaultLayout.js. Its content is mostly cut and past from 00-defaultLayout.js and plasma/layout-templates/ork.kde.plasma-desktop.defaultPanel/contents/layout .js from kde4.5 with some modification in order to have exactly the same look of the default kde4.4 desktop.
################# BEGIN 00-defaultLayout.js ###################
var topLeftScreen = 0 var rect = screenGeometry(0)
// find our "top left" screen to put the folderview on it for (var i = 1; i < screenCount; ++i) { var g = screenGeometry(i)
if (g.x <= rect.x && g.top >= rect.top) { rect = g topLeftScreen = i } }
for (var i = 0; i < screenCount; ++i) { var desktop = new Activity desktop.screen = i desktop.wallpaperPlugin = 'image' desktop.wallpaperMode = 'SingleImage'
print("for screen " + i) if (i == topLeftScreen) { var folderview = desktop.addWidget("folderview") folderview.writeConfig("url", "desktop:/") folderview.reloadConfig() } }
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 = 28 var widget = panel.addWidget("launcher") widget.globalShortcut = "Alt+F1" panel.addWidget("showdashboard") var widget = panel.addWidget("icon") widget.writeConfig("Url", "file:///usr/share/applications/MozillaFirefox.desktop") var widget = panel.addWidget("icon") widget.writeConfig("Url", "file:///usr/share/applications/kde4/dolphin.desktop") panel.addWidget("pager") panel.addWidget("tasks") panel.addWidget("systemtray") panel.addWidget("digital-clock") panel.addWidget("lockout")
################# END 00-defaultLayout.js ###################
The script works, but it has one problem. On the first login (or after erasing ~/.kde4/share/config/plasma-desktop-appletsrc) it creates the panel as expected, but the desktop is totally black (no wallpaper or folderview widget). After logout and login, the desktop is there and everithing is ok. How can I avoid the black desktop on the first login?
I think this could be a bug in KDE 4.4 that was fixed in 4.5. Many of the Plasma components did not reload their configuration when configured by scripts, so the changed configuration is only used after a quit and restart of plasma-desktop. Can you test your modifications in a 4.5 system and see they work as planned there? Will -- Will Stephenson, KDE Developer, openSUSE Boosters Team SUSE LINUX Products GmbH - Nürnberg - AG Nürnberg - HRB 16746 - GF: Markus Rex -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kde+help@opensuse.org

On Fri, Oct 08, 2010 at 04:16:36PM +0200, Will Stephenson wrote:
So, what I have done is to create in openSUSE 11.3 the directory /usr/share/kde4/apps/plasma-desktop/init and create there the file 00-defaultLayout.js. Its content is mostly cut and past from 00-defaultLayout.js and plasma/layout-templates/ork.kde.plasma-desktop.defaultPanel/contents/layout .js from kde4.5 with some modification in order to have exactly the same look of the default kde4.4 desktop.
################# BEGIN 00-defaultLayout.js ###################
var topLeftScreen = 0 var rect = screenGeometry(0)
// find our "top left" screen to put the folderview on it for (var i = 1; i < screenCount; ++i) { var g = screenGeometry(i)
if (g.x <= rect.x && g.top >= rect.top) { rect = g topLeftScreen = i } }
for (var i = 0; i < screenCount; ++i) { var desktop = new Activity desktop.screen = i desktop.wallpaperPlugin = 'image' desktop.wallpaperMode = 'SingleImage'
print("for screen " + i) if (i == topLeftScreen) { var folderview = desktop.addWidget("folderview") folderview.writeConfig("url", "desktop:/") folderview.reloadConfig() } }
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 = 28 var widget = panel.addWidget("launcher") widget.globalShortcut = "Alt+F1" panel.addWidget("showdashboard") var widget = panel.addWidget("icon") widget.writeConfig("Url", "file:///usr/share/applications/MozillaFirefox.desktop") var widget = panel.addWidget("icon") widget.writeConfig("Url", "file:///usr/share/applications/kde4/dolphin.desktop") panel.addWidget("pager") panel.addWidget("tasks") panel.addWidget("systemtray") panel.addWidget("digital-clock") panel.addWidget("lockout")
################# END 00-defaultLayout.js ###################
The script works, but it has one problem. On the first login (or after erasing ~/.kde4/share/config/plasma-desktop-appletsrc) it creates the panel as expected, but the desktop is totally black (no wallpaper or folderview widget). After logout and login, the desktop is there and everithing is ok. How can I avoid the black desktop on the first login?
I think this could be a bug in KDE 4.4 that was fixed in 4.5. Many of the Plasma components did not reload their configuration when configured by scripts, so the changed configuration is only used after a quit and restart of plasma-desktop. Can you test your modifications in a 4.5 system and see they work as planned there?
Will
Yes they work fine in 4.5. Is there a way to make it work properly in 4.4? May be triggering an automatic logout on the first login? Giacomo -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kde+help@opensuse.org
participants (3)
-
Anne Wilson
-
Giacomo Comes
-
Will Stephenson