No native WhatsApp application that supports receiving files as arguments is available for Ubuntu yet. All the available solutions rely on WhatsApp Web and implement some sort of web browser.
So drag and drop images from DigiKam to your WhatsApp "application" / web browser is the obvious way.
Long story
Application launchers are located in the /usr/share/applications/ directory. These launchers are files with .desktop extension and each contain something like this:
[Desktop Entry]
Name=Amazon
Comment=Online Shopping for Electronics, Apparel, Computers, Books, DVDs & more
Type=Application
Categories=Network;
Icon=amazon-store
Exec=/usr/share/ubuntu-web-launchers/amazon-launcher
X-Ubuntu-Gettext-Domain=ubuntu-default-launchers
The above example is for the amazon app.
In order for an app to be available and usable in the open with menu when a file is selected, it needs to have two things in its .desktop launcher file:
Exec key code which is in this case %F if the app is capable of accepting multiple files as arguments or %f if it can only accept a single file as an argument. This code is added at the end of the Exec= line with a space before it. So that line from the above example will look like this:
MimeType= which specifies file type association. For images for example, this line needs to be present in the .desktop application launcher and looks like so:
So the end result of the example above will look like so:
[Desktop Entry]
Name=Amazon
Comment=Online Shopping for Electronics, Apparel, Computers, Books, DVDs & more
Type=Application
Categories=Network;
Icon=amazon-store
Exec=/usr/share/ubuntu-web-launchers/amazon-launcher %F
X-Ubuntu-Gettext-Domain=ubuntu-default-launchers
MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/pjpeg;image/png;image/svg+xml;image/tiff;image/x-bmp;image/x-gray;image/x-icb;image/x-ico;image/x-png;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-xbitmap;image/x-xpixmap;image/x-pcx;image/x-targa;image/x-tga;image/openraster;
What you need to do is to find the .desktop launcher file for your application and modify it like the above example. Your application will then be available in the open with menu. That being said, your application must have the capability of accepting files as arguments and be able to handle them properly or otherwise the arguments will be ignored by the application.
One more thing: If you have installed DigiKam from snap, I would advise to remove it like so:
sudo snap remove digikam
then, reinstall it with APT like so:
sudo apt install digikam
APT installed applications provide better integration with other desktop applications.
Notice:
Amazon app is not capable of handling file arguments and I used it as just an example on how application launchers are modified, how they look and where they are located.
To send images from my computer I use the WhatsApp web interface, I was able to drag and drop files into their flexible interface https://web.whatsapp.com/ Here is a link to how to setup using your browser with WhatsApp and reading a QR code, https://osxdaily.com/2020/05/02/how-use-whatsapp-web-browser/ - but typing into Google "how to use whatsapp from browser" and following the instructions works well too.
This is a more detailed explanation of this answer.
To Drag and drop from DigiKam to a browser tab with Web Whatsapp, you can:
Have both windows open with at least part of each shown at a time, click on the image thumbnail, drag and drop it anywhere in the messages field to send the image to the currently shown chat.
Have both windows open with at least part of each shown at a time, click on the image thumbnail, drag and drop it on any chat name on the left to send the image to that chat.
If the part of the Web Whatsapp window where you want to drop the image is not visible, after you Click and partially drag the image, and before you drop it, you can <Alt>+<tab> (as many times as needed) to switch to Web Whatsapp, and then drop the image in the region of the browser of your choice.
My son has no clue about software, linux or other computer stuff, but he found the most easy solution immediately: He took his mobile phone, took a picture of image on the monitor and sent this via WhatsApp.
Short story
No native WhatsApp application that supports receiving files as arguments is available for Ubuntu yet. All the available solutions rely on WhatsApp Web and implement some sort of web browser.
So drag and drop images from DigiKam to your WhatsApp "application" / web browser is the obvious way.
Long story
Application launchers are located in the
/usr/share/applications/
directory. These launchers are files with.desktop
extension and each contain something like this:The above example is for the amazon app.
In order for an app to be available and usable in the open with menu when a file is selected, it needs to have two things in its
.desktop
launcher file:Exec key code which is in this case
%F
if the app is capable of accepting multiple files as arguments or%f
if it can only accept a single file as an argument. This code is added at the end of theExec=
line with a space before it. So that line from the above example will look like this:MimeType=
which specifies file type association. For images for example, this line needs to be present in the.desktop
application launcher and looks like so:So the end result of the example above will look like so:
What you need to do is to find the
.desktop
launcher file for your application and modify it like the above example. Your application will then be available in the open with menu. That being said, your application must have the capability of accepting files as arguments and be able to handle them properly or otherwise the arguments will be ignored by the application.One more thing: If you have installed DigiKam from snap, I would advise to remove it like so:
then, reinstall it with APT like so:
APT installed applications provide better integration with other desktop applications.
Notice:
Amazon app is not capable of handling file arguments and I used it as just an example on how application launchers are modified, how they look and where they are located.
To send images from my computer I use the WhatsApp web interface, I was able to drag and drop files into their flexible interface https://web.whatsapp.com/ Here is a link to how to setup using your browser with WhatsApp and reading a QR code, https://osxdaily.com/2020/05/02/how-use-whatsapp-web-browser/ - but typing into Google "how to use whatsapp from browser" and following the instructions works well too.
This is a more detailed explanation of this answer.
To Drag and drop from DigiKam to a browser tab with Web Whatsapp, you can:
If the part of the Web Whatsapp window where you want to drop the image is not visible, after you Click and partially drag the image, and before you drop it, you can <Alt>+<tab> (as many times as needed) to switch to Web Whatsapp, and then drop the image in the region of the browser of your choice.
My son has no clue about software, linux or other computer stuff, but he found the most easy solution immediately: He took his mobile phone, took a picture of image on the monitor and sent this via WhatsApp.
I think I think too complicated.