Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Shrink Images and PDFs

by anita2R (Scribe)
on May 12, 2020 at 11:43 UTC ( #11116709=note: print w/replies, xml ) Need Help??

in reply to Shrink Images and PDFs

Thanks for your post.

I installed the Perl script in the scripts directory for nemo running on Mint, and although the script showed up in the context menu, it didn't run (I added some code to write to a file as a test). A bash script in the same location and with the same user/group/permissions did run OK.

My thought was that there was an environment issue. To get the perl script to work I added a perl libraries path like this:

use lib '/home/<myusername>/perl5/lib/perl5/';

I don't know if this was an issue with Mint/nemo or with my installation of perl, but this may help someone else who has the same problem.

Now shrink works from the context menu - at least for images - I haven't tried any pdf's yet.

It was just what I had been looking for when preparing images to share with others, so much easier than opening an image manipulation program and manually having to edit and save a new file. Thanks again.

Replies are listed 'Best First'.
Re^2: Shrink Images and PDFs
by haukex (Bishop) on May 12, 2020 at 16:47 UTC

    Thanks very much for the feedback, I'm glad to hear it's helpful. As for the @INC issue, my guess would be that your local::lib configuration is set in your ~/.bashrc or ~/.profile, and that doesn't get run for these scripts. So thank you for providing a workaround for anyone who might run into the same issue.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11116709]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2021-05-11 07:49 GMT
Find Nodes?
    Voting Booth?
    Perl 7 will be out ...

    Results (114 votes). Check out past polls.