Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 11-15-2008, 04:04 PM   #1
Registered: Feb 2005
Location: Calgary, AB Canada
Distribution: Kubuntu 6.10
Posts: 44

Rep: Reputation: 15
dcop progress bar issues

I've written the following test script after trying to get a dcop progress bar to work with kdialog under Kubuntu 8.10 and KDE4 in a much longer and more complex script.

#! /bin/bash
dcopRef=$(kdialog --title "DCOP Progress" --progressbar "Initializing . . ." 12)
echo $dcopRef
dcop $dcopRef setProgress 1
dcop $dcopRef setLabel "Step 1"
sleep 3
dcop $dcopRef setProgress 2
dcop $dcopRef setLabel "Step 2"
sleep 3
dcop $dcopRef close

Upon executing the script I get the following output. The dialog for the progress bar is created with the title shown above.

org.kde.kdialog-7234 /ProgressDialog
object not accessible
object not accessible
object not accessible
object not accessible
call failed

I can get along without the progress bar, but it looks neater with it. Any thoughts greatly appreciated? TIA
Old 11-16-2008, 12:14 PM   #2
LQ 5k Club
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,087

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
Your script works fine on kubuntu 8.04 with KDE3.5
KDE4 is different. I have a feeling that KDE4 uses dbus not dcop
Old 11-16-2008, 12:17 PM   #3
Registered: Feb 2005
Location: Calgary, AB Canada
Distribution: Kubuntu 6.10
Posts: 44

Original Poster
Rep: Reputation: 15
dcop issues with progressbar (SOLVED)

Thanks to a couple of replies to this I was able to get the following script to work. First some comments. I am very new at this level of scripting and my research all led me to dcop answers, up to and including September of this year dated material. I was completely unaware that dbus had replaced dcop. One of the replies got the setLabelText process working and pointed me towards the Set value function. Some additional playing and searching finally got the answer for me. Thanks to the guys who helped.

#! /bin/bash
dbusRef=$(kdialog --title "DCOP Progress" --progressbar "Initializing . . ." 2)
#echo $dbusRef
qdbus $dbusRef org.kde.kdialog.ProgressDialog.setLabelText "Step 1"
qdbus $dbusRef Set org.kde.kdialog.ProgressDialog value 1
sleep 3
qdbus $dbusRef org.kde.kdialog.ProgressDialog.setLabelText "Step 2"
qdbus $dbusRef Set org.kde.kdialog.ProgressDialog value 2
sleep 3
qdbus $dbusRef org.kde.kdialog.ProgressDialog.close


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mv with progress bar gbowden Linux - General 28 08-14-2013 05:42 AM
cp progress bar edwardsiow Linux - General 26 09-04-2011 09:53 AM
cp with progress bar? Rotwang Linux - General 5 04-27-2005 08:49 PM
cp: progress bar chii-chan Linux - General 2 10-30-2003 07:30 PM
Progress Bar zael Programming 3 10-01-2003 01:20 PM > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 05:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration