ubuntu 设置默认值 VLC / LibreOffice 等

Associate all audio and video files to VLC instead of Totem media player (Movie Player)

 

Video files: .avi .mp4 .mpg .ogv .ogm .mkv .wmv etc.
Audo files: .mp3 .ogg .flac .wav .wma etc.

 

Open defaults.list with gedit:

gksudo gedit /usr/share/applications/defaults.list
 

And replace all occurences of totem with banshee/rythmbox/vlc or the media player of your choice.
(Search → Replace → Replace All)  (=totem.desktop => =vlc.desktop)

 

Change MIME types in Ubuntu

 

Save the modified file, and you're done! Change are effective immediately.

 

 

Associate all office documents to LibreOffice instead of OpenOffice.org or Abiword

 

Office files:  .odt  .ods.  .doc  .docx  .xls  .xlsx  etc.

 

Open defaults.list with gedit:

gksudo gedit /usr/share/applications/defaults.list
 

And replace all occurences of "openoffice.org" with "libreoffice".
(Search → Replace → Replace All)

 

Finally, save the file. No need to restart, you're all set!

 

Ubuntu's case

For an obscure reason, changing the file associations directly in the defaults.list doesn't seem to work Ubuntu 10.10 "Maverick Meerkat". Nevertheless, importing information to the the mimeapps.list works.

 

The file associations for each user are stored in:

~/.local/share/applications/mimeapps.list
 

In Ubuntu 10.10 "Maverick Meerkat" (and probably 10.04 "Lucid Lynx"), this file is almost empty. Let's import informations from

/usr/share/applications/defaults.list
 

Display all the video MIME types associations with this command:

cat /usr/share/applications/defaults.list | grep video
 

Append all the lines containing video types to the local file:

cat /usr/share/applications/defaults.list | grep video >> ~/.local/share/applications/mimeapps.list
 

Open defaults.list with gedit:

gedit ~/.local/share/applications/mimeapps.list
 

And replace all occurences of totem with vlc (Search → Replace...) Proceed similarly for audio files if needed.

 

 

来源: http://www.libre-software.net/change-the-default-application-linux-mint-ubuntu

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值