Tricky one:
You have to create a script and create a program button on the desktop for it
Script looks like this
[code:1]
#!/bin/bash
dcop kdesktop "$(dcop kdesktop qt objects | grep sort_nci)" activate
[/code:1]
For interested readers:
sort_nci seems to be the menu action for "sort by name"
[code:1]
dcop kdesktop qt object
[/code:1]
lists all Qt objects in KDesktop which are available through DCOP.
The grep then isolates the action we are interested in.
The full call then tells KDesktop to activate it, just like if it would have been clicked.
Cheers,
_