3

I want to send an image which I see in DigiKam via WhatsApp.

What is the easiest way to do this?

from-digikam-to-whatsapp

6
  • Did you manage to try the proposed alternatives? Mar 3 at 14:06
  • @sancho.sReinstateMonicaCellio I took the approach of my son: Take the mobile phone, create photo from the screen and send it.
    – guettli
    Mar 3 at 17:08
  • Surprising! That is simple, and may well cover your needs. But others are possibly simpler, and provide a better "fidelity". Mar 3 at 17:56
  • @sancho.sReinstateMonicaCellio Users decide about what is more usable, not the one who implements/creates the solution.
    – guettli
    Mar 4 at 7:50
  • 1
    Of course, there is (often) no objective measure of usability. Mar 4 at 13:37
1

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.

1
  • 1
    Thank you very much. If I look at the time of the answers, then I see that I gave the bounty to the wrong answer. I am very sorry.
    – guettli
    Apr 10 at 9:57
5
+250

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:

[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:

  1. 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:

    Exec=/usr/share/ubuntu-web-launchers/amazon-launcher %F
    
  2. 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:

    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;
    

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.

0

This is a more detailed explanation of this answer.

To Drag and drop from DigiKam to a browser tab with Web Whatsapp, you can:

  1. 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.
  2. 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.

-2

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.

1
  • 1
    Your son is a very talented young man, but his solution is very complicated on the equipment side. Other than that, it is a very practical solution and he is smart :)
    – Raffa
    Feb 26 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.