LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 11-15-2008, 03:04 PM   #1
Calgarian
Member
 
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, 11:14 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
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, 11:17 AM   #3
Calgarian
Member
 
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
 
  


Reply


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 04:42 AM
cp progress bar edwardsiow Linux - General 26 09-04-2011 08:53 AM
cp with progress bar? Rotwang Linux - General 5 04-27-2005 07:49 PM
cp: progress bar chii-chan Linux - General 2 10-30-2003 06:30 PM
Progress Bar zael Programming 3 10-01-2003 12:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 04:33 AM.

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