Re: [kde] Changing the Web browsers cache setting through dcop



Hi Kevin,

I have written a small script that checks for a network connection during
suspend/resume.

If there is no network, kmail will be configured to be offline, for
example.

Now I would like to configure the konqueror cache in a same way. I can
change this setting through

kcontrol -> Internet & Network -> Web Browser -> Cache

However, I didn't find a way to control this via dcop. Does anybody know
if it is possible?

Cache settings could be part of a configuration file, possibly one for the
IO slaves.

One can use kwriteconfig to change values in those files, however having
application reload them might be difficult (possible though, there is a
script on kde-apps.org which does this to re-read proxy settings)

Yeah, that was very helpful. The problem is solved.

For the records, here is my little script to change a config setting and
reparse all konquerors afterwards:

=== cut ===
#!/bin/sh

case $1 in
offline) ACTION="offline" && VALUE="CacheOnly" ;;
*) ACTION="online" && VALUE="Refresh" ;;
esac

echo "Going $ACTION..."

# Changing configuration
sed -i s/^cache=.*/cache=$VALUE/ ~/.kde/share/config/kio_httprc

# Fetch a list of all running kde applications
APPS=$(dcop)

# Define which apps you would like to apply the setting to
# (other applications will not notice the change before the next restart)
APPLYTO="konqueror kcontrol"

for i in ${APPS}; do
echo "$APPLYTO" | grep -vq "$(echo $i | sed -e 's/-[0-9]*$//')" && continue
# echo "Using $i ..."
dcop $i KIO::Scheduler reparseSlaveConfiguration http # 2>/dev/null
done

=== cut ===

Regards, michael

___________________________________________________
This message is from the kde mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.



Relevant Pages

  • help with a home network jumpstart
    ... I have the blade running BIND 8 to serve DNS to the home network. ... Here's the output of the boot net - install: ... Using RPC Bootparams for network configuration information. ... Using begin script: install_begin ...
    (SunManagers)
  • Jumpstart: syntax error and trying to load from /cdrom media, which disk to use for Solaris 8 image
    ... I'm not sure if I need to use that disk or the Solaris 8 Installation ... Using RPC Bootparams for network configuration information. ... Using finish script: diag_drv.fin ... Executing JumpStart preinstall phase... ...
    (SunManagers)
  • Re: Some basic unix directory listing questions (long)
    ... I use this method extensively for perl "suites" which bring their ... own libraries, configuration files, etc with them. ... directory of your script. ... As for hard links - no chance. ...
    (comp.unix.shell)
  • Re: Quarantine rqc parameter details
    ... You can find quarntine configuration details at ... Name of the VPN connectiod. ... <String>: This is the shared secret key that client and server knows about. ... You can call rqc with appropriate parameters using VB script. ...
    (microsoft.public.isa)
  • Re: Quarantine rqc parameter details
    ... You can find quarntine configuration details at ... Name of the VPN connectiod. ... <String>: This is the shared secret key that client and server knows about. ... You can call rqc with appropriate parameters using VB script. ...
    (microsoft.public.win2000.ras_routing)