我使用KTimeTracker来监控我在不同项目上的时间。我有一个PHP脚本,它会定期运行,让我知道我一天工作了多长时间。
用于使用qdbus连接到KtimeTracker的PHP脚本保存到文件,然后使用qdbbus导出CSV文件。
对于那些想知道我为什么要为这种设置而烦恼的人来说,我在家工作,需要监控我的时间,以确保我的工作时间正确。
该脚本在相当长的一段时间内运行良好,但最近在使用qdbus时开始失败。对qdbus最简单的调用是:qdbus org.kde.ktimetracker /KTimeTracker saveAll
结果是
分段故障(核心转储(
qdbus org.kde.ktimetracker /KTimeTracker
Segmentation fault (core dumped)
qdbus org.kde.ktimetracker
/KTimeTracker
/MainApplication
/ktimetracker
/ktimetracker/MainWindow_1
/ktimetracker/MainWindow_1/actions
/ktimetracker/MainWindow_1/actions/file_open
/ktimetracker/MainWindow_1/actions/file_save
/ktimetracker/MainWindow_1/actions/options_configure
/ktimetracker/MainWindow_1/actions/start_new_session
/ktimetracker/MainWindow_1/actions/edit_history
/ktimetracker/MainWindow_1/actions/reset_all_times
/ktimetracker/MainWindow_1/actions/start
/ktimetracker/MainWindow_1/actions/stop
/ktimetracker/MainWindow_1/actions/focusSearchBar
/ktimetracker/MainWindow_1/actions/stopAll
/ktimetracker/MainWindow_1/actions/focustracking
/ktimetracker/MainWindow_1/actions/new_task
/ktimetracker/MainWindow_1/actions/new_sub_task
/ktimetracker/MainWindow_1/actions/delete_task
/ktimetracker/MainWindow_1/actions/edit_task
/ktimetracker/MainWindow_1/actions/edit_task_time
/ktimetracker/MainWindow_1/actions/mark_as_complete
/ktimetracker/MainWindow_1/actions/mark_as_incomplete
/ktimetracker/MainWindow_1/actions/export_dialog
/ktimetracker/MainWindow_1/actions/import_planner
/ktimetracker/MainWindow_1/actions/searchbar
/ktimetracker/MainWindow_1/actions/file_quit
/ktimetracker/MainWindow_1/actions/options_configure_keybinding
/ktimetracker/MainWindow_1/actions/options_show_statusbar
/ktimetracker/MainWindow_1/actions/options_configure_toolbars
/org
/org/kde
/org/kde/ktimetracker
我确信我错过了一些简单的东西,但就是看不见。我已经花了几个小时在谷歌上搜索了,但一无所获。
我不知道这些是否有价值
sudo zypper search --provides qdbus
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
---+------------------------+--------------------------------------------------+--------
i+ | libqt5-qdbus | Command line client for communication over D-Bus | package
| libqt5-qdbus-debuginfo | Debug information for package libqt5-qdbus | package
i+ | libqt5-qttools | Qt 5 QtTools Module | package
cat /etc/os-release
NAME="openSUSE Tumbleweed"
# VERSION="20201114"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
...
develop@bambam:~> bash --version
GNU bash, version 5.0.18(1)-release (x86_64-suse-linux-gnu)
...
任何帮助都将不胜感激。
干杯
用qdbus-qt5
替换qdbus
命令