recently I installed nemo as default filemanager replacing the nautilus. So far it work perfectly except the fact that I missed the "right click extract/compress". I've installed nemo 2.2.2 and nemo-fileroller through apt-get command on Ubuntu 14.04.

How can I have the right click menu for to "extract/compress"?

Okay, I've tried lots of "solutions" but none of them work, so I went and dug out how things work, and here's how I did it on Ubuntu 14.04 and Nemo 2.2.2...

  1. Open up terminal and type cd ~/.local/share/nemo/actions/
  2. Create a new file/action for Compress by typing nano compress.nemo_action
  3. Paste this contents into newly created file

    [Nemo Action]
    Active=true
    Name=Compress...
    Comment=compress %N
    Exec=file-roller -d %F
    Icon-Name=gnome-mime-application-x-compress
    Selection=Any
    Extensions=any;
    
  4. Save the file and exit (CTRL+X, and just Enter)

  5. Create a new file/action for "Extract here" by typing nano extracthere.nemo_action
  6. Paste this contents into newly created file

    [Nemo Action]
    Active=true
    Name=Extract here
    Comment=Extract here
    Exec=file-roller -h %F
    Icon-Name=gnome-mime-application-x-compress
     #Stock-Id=gtk-cdrom
    Selection=Any
    Extensions=zip;7z;ar;cbz;cpio;exe;iso;jar;tar;tar;7z;tar.Z;tar.bz2;tar.gz;tar.lz;tar.lzma;tar.xz;
    
  7. Save the file and exit (CTRL+X, and just Enter)

  8. You're done. If you still don't have Compress/Extract here options in Nemo, just restart or log out/in.

Creating Nemo actions is the only way I've achieved this, I've tried several repos and tutorial of which none worked.

  • Worked for me! thanks.. – Dzero Nov 20 '15 at 12:58
  • dude you rock thank you so much – Nicholas DiPiazza Jun 15 '16 at 4:33
  • Thanks a lot, it worked. Just a note: since I wanted to apply the changes system.-wide, I put the new action files in /usr/local/share/nemo/actions instead of .local/... – PJ_Finnegan Dec 2 '16 at 11:52
  • In case someone else stumbles here that does not use Ubuntu, it worked also on rhel7 with Nemo 2.8.7 – bartgol Dec 14 '16 at 15:10
  • EDIT: to apply the changes system.-wide, I put the new action files in /usr/share/nemo/actions instead of .local/.. – PJ_Finnegan Jan 19 '17 at 11:40

Very simply, all you should need to do is install the nemo-fileroller package:

sudo apt-get install nemo-fileroller

To apply the changes quit the file-manager with

nemo -q

to then (re-)start it like you normally would.

  • Dammit wish i would have saw this before the other thing now i don't know which works better – Nicholas DiPiazza Jun 15 '16 at 4:34
  • I have tried doing it this way, but it just didn't work.... I even tried it on multiple Ubuntu installs – dBlaze Jun 16 '16 at 6:24
  • 2
    It works, you have to restart file manager though: nemo -q – wim Nov 10 '16 at 23:17
  • I tired that and didn't work, but the action files did. – PJ_Finnegan Dec 2 '16 at 11:50
  • It's work for me – Nirmal Aug 28 at 13:02

To improve the Compress/Extract integration, I'm posting an Escape-Safe way (because folders with spaces in the name was crashing my file-roller):

Create the following .nemo_action files and their contents, at /usr/share/nemo/actions:

compress.nemo_action:

[Nemo Action]
Active=true
Name=Compress...
Comment=Compress "%f"
Exec=file-roller --add %F --default-dir=%P
Icon-Name=gnome-mime-application-x-compress
Selection=notnone
Extensions=any;
Quote=double

extract-here.nemo_action:

[Nemo Action]
Active=true
Name=Extract here
Comment=Extract "%f" here
Exec=file-roller --extract-here %F
Icon-Name=gnome-mime-application-x-compress
Selection=notnone
Extensions=zip;7z;ar;cbz;cpio;exe;iso;jar;tar;tar.Z;tar.bz2;tar.gz;tar.lz;tar.lzma;tar.xz;
Quote=double

extract-to.nemo_action:

[Nemo Action]
Active=true
Name=Extract to...
Comment=Extract to a folder of your choice.
Exec=file-roller --extract %F
Icon-Name=gnome-mime-application-x-compress
Selection=notnone
Extensions=zip;7z;ar;cbz;cpio;exe;iso;jar;tar;tar.Z;tar.bz2;tar.gz;tar.lz;tar.lzma;tar.xz;
Quote=double
  • 1
    If I put EscapeSpaces=true and Quote=double at the same time it won't work, Quote=double is enough to escape the spaces. – PJ_Finnegan Jan 19 '17 at 11:46

I believe the above nemo actions is missing the "Quote=double" parameter otherwise files/directories that have space(s) in their name won't work. e.g.

[Nemo Action]
Active=true
Name=Compress...
Comment=compress %N
Exec=file-roller -d %F
Icon-Name=gnome-mime-application-x-compress
Selection=any
Extensions=any;
Quote=double

Also useful is an "Extract to..." action, which allows you to select a different path where you may want to extract the files to.

e.g.
extractto.nemo_action

[Nemo Action]
Active=true
Name=Extract to...
Comment=Extract to...
Exec=file-roller -f %F
Icon-Name=gnome-mime-application-x-compress
#Stock-Id=gtk-cdrom
Selection=any
Extensions=zip;7z;ar;cbz;cpio;exe;iso;jar;tar;tar;7z;tar.Z;tar.bz2;tar.gz;tar.lz;tar.lzma;tar.xz;
Quote=double

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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