Unending pop-up [solved]

When I do some commands, like convert a file (in Dolphin, with Re-image), on my main PC (unlike other ones) pop-up window doesn’t disappear after doing the conversion.
It’s a bug? But in other PC with KDE-Neon this doesn’t happen…

Notifications in Plasma come in two flavors - transient and permanent.

Transient notifications have a timer that is drawn around the close button and disappear after some seconds (by default 5, but you can configure this in System SettingsNotifications).

Permanent notifications don’t go away until you close them. Some applications prefer permanent notifications instead of transient ones - for example KDE Connect “incoming call” alert is permanent - I’m guessing because the default 5 seconds transient timeout is too short for someone to answer a phone call, but it is pretty annoying.

I’m not familiar with Re-image, but its likely that it is using persistent notifications, in which case there’s nothing to be done about it in Plasma - you need to ask the developer of the application to change their configuration.

1 Like

No, I don’t think so. Re-image doesn’t provide any choice between transient and permanent notification.
Moreover, as I said, in other PC, without any my choice, all is ok with Re-image…

I’ve checked Re-Image source code and they indeed using kdialog --passivepopup which is a transient notification (they actually set the notification time to 5 seconds instead of letting it use the user’s configuration - which is not OK).

What version of Plasma is your main PC runs?

1 Like

The same on the other: the 6 (KDE Neon).

Operating System: KDE neon 6.0
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.5.0-27-generic (64-bit)
Graphics Platform: X11
Processors: 4 × AMD Ryzen 3 3200G with Radeon Vega Graphics
Memory: 5,5 GiB of RAM
Graphics Processor: AMD Radeon Vega 8 Graphics

When you run the following command - is the notification persistent or does it timeout after 10 seconds?

kdialog --passivepopup "This is just a test" 10 --icon plasma
1 Like

I don’t see any pop-up … :neutral_face:

Uninstalled re-image (2.5). Unsuccessfully reinstalled (2.5).
Then, trying installing beta 2.6 → Problems with q6paths: solved installing qt6 dev tools.
But still problems with an executable not found at this line:

msg=$("${magick_bin}" "${input}" -format "${format}"   
"${dir}/${base}_converted.${format}" 2>&1)

Re-installing image-magick didn’t work.

EDIT

I have reported it.

After many, frustating attempts, I managed to reinstall (with pkcon intall-local) re-image 2.5.
But I have still the unending pop-up problem…

I reported it in KDE bugs: it seems a KDE Neon problem, non an imagemagick issue.

I just watched the video you attached and I understand now what I got wrong - when you said “pop up”, I thought you meant the notification dialog that shows at the end of an operation - but this is not what the problem in the KDE bug report:

In the KDE bug report, the video shows that what is getting stuck is not the notification - its the operation Reimage itself: it is supposed to do something and then close the progress dialog, instead the application looks stuck.

I reviewed the code of Reimage and it looks like the problem is that they assume ImageMagick is using the magick executable filename, but this is not correct for Debian/Ubuntu/Neon that do not have ImageMagick 7. In ImageMagick6 the executable is called convert. If you change the code to use convert then everything works fine.

1 Like

Not sure: I check the code and there is already convert. At least, it seems to me…
I can’t neither attach the file (as not an image) nor paste it (too long).

EDIT

For example here:

################################################################################

[ "${1}" = "-h" ] || [ "${1}" = "--help" ] || [ ${#} -lt 2 ] && help

kdialog_bin=$(which kdialog)
[ -z "${kdialog_bin}" ] && echo "kdialog not found!" && exit 1

mogrify_bin=$(which mogrify)
[ -z "${mogrify_bin}" ] && \
	"${kdialog_bin}" --icon configure --title "${msg_common_software_not_found_title}" --error "${msg_common_mogrify_not_found_text}" && exit 2

convert_bin=$(which convert)
[ -z "${convert_bin}" ] && \
	"${kdialog_bin}" --icon configure --title "${msg_common_software_not_found_title}" --error "${msg_common_convert_not_found_text}" && exit 2

montage_bin=$(which montage)
[ -z "${montage_bin}" ] && \
	"${kdialog_bin}" --icon configure --title "${msg_common_software_not_found_title}" --error "${msg_common_montage_not_found_text}" && exit 2

jhead_bin=$(which jhead)
[ -z "${jhead_bin}" ] && \
	"${kdialog_bin}" --title "${msg_common_software_not_found_title}" --icon configure --error "${msg_common_jhead_not_found_text}" && exit 2

webp_bin=$(which webpinfo)
[ -z "${webp_bin}" ] && \
	"${kdialog_bin}" --title "${msg_common_software_not_found_title}" --icon configure --error "${msg_common_webp_not_found_text}" && exit 2

action="${1}"
shift

load_language
msg_title=msg_${action}_title

type set_${action} &> /dev/null || \
	{ "${kdialog_bin}" --icon configure --title "${msg_common_software_not_found_title}" --error "${msg_common_action_not_found_text}" && exit 3; }

ask_overwrite=false
set_${action} "${@}"

exit 0

Moreover the image is really converted, as you can see in the video.
I guess that if the problem would be the executable (ad in 2.6 beta 2) this couldn’t happen.

I was looking at this code:

If you got your code elsewhere - I’d appreciate it if you can point me at it.

1 Like

The code you reported is probably the one of 2.6 (beta). But I have re-installed the 2.5 one (today I can’t find the website, if you want I can send it to you).

EDIT

I tried to use that 2.6 beta2 code, replacing “magick_bin” with “convert_bin” (or “convert”), but nothing to do.

EDIT

You can find the 2.5 here.

@fbertoldi -As seen in the screenshot, the repository I was looking at is GitHub - eclipseo/reimage: Plasma 6 Service Menu ReImage - which you have linked to on April 13th - where support for convert was indeed removed on April 7th.

The “2.5 version” you linked to is advertised as “KDE 5”(*) so I didn’t even try to install it, and is also hosted in another Github repository - that seems unrelated to the eclipseo repo I liked above. I have no idea what is the relationship between the two projects but at least one of them is managed very unprofessionally by someone with no idea about good development practices.

Regardless which version you use and which modification you tried to make to it - this is not a Plasma bug. This is clearly a problem with the application doing something wrong - which I’m still 100% sure is an integration problem with the scripts they use, which aren’t compatible with the software suite available in KDE Neon and it doesn’t look like there’s good error handling there (though in the “2.6 beta” repository - it is markedly better).

@fbertoldi - I want to help you understand the issue, so I want you to try to run the Reimage script from the command line. If you can run the “compress” routine (which is where I think most of the issue is) - like this:

bash -x reimage-kdialog compress 50% SOME-JPEG-IMAGE-FILE

and post the output here, then it will probably be clear what the actual problem is.

*) Which means nothing - KDE is the organization and it has no versions. They probably mean “Plasma 5”.

1 Like

Thank you!

The output is quite long, but I guess that the most important is the following:

+ new_line='
'
+ lang=en
+ type load_language_en
[...]
+ /usr/bin/kdialog --icon configure --title 'Image compression with quality ""' --warningyesno 'In case the images to be saved have the same name as those to be processed,
do you want to overwrite them?'
+ overwrite=true
+ quantity=1
++ kdialog --icon configure --title 'Image compression with quality ""' --progressbar 'Initialising ... ' 1
+ dbus_ref='org.kde.kdialog-52318 /ProgressDialog'
+ qdbus org.kde.kdialog-52318 /ProgressDialog showCancelButton true
/usr/bin/reimage-kdialog: line 968: qdbus: command not found
+ processed=0
+ for input in "$@"
++ qdbus org.kde.kdialog-52318 /ProgressDialog wasCancelled
/usr/bin/reimage-kdialog: line 973: qdbus: command not found
+ '[' '' = true ']'
++ dirname -- prova.webp
+ dir=.
+ name=prova.webp
+ base=prova
+ ext=webp
+ processed=1
+ load_language
+ load_language_en_US
+ msg_common_software_not_found_title='Software not found'
+ msg_common_mogrify_not_found_text='Software ImageMagick not found! Please, install it.'
+ msg_common_convert_not_found_text='Software ImageMagick not found! Please, install it.'
+ msg_common_montage_not_found_text='Software ImageMagick not found! Please, install it.'
+ msg_common_jhead_not_found_text='Software jhead not found! Please, install it.'
+ msg_common_webp_not_found_text='Software webp not found! Please, install it.'
+ msg_common_action_not_found_text='The requested action is not implemented.'
+ msg_common_overwrite_text='In case the images to be saved have the same name as those to be processed,
do you want to overwrite them?'
+ msg_common_abort='Operation interrupted by the user.'
+ msg_common_file_not_found='File "prova.webp" not found!'
+ msg_common_name_error='The file name "prova.webp" does not match a recognized format for a date.

The name must be of the type: YYYY-MM-DD_HHMMSS.jpg'
+ msg_common_start='Initialising ... '
++ basename prova.webp
+ msg_common_progress_text='Processing file 1 of 1 (prova.webp)'
+ msg_common_finish_ok=Done.
+ msg_common_finish_error='An error has occurred.'
+ msg_common_transparent_unsupported_text='The JPEG format does not support transparency.
Convert to PNG file.'
+ msg_agif_title='Convert files into animated GIF'
+ msg_agif_delay_input_text='Enter the duration of the single frame, in hundredths of a second:
(100 = 1 second)'
+ msg_agif_loop_input_text='Do you want loop playback?'
+ msg_agif_cicles_number_input_text='Type the number of repetitions of the animation:'
+ msg_agif_finish_title='Convert files into animated GIF'
+ msg_border_title='Add border'
+ msg_border_size_input_text='Type the size of border in percentage or in pixel.

Valid values can be: 10% or 50'
+ msg_border_finish_title='Add border to "prova.webp"'
+ msg_colorspace_title='Changing colorspace to "50%"'
+ msg_colorspace_finish_title='Changing colorspace of "prova.webp"'
+ msg_compress_title='Image compression with quality "50%"'
+ msg_compress_quality_input_text='Type the quality:'
+ msg_compress_finish_title='Compression of "prova.webp"'
+ msg_convert_title='Convert file to "50%" format'
+ msg_convert_format_input_text='Type the format you want.
A complete list can be obtained from the shell with: mogrify -list format
or by consulting the ImageMagick manual.'
+ msg_convert_finish_title='Convertion of "prova.webp"'
+ msg_favicons_title='Favicons generation'
+ msg_favicons_finish_title='Generating favicons by "prova.webp"'
+ msg_montage_title='Append picture'
+ msg_montage_finish_title='Append picture to "prova.webp"'
+ msg_optimize_title='Optimization for web'
+ msg_optimize_finish_title='Optimize "prova.webp"'
+ msg_overturn_title='Overturn file to "50%"'
+ msg_overturn_finish_title='Overturn "prova.webp"'
+ msg_resize_title='Resizing image "50%"'
+ msg_resize_scale_input_text='Type the scale factor in percentage or the maximum size you want for each direction.
You can choose a percentage or a pixel size.

Valid values can be: 30% or 1024x768'
+ msg_resize_finish_title='Resizing of "prova.webp"'
+ msg_rotate_title='Rotate file with angle of "50%"'
+ msg_rotate_angle_input_text='Enter the desired rotation angle:'
+ msg_rotate_finish_title='Rotation "prova.webp"'
+ msg_sepia_title='Sepia filter'
+ msg_sepia_finish_title='Sepia filter to "prova.webp"'
+ msg_shadow_title='Drop shadow'
+ msg_shadow_finish_title='Drop shadow to "prova.webp"'
+ msg_timestamp_title='Add timestamp'
+ msg_timestamp_finish_title='Add timestamp to "prova.webp"'
+ msg_transparent2color_title='Changing transparence to color'
+ msg_transparent2color_finish_title='Changing transparence to color of "prova.webp"'
+ msg_rfe_title='Rename file from Exif metadata'
+ msg_rfe_no_metadata='Is it possible that the image does not contain metadata.'
+ msg_rfe_finish_title='Rename file "prova.webp"'
+ msg_rff_title='Rename file from file'\''s date'
+ msg_rff_finish_title='Rename file "prova.webp"'
+ msg_sffe_title='Setting file date from Exif Metadata'
+ msg_sffe_no_metadata='Is it possible that the image does not contain metadata.'
+ msg_sffe_finish_title='Setting date of "prova.webp"'
+ msg_sffn_title='Setting file date from file name'
+ msg_sffn_finish_title='Setting date of "prova.webp"'
+ msg_seff_title='Setting Exif date from file date'
+ msg_seff_finish_title='Setting date of "prova.webp"'
+ msg_sefn_title='Setting Exif date from file name'
+ msg_sefn_finish_title='Setting date of "prova.webp"'
+ msg_ac_title='Add comment'
+ msg_ac_comment_input_text='Write comment to add:'
+ msg_ac_finish_title='Add comment into "prova.webp"'
+ msg_ve_title='View metadata'
+ msg_ve_finish_title='View metadata of "prova.webp"'
+ msg_ee_title='Extract metadata'
+ msg_ee_finish_title='Extract metadata from "prova.webp"'
+ msg_dc_title='Delete comment'
+ msg_dc_finish_title='Delete comment from "prova.webp"'
+ msg_de_title='Strip Exif section'
+ msg_de_finish_title='Strip Exif section from "prova.webp"'
+ msg_di_title='Delete IPTC section'
+ msg_di_finish_title='Delete IPTC section from "prova.webp"'
+ msg_dx_title='Deletex XMP section'
+ msg_dx_finish_title='Deletex XMP section from "prova.webp"'
+ msg_purejpg_title='Strip all unnecessary data'
+ msg_purejpg_finish_title='Strip all unnecessary data from "prova.webp"'
+ '[' en_US '!=' en_US ']'
+ '[' '!' -f prova.webp ']'
+ qdbus org.kde.kdialog-52318 /ProgressDialog setLabelText 'Processing file 1 of 1 (prova.webp)'
/usr/bin/reimage-kdialog: line 985: qdbus: command not found
+ msg_finish_title=msg_compress_finish_title
+ run_compress
+ '[' true = true ']'
++ /usr/bin/mogrify -quality 50% prova.webp
+ msg='mogrify: CorruptImageProfile `prova.webp'\'' (XMP) @ warning/profile.c/ValidateXMPProfile/1675.'
+ return 0
+ /usr/bin/kdialog --title 'Compression of "prova.webp"' --passivepopup Done. 5
+ qdbus org.kde.kdialog-52318 /ProgressDialog org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 1
/usr/bin/reimage-kdialog: line 992: qdbus: command not found
+ qdbus org.kde.kdialog-52318 /ProgressDialog close
/usr/bin/reimage-kdialog: line 995: qdbus: command not found
+ exit 0

I guess that qdbus: command not found is the problem, isn’t it?

Indeed, after seeing this webpage, I did

`sudo apt install qtchooser`

and this solved!
Thank you very much!

1 Like

The reimage-kdialog script uses a bunch of commands that it expects to be installed, and for some it tests and warns if they are missing, but not for others.

It will probably be a good idea if they fix that, or move the entire thing to be written in a language that is better suited for this kind of thing, especially one with integration for D-Bus so that they don’t have to run qdbus like plebs :wink: . For example - Python.

1 Like