slytomcat / yandex-disk-indicator

Panel indicator (GTK+) for YandexDisk CLI client for Linux
GNU General Public License v3.0
238 stars 30 forks source link

No icon In KDE Plasma on Wayland at startup #225

Closed OlegoroV closed 2 years ago

OlegoroV commented 2 years ago

When I in Kubuntu 21.10 use Wayland the icon is not shown after session is started. But it works and shows notifications. If I kill program and start it again, icon appears and works perfect. I don't know how to make debug log for autostarting program.

What additional info can I give You?

slytomcat commented 2 years ago

It seems that some desktop services is not started at the moment when indicator starts on the session start. The simplest workaround I see: just add some timeout in ~/.config/autostart/Yandex.Disk-indicator.desktop file Exec=yandex-disk-indicator

Exec=sleep 1s;yandex-disk-indicator Probably you shall select some longer sleep interval.

But be aware that all that changes disappear if you disable and then enable again indicator autostart via indicator settings dialog. It will delete and then rewrite the file.

The same place (Exec command in the desktop file) can be used for making the debugging log: Exec=yandex-disk-indicator -l10 > path/to/some/log.file Use path/to/some/log.file that points to a folder in which your user have the write privilege.

Probably the log can help to analyze the problem deeply.

OlegoroV commented 2 years ago

Yes, sleep 5 helped the icon to appear on system load. But the log file is empty. Even if I run "yandex-disk-indicator -l10 > ~/YD_tools_log.txt" manually

OlegoroV commented 2 years ago

I tried command "yandex-disk-indicator -l10 2>&1 | tee ~/YD_tools.log" And now I have log. Hope, it will help You.

2021-11-17 15:21:28,927 INFO yandex-disk-indicator v.1.11.0 2021-11-17 15:21:28,927 DEBUG Logging level: 10 2021-11-17 15:21:28,929 DEBUG Config value read as: autostart = True 2021-11-17 15:21:28,929 DEBUG Config value read as: notifications = True 2021-11-17 15:21:28,929 DEBUG Config value read as: theme = False 2021-11-17 15:21:28,929 DEBUG Config value read as: fmextensions = True 2021-11-17 15:21:28,929 DEBUG Config value read as: daemons = /home/olegorov/.config/yandex-disk/config.cfg 2021-11-17 15:21:28,929 INFO Config read: /home/olegorov/.config/yd-tools/yandex-disk-indicator.conf 2021-11-17 15:21:29,164 DEBUG Config value read as: auth = /home/olegorov/.config/yandex-disk/passwd 2021-11-17 15:21:29,165 DEBUG Config value read as: dir = /home/olegorov/Data/Yandex.Disk 2021-11-17 15:21:29,165 DEBUG Config value read as: exclude-dirs = Монтаж видео/Архив 2021-11-17 15:21:29,165 DEBUG Config value read as: proxy = False 2021-11-17 15:21:29,165 INFO Config read: /home/olegorov/.config/yandex-disk/config.cfg

(yandex-disk-indicator:1631): Gtk-CRITICAL **: 15:21:29.404: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed 2021-11-17 15:21:29,547 DEBUG Event raised by Timer 2021-11-17 15:21:29,547 INFO Change event: stat,size, 2021-11-17 15:21:29,549 DEBUG Sub-menu 'Last synchronized' has 0 items 2021-11-17 15:21:29,549 INFO Status: unknown -> none

(yandex-disk-indicator:1631): Gtk-CRITICAL **: 15:21:29.549: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed 2021-11-17 15:21:29,831 INFO Daemon started, message: Демон уже запущен.

2021-11-17 15:21:30,754 DEBUG Event raised by Watcher 2021-11-17 15:21:30,754 INFO Change event: ,,last 2021-11-17 15:21:30,757 DEBUG Sub-menu 'Last synchronized' has 10 items 2021-11-17 15:22:08,262 DEBUG Event raised by Watcher 2021-11-17 15:22:08,263 INFO Change event: stat,size, 2021-11-17 15:22:08,263 INFO Status: none -> busy

(yandex-disk-indicator:1631): Gtk-CRITICAL **: 15:22:08.264: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed 2021-11-17 15:22:08,265 DEBUG Message: Яндекс.Диск | Сервис Яндекс.Диск запущен 2021-11-17 15:22:08,290 DEBUG Message: Яндекс.Диск | Запущена синхронизация

(yandex-disk-indicator:1631): Gtk-CRITICAL **: 15:22:09.044: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed

(yandex-disk-indicator:1631): Gtk-CRITICAL **: 15:22:09.825: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed

(yandex-disk-indicator:1631): Gtk-CRITICAL **: 15:22:10.603: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed

(yandex-disk-indicator:1631): Gtk-CRITICAL **: 15:22:11.381: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed

(yandex-disk-indicator:1631): Gtk-CRITICAL **: 15:22:12.156: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed

(yandex-disk-indicator:1631): Gtk-CRITICAL **: 15:22:12.934: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed

(yandex-disk-indicator:1631): Gtk-CRITICAL **: 15:22:13.712: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed

(yandex-disk-indicator:1631): Gtk-CRITICAL **: 15:22:14.490: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed 2021-11-17 15:22:15,034 DEBUG Event raised by Watcher 2021-11-17 15:22:15,035 INFO Change event: stat,, 2021-11-17 15:22:15,035 INFO Status: busy -> idle

(yandex-disk-indicator:1631): Gtk-CRITICAL **: 15:22:15.039: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed 2021-11-17 15:22:15,039 DEBUG Message: Яндекс.Диск | Синхронизация завершена

slytomcat commented 2 years ago

Unfortunately there is no additional info in the log. Gtk-CRITICAL message appears on new GTK lib. I saw it already several times. It doesn't seem as core problem.

Can you check is there the same GTK messages appear in the log after restart the indicator?

OlegoroV commented 2 years ago

After restarting no errors.

Dmitriy-Kulagin commented 2 years ago

Hmm... then it's just confirmation of my first consideration: some GTK resources are no available at the moment of indicator starts during session start.

Unfortunately I have no idea how to investigate this issue more deeply as I have no platform with Kubuntu 21.10 using Wayland at the moment.

Does the solution with 5 seconds delay is ok for You?

OlegoroV commented 2 years ago

Yes, with

sh -c "sleep 5s && exec yandex-disk-indicator -l10 2>&1 | tee ~/YD_tools.log"

I see no errors.

slytomcat commented 2 years ago

Ok. I'll close this issue then.


If someone can investigate the core problem deeply, just trigger me in this thread.