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