22

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"?

NinoDenero
  • 321
  • 1
  • 2
  • 4

4 Answers4

35

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.

David Foerster
  • 36,890
  • 56
  • 97
  • 151
Wilf
  • 30,732
19

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.

DJCrashdummy
  • 1,922
dBlaze
  • 341
8

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
Maxwel Leite
  • 2,424
Matt Mello
  • 433
  • 1
  • 5
  • 13
5

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
mpham
  • 51