Ubuntu16.04右键‘打开方式’选择程序没了命令选择mplayer
发表于 : 2016-07-09 16:00
想mplayer打开视频文件很麻烦了,请高手解决。。。。。。安装mplayer-gui 打开会报出错,只能直接用mplayer。
解决方法,为了在打开方式,显示mplayer程序,必须有mplayer.desktop 还得有个程序图标文件。
wget http://upload.wikimedia.org/wikipedia/c ... Player.svg 得到图标文件
打开gedit,粘贴下面,保存为mplayer.desktop,放到~/.local/share/applications/mplayer.desktop
这样就不用终端命令保存到/usr/share/applications 图标也不用放到/usr/share/pixmaps
#!/usr/bin/env xdg-open
[Desktop Entry]
Categories=AudioVideo;Player;Video;
Comment=A great MPlayer front-end
Exec=mplayer %U
GenericName=Media Player
Icon=~/MPlayer.svg
MimeType=audio/ac3;audio/mp4;audio/mpeg;audio/vnd.rn-realaudio;audio/vorbis;audio/x-adpcm;audio/x-matroska;audio/x-mp2;audio/x-mp3;audio/x-ms-wma;audio/x-vorbis;audio/x-wav;audio/mpegurl;audio/x-mpegurl;audio/x-pn-realaudio;audio/x-scpls;audio/aac;audio/flac;audio/ogg;video/avi;video/mp4;video/flv;video/mpeg;video/quicktime;video/vnd.rn-realvideo;video/x-matroska;video/x-ms-asf;video/x-msvideo;video/x-ms-wmv;video/x-ogm;video/x-theora;video/webm;
Name=MPlayer
Type=Application
X-KDE-StartupNotify=false
Keywords=movie;player;media;
X-Ayatana-Desktop-Shortcuts=Screen;Window
mplayer.desktop属性--权限,设为允许为执行文件
解决方法,为了在打开方式,显示mplayer程序,必须有mplayer.desktop 还得有个程序图标文件。
wget http://upload.wikimedia.org/wikipedia/c ... Player.svg 得到图标文件
打开gedit,粘贴下面,保存为mplayer.desktop,放到~/.local/share/applications/mplayer.desktop
这样就不用终端命令保存到/usr/share/applications 图标也不用放到/usr/share/pixmaps
#!/usr/bin/env xdg-open
[Desktop Entry]
Categories=AudioVideo;Player;Video;
Comment=A great MPlayer front-end
Exec=mplayer %U
GenericName=Media Player
Icon=~/MPlayer.svg
MimeType=audio/ac3;audio/mp4;audio/mpeg;audio/vnd.rn-realaudio;audio/vorbis;audio/x-adpcm;audio/x-matroska;audio/x-mp2;audio/x-mp3;audio/x-ms-wma;audio/x-vorbis;audio/x-wav;audio/mpegurl;audio/x-mpegurl;audio/x-pn-realaudio;audio/x-scpls;audio/aac;audio/flac;audio/ogg;video/avi;video/mp4;video/flv;video/mpeg;video/quicktime;video/vnd.rn-realvideo;video/x-matroska;video/x-ms-asf;video/x-msvideo;video/x-ms-wmv;video/x-ogm;video/x-theora;video/webm;
Name=MPlayer
Type=Application
X-KDE-StartupNotify=false
Keywords=movie;player;media;
X-Ayatana-Desktop-Shortcuts=Screen;Window
mplayer.desktop属性--权限,设为允许为执行文件