Nemo-preview doesn't work for generating Microsoft Office file thumbnail. Any other options?

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
rdlf4
Level 2
Level 2
Posts: 72
Joined: Sun Jul 02, 2017 9:53 pm

Nemo-preview doesn't work for generating Microsoft Office file thumbnail. Any other options?

Post by rdlf4 »

Hello,

So I've been editing docx files on Linux MInt for quite some time now and the reason I do it is because my students don't work with anything other than Microsoft Office. Sometimes I work until late at night and I just want to shut down the computer and have some rest. That's when I just hit save, type the name of the file, only to wake up the next day and realize I didn't care where I saved it.
In another situation, a file has different versions, one of which has a Subject I need to teach about. So there I go again, having to open each DOCX file to see what they're all about.
I just wish Nemo could generate a thumbnail for each docx file, so that I only had to open the one that really matters.

But currently, my only option is to select the file, hit space and Gnome Sushi will fail at first. Upon trying again, it generates a file preview in fullscreen, which is not what I want.
So the question is, is there a way for Nemo to generate a thumbnail? I could even go for a paid application, if that's the only way.

Thanks.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Nemo-preview doesn't work for generating Microsoft Office file thumbnail. Any other options?

Post by smurphos »

Hi, nemo-preview doesn't generate thumbnails at all which is what is sounds like you are after. It does provide the preview in a dialog window function on pressing space with a file selected.

Anyway - what you need is an MS format doc thumbnailer. A nice person has written and shared one here - it's written for Gnome/Nautilus but it might work for Cinnamon / Nemo. I've not tested it - http://www.bernaerts-nicolas.fr/linux/7 ... l-nautilus

Edit - briefly tested and it appears to work fine. It's pretty slow to generate thumbnails though.

To install for Cinnamon/Nemo

Download the installer script

Code: Select all

wget https://raw.githubusercontent.com/NicolasBernaerts/ubuntu-scripts/master/thumbnailer/msoffice/msoffice-thumbnailer-install.sh
Make it executable

Code: Select all

chmod +x msoffice-thumbnailer-install.sh
Modify the installer script in a text editor

Code: Select all

xed ./msoffice-thumbnailer-install.sh
Comment out these lines
i.e change

Code: Select all

# test Ubuntu distribution
DISTRO=$(lsb_release -is 2>/dev/null)
[ "${DISTRO}" != "Ubuntu" ] && { zenity --error --text="This automatic installation script is for Ubuntu only"; exit 1; }
to

Code: Select all

# test Ubuntu distribution
#DISTRO=$(lsb_release -is 2>/dev/null)
#[ "${DISTRO}" != "Ubuntu" ] && { zenity --error --text="This automatic installation script is for Ubuntu only"; exit 1; }
and then change

Code: Select all

# stop nautilus
nautilus -q
with

Code: Select all

# stop nemo
nemo -q
Save the modified installer and then run it

Code: Select all

sudo ./msoffice-thumbnailer-install.sh
Image
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
rdlf4
Level 2
Level 2
Posts: 72
Joined: Sun Jul 02, 2017 9:53 pm

Re: Nemo-preview doesn't work for generating Microsoft Office file thumbnail. Any other options?

Post by rdlf4 »

Thank you, smurphos. I can confirm your solution works out for me.
However, one thing that I noticed ever since I've been using Linux Mint Cinnamon is that Nemo ALWAYS RELOADS THE SAME files from my folders.
For example, I have 20 image files in my Pictures folder. Nemo will load these files and as that happens each file pops up and populates the file manager.
OK, so after closing Nemo and opening it again, it will reload the same files. Why is that? Wasn't it supposed to leave those old files alone and only load NEW files? Why does it have to rebuild the entire directory's files every single time I browse the same folders? Is that a bug or by default?
rdlf4
Level 2
Level 2
Posts: 72
Joined: Sun Jul 02, 2017 9:53 pm

Re: Nemo-preview doesn't work for generating Microsoft Office file thumbnail. Any other options?

Post by rdlf4 »

smurphos wrote: Thu Apr 23, 2020 1:33 am Hi, nemo-preview doesn't generate thumbnails at all which is what is sounds like you are after. It does provide the preview in a dialog window function on pressing space with a file selected.

Anyway - what you need is an MS format doc thumbnailer. A nice person has written and shared one here - it's written for Gnome/Nautilus but it might work for Cinnamon / Nemo. I've not tested it - http://www.bernaerts-nicolas.fr/linux/7 ... l-nautilus

Edit - briefly tested and it appears to work fine. It's pretty slow to generate thumbnails though.

To install for Cinnamon/Nemo

Download the installer script

Code: Select all

wget https://raw.githubusercontent.com/NicolasBernaerts/ubuntu-scripts/master/thumbnailer/msoffice/msoffice-thumbnailer-install.sh
Make it executable

Code: Select all

chmod +x msoffice-thumbnailer-install.sh
Modify the installer script in a text editor

Code: Select all

xed ./msoffice-thumbnailer-install.sh
Comment out these lines
i.e change

Code: Select all

# test Ubuntu distribution
DISTRO=$(lsb_release -is 2>/dev/null)
[ "${DISTRO}" != "Ubuntu" ] && { zenity --error --text="This automatic installation script is for Ubuntu only"; exit 1; }
to

Code: Select all

# test Ubuntu distribution
#DISTRO=$(lsb_release -is 2>/dev/null)
#[ "${DISTRO}" != "Ubuntu" ] && { zenity --error --text="This automatic installation script is for Ubuntu only"; exit 1; }
and then change

Code: Select all

# stop nautilus
nautilus -q
with

Code: Select all

# stop nemo
nemo -q
Save the modified installer and then run it

Code: Select all

sudo ./msoffice-thumbnailer-install.sh
Image
I've had some time with it and while it does do what it's meant to, unfortunately Nemo becomes very VERY laggy when you have this "add-on" doing its thing and then you open a folder with the middle mouse button: switching from one tab to another will be very slow, almost as if going from tab A to tab B requires Nemo to reload tab B five or six times, then it displays the folder's content.
Yeah that's an issue, as it hurts productivity. And it gets worse: Sometimes, opening a folder with the middle mouse button will result in Nemo freezing! Attempting to kill the process and everything Nemo-related makes desktop icons go away, so I just close the Nemo window, which results in nothing happening (as I said, Nemo frezes up). And because that happens every so often, I have to resort to Nautilus (ugh) to continue working. Eventually a pop up window comes up letting me know Nemo isn't responding and I choose to 'QUIT' Nemo. After some time, Nemo comes up again (a new Nemo window is open), but that takes too long.

TL:DR: While this helpful little addon/plugin helps boost my productivity a lot, unfortunately it's made with Nautilus in mind, not Nemo. As a result, Nemo behaves very unstably when switching folder tabs, with terrible lags going from one tab to the other and sometimes even freezing up, hurting my productivity.

I checked the developer's site and I'll try contacting him to see if those issues I'm having can be resolved.
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Nemo-preview doesn't work for generating Microsoft Office file thumbnail. Any other options?

Post by smurphos »

Hi,

It doesn't help you with you MS-Format documents thumbnails but there is a native Open-Office format document thumbnailer that works fine in my experience.

Code: Select all

apt install ooo-thumbnailer
This step is needed in Mint 19.x - not in Mint 20.

Code: Select all

sudo tee /usr/share/thumbnailers/ooo.thumbnailer <<'EOB'
[Thumbnailer Entry]
TryExec=ooo-thumbnailer
Exec=/usr/bin/ooo-thumbnailer %i %o %s
MimeType=application/vnd.oasis.opendocument.graphics;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.text;
EOB

Code: Select all

nemo -q
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
rdlf4
Level 2
Level 2
Posts: 72
Joined: Sun Jul 02, 2017 9:53 pm

Re: Nemo-preview doesn't work for generating Microsoft Office file thumbnail. Any other options?

Post by rdlf4 »

smurphos wrote: Mon Jun 15, 2020 2:22 am Hi,

It doesn't help you with you MS-Format documents thumbnails but there is a native Open-Office format document thumbnailer that works fine in my experience.

Code: Select all

apt install ooo-thumbnailer

Code: Select all

sudo tee /usr/share/thumbnailers/ooo.thumbnailer <<'EOB'
[Thumbnailer Entry]
TryExec=ooo-thumbnailer
Exec=/usr/bin/ooo-thumbnailer %i %o %s
MimeType=application/vnd.oasis.opendocument.graphics;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.text;
EOB

Code: Select all

nemo -q
Hi, thanks for sharing!
Won't that work even if I open a Word file from Writer and save it as docx?
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Nemo-preview doesn't work for generating Microsoft Office file thumbnail. Any other options?

Post by smurphos »

rdlf4 wrote: Mon Jun 15, 2020 2:30 am Hi, thanks for sharing!
Won't that work even if I open a Word file from Writer and save it as docx?
Unfortunately not - it's strictly for the native open office formats only - odt, ods etc.

Part of the problem with the ms thumbnailer is it's trying to be too fancy - as-well as extracting file contents to make a thumbnail it's also then adding in a frame and logo graphic - all that image manipulation in the background, coupled with nemo's (in 19.x) subpar thumbnailing and spacing algorithm is what is causing the problem. The latter issue is much much improved in Mint 20 - no matter how much thumbnailing is going on nemo doesn't lock up or lose responsiveness.

The scripts could be tweaked to cut out the fancyness....
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Locked

Return to “Software & Applications”