octet-stream

firefox突然变成了用gedit打开pdf文件,

Where the link to http://download.jw.org/files/media_m...E_20150201.pdf caused the problem of the file being offered to be opened with gedit to occur, the link to http://www.analysis.im/uploads/seminar/pdf-sample.pdf did not and offered me to open it with document viewer as expected.

The difference is the server configuration. The first file is offered with the application/octet-stream mime-type, the latter with application/pdf mime-type as it should be.
To prevent Firefox from opening every file offered with the general application/octet-stream mime-type with gedit you should alter the following files:

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

Find the following line in those files and remove it.

application/octet-stream=gedit.desktop;

Save the file, restart Firefox and enjoy your downloads again.

时间: 2024-10-17 18:42:26

octet-stream的相关文章

centos6.5安装部署git服务器(gitlab)

环境准备 python版本2.6 git版本 1.8.4.1 ruby版本ruby-2.0.0-p353 gitlab-shell版本 v1.8.0 gitlab版本6.4.3 因centos6系列的python版本是2.6的,已经支持,所以不必升级python版本. 在centos5下面需要升级python版本>2.5 安装epel的yum源 1 yum -y install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-

Chapel 2.Network interfaces

Note: Copy from TCP/IP Tutorial and Technical Overview (IBM Redbook GG24-3376-07)[000] 2.1 Ethernet and IEEE 802 local area networks (LANs) 2.1.1 Gigabit Ethernet 2.2 Fiber Distributed Data Interface (FDDI) 2.3 Serial Line IP (SLIP) 2.4 Point-to-Poin

centos6安装部署git服务器(gitlab6.4)

环境准备 python版本2.6git版本 1.8.4.1ruby版本ruby-2.0.0-p353gitlab-shell版本 v1.8.0gitlab版本6.4.3 因centos6系列的python版本是2.6的,已经支持,所以不必升级python版本.在centos5下面需要升级python版本>2.5 安装epel的yum源 1 yum -y install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.n

点击下载,下载图片

在制作网页的时候,经常会出现需要添加“下载”按钮,对于那些下载各类压缩包格式的文件来说,浏览器会直接下载: 浏览器能识别的格式会直接打开,不能识别的格式会采用下载的形式进行. 比如PDF和jpg,png图片等格式的文件,设置<a>标签href属性会将文件在页面中直接打开.如果href链接的是zip,rar等不能识别的格式,则会采用下载的形式. 如果想要实现,点击下载,图片不在页面中打开,而是下载的形式讲图片保存到本地,可以采用php的特性来做.(当然也可以是点击下载图片,图片在单独的页面中出现

Express4 Route笔记

可以参考Express官网关于路由一节:http://expressjs.com/guide/routing.html 1:通过使用GET.POST方式定义主页路由,app.js: var express = require('express'); var app = express(); app.get('/', function(req,res){ res.send('欢迎来到Express首页'); }); app.post('/', function(req,res){ res.send

php 文件下载功能

01.<a href="word.php?file=help&type=doc">宽带故障排查手册下载</a> 下面是word.php页面 [php] view plaincopy 01.if (!isset(GET["file"]) || !isset(GET["type"])) { 02.print "no file selsect"; exit(); 03.} 04.$file = GET

Nginx+Tomcat集群部署

为了获取更好的性能,我们常常需要将tomcat进行集群部署.下文通过nginx转发实现tomcat集群,并通过nginx-upstream-jvm-route插件保证session的粘滞. 应用场景环境: server1 服务器上安装了 nginx + tomcat01 server2 服务器上只安装了 tomcat02 server1 IP 地址: 192.168.1.88 server2 IP 地址: 192.168.1.89 安装步骤: 1)在server1 上安装配置 nginx + n

php 下载图片 文件

$file = dirname(dirname(__FILE__)) . $_GET['download']; //获取图片的绝对路径 header("Content-type: octet/stream"); //下载的文件类型 这里是任何文件 header("Content-disposition:attachment;filename=".$file.";"); header("Content-Length:".file

RFC 4627 JSON

Network Working Group D. Crockford Request for Comments: 4627 JSON.org Category: Informational July 2006 The application/json Media Type for JavaScript Object Notation (JSON) Status of This Memo This memo provides information for the Internet communi

JSON数据乱码问题

http://ifeve.com/json-code-problem/ ***************************** 背景 程序员一提到编码应该都不陌生,像gbk.utf-8.ascii等这些编码更是经常在用,但时不时也会出个乱码问题,解决这个问题的方法大部分都是先 google和baidu一下,最后可能在某个犄角旮旯里找到一点信息,然后就机械的按部就班的模仿下来,结果问题可能真就迎刃而解了,然后就草草了事, 下回遇到相似的问题,可能又是重复上面的过程.很少有人有耐心去花精力弄明白