I've constructed a script that uses kdialog. The dialog box appears immediately on being called, but takes about 20 secs after the box disappears to return with the result. This only happens with the 'root' user; a normal user experiences no delay. The 'root' user's shell reports 'kbuildsycoca running...' before launching the dialog box. This does not appear when a normal user runs this script. This happens with Suse 10.0 and openSUSE 10.2, but not with Knoppix 5.1.1 (ie, Knoppix has no delay with either user, and no 'kbuildsycoca running...' message). This short demo will illustrate the problem:
Code:
#!/bin/bash
# Try kdialog for the 1st time
Selection=$(kdialog --title "Kdialog Test" --radiolist "Please select an Option from the following list:" 1 Option1 on 2 Option2 off 3 Option3 off)
Result=$? # Get dialog return result
echo "Result from 1st dialog =$Result"
echo "Selection =$Selection"
# Now try kdialog for the 2nd time
Selection=$(kdialog --title "Kdialog Test2" --radiolist "Please select an Option from the following list:" 1 Option1 on 2 Option2 off 3 Option3 off)
Result=$? # Get dialog return result
echo "Result from 2nd dialog =$Result"
echo "Selection =$Selection"
What happens is that the first dialog appears pretty well immediately, then, after selecting an option and clicking on OK, there is a delay of about 20 seconds before the Result is echoed. Then the second dialog box appears without delay; after making the second selection, another 20 seconds delay occurs before the second Result is echoed.
Does anyone know what's going on here? Is there a setting that can fix this? At the moment it is stopping me from using kdialog in scripts run by root.
I've searched with Google and with LQ Search, but no joy. Any help would be really appreciated.
(Posting in this forum because I'm not sure whether it's a problem with bash, kde or SUSE.)