Welcome to Vifm Q&A, where you can ask questions about Vifm usage. Registration is optional, anonymous posts are moderated. GitHub or Google logins are enabled.
0 votes
in vifm by

Hello!
I have a problem with defining new file associations in vifm. For example when I try to get smplayer to open video files, i get this type of message:

/bin/bash: /home/freeman/Video/movie.mp4: cannot execute binary file: Exec format error Press return ...

I use this lines in vifmrc:

filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
         \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
         \*.as[fx]
	 \{smplayer}
	 \smplayer  %f &

When I try launch vifm this sudo and add same lines to vifmrc, smplayer plays files as supposed. I also have same message for another programs that I try to add to vifmrc.

1 Answer

0 votes
by

Hi!

You're missing whitespace. If you look at :filextype test.avi, you'll see %f & as the command.

This should work:

filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
         \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
         \*.as[fx]
	 \ {smplayer}
	 \ smplayer  %f &

The space before {smplayer} makes the difference, without it *.avi,...,*.as[fx]{smplayer}smplayer is taken as the first argument.

See related documentation.

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here is acceptable, but this is not a perfect place for them.
...