You are not logged in.

1

Wednesday, October 11th 2006, 10:05am

Scripting Kontact resource changes

I've just got eGroupware set up and synchronising with Kontact - on my machine. Now I need to modify 56 user machines to do the same.

Are there command line ways to add a resource and set it as default so I can write a script and run it across my network?

I'd love for the beancounters to see my timesheet looking something like:
Configure 40 Linux machines to use eGroupware - 30 mins
Configure 16 Windows machines to use eGroupware - 4 hours

:)
>--- Novensiles divi Flamen ---<
>----- Miles Militis Fons -----<

bram85

Professional

Posts: 948

Location: Eindhoven

Occupation: Software Engineer

  • Send private message

2

Wednesday, October 11th 2006, 1:35pm

RE: Scripting Kontact resource changes

Run as root:

Source code

1
2
3
4
5
6
7
USERS="fry leela bender"

for MY_USER in $USERS; do
  cp /home/yourusername/.kde/share/config/kresources/calendar/stdrc /home/$MY_USER/.kde/share/config/kresources/calendar
  cp /home/yourusername/.kde/share/config/kresources/contact/stdrc /home/$MY_USER/.kde/share/config/kresources/contact
  cp /home/yourusername/.kde/share/config/kresources/notes/stdrc /home/$MY_USER/.kde/share/config/kresources/notes
done


Assuming that all users have their homedir in /home and have Kontact *not* running. It copies all configured resources. And, last but not least, I didn't check for syntax errors ;)
Bram Schoenmakers
KDE Netherlands (www.kde.nl)

3

Wednesday, October 11th 2006, 2:16pm

I just had a look at the stdrc files contained insode those directories... looks like we have a winner!

I just have one question - are the resource keys randomly generated, in which case if I just copy my configs across will they end up losing their 'Default Resource'? I'm going to try this on the test machine anyway when I get back to work in the morning... thank you very much for pointing out that *incredibly* simple solution 8)
>--- Novensiles divi Flamen ---<
>----- Miles Militis Fons -----<