Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When selecting Compress... from the right click context menu in Nautilus I am able to quickly compress files to .gz format.

However by default Nautilus does not use maximum compression. Can I make Nautilus to use maximum compression like gzip -9?

Using gconftool or gconf-editor to set the compression_level for File Roller to maximum seems right but infortunately has not the desired effect and will not lead to maximum compressed files. As this is the expected way of how to set compression levels a bug report has been filed upstream.

Any ideas for a workaround are welcome.

share|improve this question
up vote 3 down vote accepted

Simply run:

gconftool --type String --set /apps/file-roller/general/compression_level maximum

Other options for this setting: very_fast fast normal

Edit: This doesn't appear to be well implemented. I have compressed a text file (highly compressible) using a number of different formats using normal and maximum settings:

52167 client.h  # uncompressed

15980 client.h.normal.7z
15979 client.h.max.7z

15861 client.h.normal.bz2
15861 client.h.max.bz2

17034 client.h.normal.gz
17034 client.h.max.gz

15892 client.h.normal.lzma
15892 client.h.max.lzma


zip was the only format that showed any real difference (still tiny on the scale of things).

share|improve this answer
I am seriously impressed! – Octavian Damiean Mar 7 '11 at 21:02
It doesn't work for me, even after log out/log in, file-roller creates .gz files of the same size whatever the compression level in gconf settings ;( In strace the command is always the same: execve("/bin/gzip", ["gzip", "--", "a.txt"]... – arrange Mar 7 '11 at 21:30
This seems to be the proper way of doing but it does not work for me either. – Takkat Mar 7 '11 at 21:38
@arrange and @Takkat I've done some testing and have added it to the post. Seems only zip has this implemented. – Oli Mar 8 '11 at 0:06
Well, the difference between normal and maximum is small, IMO you should have tested the difference between very_fast and maximum. On my system file-roller honours the set preferences, the only case where it fails to do so is for gzip (and bz2) files, I don't know why. – arrange Mar 8 '11 at 11:19

As there is an obvious bug with File Roller not using gconf settings we need to define a Nautilus Script to perform maximum compression from right click context menu:

#! /bin/sh


Save this file as executable with any name like Gz-max to ~/.gnome2/nautilus-scripts.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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