Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

I created a Nautilus Action script to change file encoding using recode application.
My action is:

[Desktop Entry]
ToolbarLabel[en_US]=Convert Encoding From Windows-12
ToolbarLabel[en]=Convert Encoding From Windows-12
ToolbarLabel[C]=Convert Encoding From Windows-12
Tooltip[en_US]=Converts file content encoding from Windows-1256 and saves as UTF-8
Tooltip[en]=Converts file content encoding from Windows-1256 and saves as UTF-8
Tooltip[C]=Converts file content encoding from Windows-1256 and saves as UTF-8
Name[en_US]=Convert Encoding From Windows-1256
Name[en]=Convert Encoding From Windows-1256
Name[C]=Convert Encoding From Windows-1256

[X-Action-Profile profile-zero]
Exec=recode windows-1256 "%F"
Name[en_US]=Default profile
Name[en]=Default profile
Name[C]=Default profile

The code worked properly for a while but now it fails!
When I set action's ExecutionMode to DisplayOutput it displays this:

Run command:
/bin/sh -c 'recode  windows-1256 "'\''/home/ariyan/'\''"'

Standard output:

Standard error:
recode: fopen ('/home/ariyan/'): No such file or directory

it can't find the file while it is there! (When I run the same command in a terminal window it works)
What is the problem ?
Why sh can't find the file?


share|improve this question
up vote 0 down vote accepted

The problem was quotes in command!
using recode windows-1256 %F instead of recode windows-1256 "%F" solved the problem!

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.