Home
OcsRails
OcsRails is a server-side implementation of the Open Collaboration Services (OCS) specification. OCS is used by KDE to implement the Social Desktop and Get Hot New Stuff (GHNS) functionality. OcsRails can be run as a standalone server backend for these technologies.
Getting started
This small getting started guide will explain how to get OcsRails running as a back-end server for the Plasma Get New Wallpapers dialog.
OcsRails
To run OcsRails you’ll need the following software installed on your machine:
- Ruby (tested with 1.8.7)
- Rails 2.3 (requires RubyGems)
- Ruby SQLite3 library
Once you've cloned the OcsRails repository you can create a database by running rake db:migrate while inside the ocs_rails directory. Next you can import the wallpapers from your /usr/share/wallpapers directory by running ./script/runner lib/import_wallpapers.rb. You can start OcsRails with ./script/server.
If you plan on connecting to your OcsRails server from other machine then your localhost, you’ll have to make a change to the configuration of OcsRails. Change ‘localhost’ in the THIS_HOST variable to your IP address in the config/environments/development.rb file and restart the OcsRails server.
KDE
KNewStuff3
The KNewStuff3 library in KDE 4.4.0 needs a small change in order to work with OcsRails. I haven’t tested this a lot, so use at your own risk!
Remove or comment out lines 146 to 148 of kdelibs/knewstuff/knewstuff3/attica/atticaprovider.cpp, they should look like this:
if (provider.baseUrl() != QUrl("https://api.opendesktop.org/v1/")) {
return;
}
Rebuild kdelibs (or just the knewstuff3 library) after this.
Plasma
In order to make Plasma aware of your OcsRails server, you’ll have to add a configuration file to your .kde folder. Create a file in ~/.kde/share/config/wallpaper.knsrc with the following contents:
[KNewStuff3]
ProvidersUrl=http://localhost:3000/config/provider
Categories=KDE Wallpaper 800x600,KDE Wallpaper 1024x768,KDE Wallpaper 1280x1024,KDE Wallpaper 1440x900,KDE Wallpaper 1600x1200,KDE Wallpaper 1680x1050,KDE Wallpaper 1920x1200,KDE Wallpaper 2560x1600
StandardResource=wallpaper
Restart Plasma, go to the change wallpaper dialog and click the Get New Wallpapers… button. You should now see a list of wallpapers coming from your OcsRails server.

