Tuesday 16 December 2014

大数据

(导读)科技的进步在很多的时候总会超出我们的想象,如果未来我们一个人拥有的电脑设备超过现在全球现在计算能力的总和,一个人产生的数据量超过现 在全球数据量的总和,甚至你的宠物小狗产生的信息量都超过现在全球数据量的总和,世界会发生什么呢?阅读本文,大数据(Big Data)会告诉你一个充满奇幻色彩的世界。

一、详解时髦词汇:大数据
似乎一夜之间,大数据(Big Data)变成一个IT行业中最时髦的词汇。
首先,大数据不是什么完完全全的新生事物,Google的搜索服务就是一个典型的大数据运用,根据客户的需求,Google实时从全球海量的数字资产(或 数字垃圾)中快速找出最可能的答案,呈现给你,就是一个最典型的大数据服务。只不过过去这样规模的数据量处理和有商业价值的应用太少,在IT行业没有形成 成型的概念。现在随着全球数字化、网络宽带化、互联网应用于各行各业,累积的数据量越来越大,越来越多企业、行业和国家发现,可以利用类似的技术更好地服 务客户、发现新商业机会、扩大新市场以及提升效率,才逐步形成大数据这个概念。
有一个有趣的故事是关于奢侈品营销的。PRADA在纽约的旗舰店中每件衣服上都有RFID码。每当一个顾客拿起一件PRADA进试衣间,RFID会被自动 识别。同时,数据会传至PRADA总部。每一件衣服在哪个城市哪个旗舰店什么时间被拿进试衣间停留多长时间,数据都被存储起来加以分析。如果有一件衣服销 量很低,以往的作法是直接干掉。但如果RFID传回的数据显示这件衣服虽然销量低,但进试衣间的次数多。那就能另外说明一些问题。也许这件衣服的下场就会 截然不同,也许在某个细节的微小改变就会重新创造出一件非常流行的产品。
从这个案例来看,大数据并不是很神奇的事情。就如同电影《永无止境》提出的问题:人类通常只使用了20%的大脑,如果剩余80%大脑潜能被激发出来,世界 会变得怎样?在企业、行业和国家的管理中,通常只有效使用了不到20%的数据(甚至更少),如果剩余80%数据的价值激发起来,世界会变得怎么样呢?特别 是随着海量数据的新摩尔定律,数据爆发式增长,然后数据又得到更有效应用,世界会怎么样呢?
单个的数据并没有价值,但越来越多的数据累加,量变就会引起质变,就好像一个人的意见并不重要,但1千人、1万人的意见就比较重要,上百万人就足以掀起巨大的波澜,上亿人足以改变一切。
中国的航班晚点非常多,相比之下美国航班准点情况好很多。这其中,美国航空管制机构一个的好做法发挥了积极的作用,说起来也非常简单,就是美国会公布每个 航空公司、每一班航空过去一年的晚点率和平均晚点时间,这样客户在购买机票的时候就很自然会选择准点率高的航班,从而通过市场手段牵引各航空公司努力提升 准点率。这个简单的方法比任何管理手段都直接和有效。
没有整合和挖掘的数据,价值也呈现不出来。《永无止境》中的库珀如果不能把海量信息围绕某个公司的股价整合起来、串联起来,这些信息就没有价值。
因此,海量数据的产生、获取、挖掘及整合,使之展现出巨大的商业价值,这就是我理解的大数据。在互联网对一切重构的今天,这些问题都不是问题。因为,大数 据是互联网深入发展的下一波应用,是互联网发展的自然延伸。目前,可以说大数据的发展到了一个临界点,因此才成为IT行业中最热门的词汇之一。
二、大数据将重构很多行业的商业思维和商业模式
我想以对未来汽车行业的狂野想象来展开这个题目。
在人的一生中,汽车是一项巨大的投资。以一部30万车、7年换车周期来算,每年折旧费4万多(这里还不算资金成本),加上停车、保险、油、维修、保养等各项费用,每年耗费应在6万左右。汽车产业也是一个很长产业链的龙头产业,这个方面只有房地产可以媲美。
但同时,汽车产业链是一个低效率、变化慢的产业。汽车一直以来就是四个轮子、一个方向盘、两排沙发(李书福语)。这么一个昂贵的东西,围绕车产生的数据却少的可怜,行业产业链之间几无任何数据传递。
我们在这里狂野地想象一番,如果将汽车全面数字化,都大数据了,会产生什么结果?
有些人说,汽车数字化,不就是加个MBB模块吗?不,这太小儿科了。在我理想中,数字化意味着汽车可以随时联上互联网,意味着汽车是一个大型计算系统加上 传统的轮子、方向盘和沙发,意味着可以数字化导航、自动驾驶,意味着你和汽车相关的每一个行动都数字化,包括每一次维修、每一次驾驶路线、每一次事故的录 像、每一天汽车关键部件的状态,甚至你的每一个驾驶习惯(如每一次的刹车和加速)都记录在案。这样,你的车每月甚至每周都可能产生T比特的数据。
好了,我们假设这些数据都可以存储并分享给相关的政府、行业和企业。这里不讨论隐私问题带来的影响,假设在隐私保护的前提下,数据可以自由分享。
那么,保险公司会怎么做呢?保险公司把你的所有数据拿过去建模分析,发现几个重要的事实:一是你开车主要只是上下班,南山到坂田这条线路是非繁华路线,红 绿灯很少,这条路线过去一年统计的事故率很低;你的车况(车的使用年限、车型)好,此车型在全深圳也是车祸率较低;甚至统计你的驾驶习惯,加油平均,临时 刹车少,超车少,和周围车保持了应有的车距,驾驶习惯好。最后结论是你车型好,车况好,驾驶习惯好,常走的线路事故率低,过去一年也没有出过车祸,因此可 以给予更大幅度的优惠折扣。这样保险公司就完全重构了它的商业模式了。在没有大数据支撑之前,保险公司只把车险客户做了简单的分类,一共分为四种客户,第 一种是连续两年没有出车祸的,第二种过去一年没有出车祸,第三种过去一年出了一次车祸,第四种是过去一年出了两次及以上车祸的,就四种类型。在大数据的支 持下,保险公司可以真正以客户为中心,把客户分为成千上万种,每个客户都有个性化的解决方案,这样保险公司经营就完全不同,对于风险低的客户敢于大胆折 扣,对于风险高的客户报高价甚至拒绝,一般的保险公司就完全难以和这样的保险公司竞争了。拥有大数据并使用大数据的保险公司比传统公司将拥有压倒性的竞争 优势,大数据将成为保险公司最核心的竞争力,因为保险就是一个基于概率评估的生意,大数据对于准确评估概率毫无疑问是最有利的武器,而且简直是量身定做的 武器。
在大数据的支持下,4S店的服务也完全不同了。车况信息会定期传递到4S店,4S店会根据情况及时提醒车主及时保养和维修,特别是对于可能危及安全的问题,在客户同意下甚至会采取远程干预措施,同时还可以提前备货,车主一到4S店就可以维修而不用等待。
对于驾驶者来说,不想开车的时候,在大数据和人工智能的支持下,车辆可以自动驾驶,并且对于你经常开的线路可以自学习自优化。谷歌的自动驾驶汽车,为了对 周围环境作出预测,每秒钟要收集差不多1GB的数据,没有大数据的支持,自动驾驶是不可想象的;在和周围车辆过近的时候,会及时提醒车主避让;上下班的时 候,会根据实时大数据情况,对于你经常开车的线路予以提醒,绕开拥堵点,帮你选择最合适的线路;到城市中心,寻找车位是一件很麻烦的事情,但未来你可以到 了商场门口后,让汽车自己去找停车位,等想要回程的时候,提前通知让汽车自己开过来接。
车辆是城市最大最活跃的移动物体,是拥堵的来源,也是最大的污染来源之一。数字化的车辆、大数据应用将带来很多的改变。红绿灯可以自动优化,根据不同道路 的拥堵情况自动进行调整,甚至在很多地方可以取消红绿灯;城市停车场也可以大幅度优化,根据大数据的情况优化城市停车位的设计,如果配合车辆的自动驾驶功 能,停车场可以革命性演变,可以设计专门为自动驾驶车辆的停车楼,地下、地上楼层可以高达几十层,停车楼层可以更矮,只要能高于车高度即可(或者把车竖起 来停),这样将对城市规划产生巨大的影响;政府还可以每年公布各类车型的实际排污量、税款、安全性等指标,鼓励民众买更节能、更安全的车。
电子商务和快递业也可能发生巨大的变化。运快递的车都可以自动驾驶,不用赶白天的拥堵的道路,晚上半夜开,在你家门口设计自动接收箱,通过密码开启自动投递进去,就好像过去报童投报一样。
这么想象下来,我认为,汽车数字化、互联网化、大数据应用、人工智能,将对汽车业及相关的长长的产业链产生难以想象的巨大变化和产业革命,具有无限的想象 空间,可能完全被重构。当然,要实现我所描述的场景,估计至少50年、100年之后的事情了,估计我这辈子是看不到的。
在这个章节的最后,我想总结一下自己对大数据的看法。
第一,大数据使企业真正有能力从以自我为中心改变为以客户为中心。企业是为客户而生,目的是为股东获得利润。只有服务好客户,才能获得利润。大数据的使用 能够使对企业的经营对象从客户的粗略归纳(就是所谓提炼归纳的“客户群”)还原成一个个活生生的客户,这样经营就有针对性,对客户的服务就更好,投资效率 就更高。
第二,大数据一定程度上将颠覆了企业的传统管理方式。现代企业的管理方式是来源于对军队的模仿,依赖于层层级级的组织和严格的流程,依赖信息的层层汇集、 收敛来制定正确的决策,再通过决策在组织的传递与分解,以及流程的规范,确保决策得到贯彻,确保每一次经营活动都有质量保证,也确保一定程度上对风险的规 避。
第三,大数据另外一个重大的作用是改变了商业逻辑,提供了从其他视角直达答案的可能性。现在人的思考或者是企业的决策,事实上都是一种逻辑的力量在主导起 作用。大数据给了我们其他的选择,就是利用数据的力量,直接获得答案。就好像我们学习数学,小时候学九九乘法表,中学学几何,大学还学微积分,碰到一道难 题,我们是利用了多年学习沉淀的经验来努力求解,但我们还有一种方法,在网上直接搜索是不是有这样的题目,如果有,直接抄答案就好了。很多人就会批评说, 这是抄袭,是作弊。但我们为什么要学习啊?不就是为了解决问题嘛。
第四,通过大数据,我们可能有全新的视角来发现新的商业机会和重构新的商业模式。我们现在看这个世界,比如分析家中食品腐败,主要就是依赖于我们的眼睛再 加上我们的经验,但如果我们有一台显微镜,我们一下就看到坏细菌,那么分析起来完全就不一样了。大数据就是我们的显微镜,它可以让我们从全新视角来发现新 的商业机会,并可能重构商业模型。我们的产品设计可能不一样了,很多事情不用猜了,客户的习惯和偏好一目了然,我们的设计就能轻易命中客户的心窝;我们的 营销也完全不同了,我们知道客户喜欢什么、讨厌什么,更有针对性。特别是显微镜再加上广角镜,我们就有更多全新的视野了。这个广角镜就是跨行业的数据流 动,使我们过去看不到的东西都能看到了。
最后一点,我想谈的是大数据发展对IT本身技术架构的革命性影响。大数据的根基是IT系统。我们现代企业的IT系统基本上是建立在IOE(IBM小型机、 Oracle数据库、EMC存储)+Cisco模型基础上的,这样的模型是Scale-UP型的架构,在解决既定模型下一定数据量的业务流程是适配的,但 如果是大数据时代,很快会面临成本、技术和商业模式的问题,大数据对IT的需求很快就会超越了现有厂商架构的技术顶点,超大数据增长将带来IT支出增长之 间的线性关系,使企业难以承受。因此,目前在行业中提出的去IOE趋势,利用Scale-out架构+开源软件对Scale-up架构+私有软件的取代, 本质是大数据业务模型所带来的,也就是说大数据将驱动IT产业新一轮的架构性变革。去IOE潮流中的所谓国家安全因素,完全是次要的。
所以,美国人说,大数据是资源,和大油田、大煤矿一样,可以源源不断挖出大财富。而且和一般资源不一样,它是可再生的,是越挖越多、越挖越值钱的,这是反自然规律的。对企业如此,对行业、对国家也是这样,对人同样如此。
三、新智慧生物的诞生?
自然语言的机器翻译,是长期以来人工智能研究的一个重要体现。人工智能从过去到未来都有清晰而巨大的商业前景,是以前IT业的热点,其热度一点不亚于现在的“互联网”和“大数据”。但是,人类过去在推进人工智能的研究遇到了巨大的障碍,最后几乎绝望。
当时人工智能就是模拟人的智能思考方式来构筑机器智能。以机器翻译来说,语言学家和语言专家必须不辞劳苦地编撰大型词典和与语法、句法、语义学有关的规 则,数十万词汇构成词库,语法规则高达数万条,考虑各种情景、各种语境,模拟人类翻译,计算机专家再构建复杂的程序。最后发现人类语言实在是太复杂了,穷 举式的做法根本达不到最基本的翻译质量。这条道路最后的结果是,1960年代后人工智能的技术研发停滞不前数年后,科学家痛苦地发现以“模拟人脑”、“重 建人脑”的方式来定义人工智能走入一条死胡同,这导致后来几乎所有的人工智能项目都进入了冷宫。
后来有人就想,机器为什么要向人学习逻辑呢,又难学又学不好,机器本身最强大的是计算能力和数据处理能力,为什么不扬长避短、另走一条道路呢?这条道路就 是IBM“深蓝”走过的道路。1997年5月11日,国际象棋大师卡斯帕罗夫在和IBM公司开发的计算机“深蓝”进行对弈时宣布失败,计算机“深蓝”因此 赢得了这场意义深远的“人机对抗”。
类似的逻辑在后续也用到了机器翻译上。谷歌、微软和IBM都走上了这条道路。就是主要采用匹配法,同时结合机器学习,依赖于海量的数据及其相关相关统计信息,不管语法和规则,将原文与互联网上的翻译数据对比,找到最相近、引用最频繁的翻译结果做为输出。
总而言之,利用这种技术,计算机教会自己从大数据中建立模式。有了足够大的信息量,你就能让机器学会做看上去有智能的事情,别管是导航、理解话语、翻译语言,还是识别人脸,或者模拟人类对话。
假设目前刚刚兴起的穿戴式计算设备取得巨大的进展。这种进展到什么程度呢?就是你家的宠物小狗身上也装上了各种传感器和穿戴式设备,比如有图像采集,有声 音采集,有嗅觉采集,有对小狗的健康进行监控的小型医疗设备,甚至还有电子药丸在小狗的胃中进行消化情况监控。小狗当然也联上网,也一样产生了巨大的数据 量。这时,我们假设基于这些大数据建模,能够模拟小狗的喜怒哀乐,然后还能够通过拟人化的处理进行语音表达,换句话说,就是模拟小狗说人话,比如主人回家 时,小狗摇尾巴,旺旺叫,那么这个附着于小狗身上的人工智能系统就会说,“主人,真高兴看到你回家”。不仅如此,你还可以和小狗的人工智能系统进行对话, 因为这个人工智能系统能基本理解你的意思,又能够代替小狗拟人化表达。
我们继续把这个故事来做延伸,把小狗换成未来的人,人在一生中产生大量的数据,根据这些数据建模可以直接推演出很多的结论,比如喜欢看什么样的电影啊,喜欢什么口味的菜啊,在遇到什么问题时会怎么采取什么行动啊。
这样的数据一直累积下来,直到这个人去世。我们有个大胆的想象,这些巨大的数据能否让这个人以某种方式继续存在下去呢?后代有什么问题需要寻求答案的时 候,比如在人生的关键抉择时,比如大学要上什么专业、该不该和某个姑娘结婚,可不可以问问这个虚拟的人(祖先)有什么建议呢?答案是当然可以。在这种情况 下,数字化生存不仅在人生前存在,也可以在人死后继续存在。人死了,可以在虚拟空间中继续存在。一辈子、一辈子的人故去,这些虚拟的智慧都可以继续存在, 假设很多年过去了,这些虚拟智慧的祖宗们太多太多了,活着的子孙们甚至可以组建一个“祖宗联席参谋委员会”,优选那些考得好的(比如中过状元),当过国家 高级公务员(比如太守)、当过企业高管(比如CEO)、当过教授、当过作家的等等当过成功人士的祖宗,专门用于后代的咨询、解惑。让这些祖宗死后还有竞 争,别死了就没有事情干了。
这些说明什么呢?就是随着大数据和机器学习的进一步进展,这个世界出现了新的智慧生物!大数据和机器学习在改变、重构和颠覆很多企业、行业和国家以后,终于到了改变人类自身的时候了!人类的演进出现了新的分支!
有科学家画了下面一张图,来描述这两者智慧生物。一种是基于生物性的,经过几百万年的进化而来;一种是基于IT技术,基于大数据和机 器学习,通过自模拟、自学习而来。前者更有逻辑性,更有丰富的情感,有创造力,但生命有限;后者没有很强的逻辑性,没有生物上的情感,但有很强的计算、建 模和搜索能力,理论上生命是无限的。
当然,这些事情要发生都会非常非常遥远。反正我们活着的时候是见不到了,死了也见不到,因为我们死的时候,我相信这种建立在大数据和机器学习之上的虚拟生命还不会存在。
四、结束语
我最后想说的是,我们对未来的认知,主要是基于常识和对未来的想象。根据统计,现在《纽约时报》一周的信息量比18世纪一个人一生所收到的资讯量更大,现 在18个月产生的信息比过去5000年的总和更多,现在我家一台5000元电脑的计算能力比我刚入大学时全校的计算能力更强大。科技的进步在很多的时候总 会超出我们的想象,试想如果未来我们一个人拥有的电脑设备超过现在全球现在计算能力的总和,一个人产生的数据量超过现在全球数据量的总和,甚至你的宠物小 狗产生的信息量都超过现在全球数据量的总和,世界会发生什么呢?那就取决于你的想象力了。

10 Things To Do After Installing Ubuntu 14.04 Trusty Tahr To Get A Near Perfect Desktop

Note: This is from http://www.webupd8.org/2014/04/10-things-to-do-after-installing-ubuntu.html
 
Ubuntu 14.04 LTS (Trusty Tahr) will be released tomorrow and since many of you will install it as soon as it's released (or maybe you're already using Ubuntu 14.04), here's a list of 10 useful things to do to get a near perfect desktop.

Ubuntu 14.04 things to do

While the tweaks below are targeted at Unity, many of them also work with other Ubuntu flavors like Xubuntu, Kubuntu, Lubuntu or Ubuntu GNOME.

Update: the instructions / things to do below also apply for the latest Ubuntu 14.10 (Utopic Unicorn), except for:
  • 1.2 (Pidgin Indicator is no longer required because Pidgin now ships with a Unity integration plugin; you can still use Pidgin Indicator if you want though);
  • 3.1 (Firefox now supports H224 without any tweaks);
  • 4.1 (you can continue to use Pipelight for various web services that require Silverlight, but that's no longer required for Netflix - to use Netflix with HTML5, simply install Google Chrome and it should work without any additional tweaks - that's now also the case for Ubuntu 14.04).



1. Install Ubuntu AppIndicators (applets)


Ubuntu ships with just a few indicators by default because well, it can't guess what everybody needs. So here are some indicators you might find useful.

1.1 Calendar Indicator is one of my favorite Ubuntu indicators. This AppIndicator displays your 10 upcoming events in the indicator menu, can add new events (which of course, are synced with Google Calendar) and it has a complete calendar view where you can see all your Google Calendar events, edit or add new events, etc.

Google Calendar Indicator

To install Calendar Indicator in Ubuntu 14.04, use the following commands:
sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install calendar-indicator

1.2 Pidgin may not be the default IM client for a few Ubuntu releases, but it's still a very popular application. Pidgin uses a tray icon by default but you can now use an AppIndicator which is especially useful since the old Unity systray whitelist is no longer available.

Pindgin Indicator

Pidgin Indicator is not an part of Pidgin by default but it works great and you can install it in Ubuntu 14.04 by using the main WebUpd8 PPA:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install pidgin-indicator
Once installed, open Pidgin and from its menu select Tools > Plugins, then scroll down until you see a plugin called "Ubuntu Indicator" and enable this plugin.


1.3 Since Ubuntu doesn't ship with a weather indicator, I recommend My Weather Indicator, an appindicator that displays the current weather on the Unity top panel. The tool can also display a 5-day forecast (it depends on which Weather service you use), it comes with some very nice (optional) desktop widgets and more.

My Weather Indicator

To install it in Ubuntu 14.04, use the following commands:
sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install my-weather-indicator

1.4 Variety is more of a fully featured application than just a simple AppIndicator, but I'll add it here anyway since I'm sure many of you will love it.

Variety Wallpaper Changer

Variety is a wallpaper changer that automatically downloads and changes your wallpaper on a given interval. Using it, you'll get cool, fresh wallpapers each day. Or each hour. Or... well, it's up to you when the wallpaper changes. From the AppIndicator menu you can quickly switch to the next (random) wallpaper or copy the wallpaper to favorites, for later use.

To install Variety in Ubuntu, use the following commands:
sudo add-apt-repository ppa:peterlevi/ppa
sudo apt-get update
sudo apt-get install variety

1.5 Cpufreq Indicator is the equivalent of the old GNOME CPU frequency scaling applet which can be used for changing the CPU frequency on-the-fly. Install it in Ubuntu by clicking the button below:

Download for Ubuntu

Or install it from the command line:
sudo apt-get install indicator-cpufreq

Cpufreq indicator

Note that Cpufreq Indicator doesn't work with Intel P-State (see 8.2).

For more Ubuntu indicators, see our AppIndicator tag.


2. Tweak Unity


2.1 Some Unity settings are available in the Appearance settings, some in CCSM, some can only be accessed via Dconf and so on. With Unity Tweak Tool, you have access to almost all these settings in one place, using a very nice user interface.

Unity Tweak Tool

Unity Tweak Tool allows you to change various Unity settings, like auto-hide behavior, tweak the Dash, the Unity Launcher or HUD, change window snapping and hot corner settings, change the GTK and icon theme, access various font settings and more.

To install Unity Tweak Tool from the Ubuntu Software Center, click the button below:

Download for Ubuntu

Or, install it in Ubuntu 13.10 via command line:
sudo apt-get install unity-tweak-tool


2.2 Privacy

By default, Dash displays all the recently accessed files along with other files found on your system. But you can change this by selecting Security & Privacy from System Settings, and then tweak everything to suit your needs:

Ubuntu Privacy

On the Search tab, you can select to disable online search results from being displayed in Dash. However, you may want to use some scopes so instead of completely disabling this, you can open Dash and on the applications lens (the second lens) click "Filter results", then select "Dash plugins" - here, you can enable/disable any Dash plugin you want:

Ubuntu Dash Plugins

To disable a plugin, click it and then simply click "Disable":

Ubuntu Dash Plugins

If you want to disable the shopping suggestions, you can run the following command in a terminal:
gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']"


2.3 An option to enable minimize on click for the Unity Launcher was one of the most requested Ubuntu features and you can now enable this in Ubuntu 14.04.

Update: Unity Tweak Tool was updated with an option to enable minimize on click for the Unity Launcher.

To enable minimize on click for the Unity Launcher (Unity Tweak Tool doesn't support this yet), install CompizConfig Settings Manager. You can install it by clicking the button below:

Download for Ubuntu

Or, to install it via command line, use:
sudo apt-get install compizconfig-settings-manager

Then, open CompizConfig Settings Manager from Dash, click the "Ubuntu Unity Plugin" and on the Launcher tab, enable "Minimize single window applications (unsupported)":

CCSM

Note that this feature only works with single window applications.

2.4 Try the new locally integrated menus (LIM)

Ubuntu 14.04 ships with a new (non-default) type of menu called "LIM", or "locally integrated menu". Locally integrated menus are displayed in the window decorations for unmaximized windows, instead of the default Unity approach which is to display the menu on the top panel, and are displayed on mouse over.

Ubuntu locally integrated menus

Since the Unity global menu is not appreciated by everybody, maybe you'll find LIM better, so give it a try. To enable it, open System Settings > Appearance and on the Behavior tab, select to show the menus "in the window's title bar":

Ubuntu locally integrated menus


3. Fixes


3.1 Get Firefox to support H.264

The FFmpeg plugin for GStreamer 0.10 is not available in the official Ubuntu 14.04 repositories (because FFMpeg is not available either - libav is used instead) and because of this, Firefox doesn't support the H.264 codec.

Furthermore, without the FFmpeg plugin for GStreamer 0.10 package, KDE apps can't play H.264 videos in Kubuntu 14.04 if they use the GStreamer backend. Another issue with this is that Amarok can't play WMA files. There might also be other affected applications.

Before:

Firefox h.264

After:

Firefox h.264

To "fix" this, all you need is install the "gstreamer0.10-ffmpeg" package and its dependencies. If you've upgraded from an older Ubuntu version, this package might already be installed but if this is a fresh install, you can get the package from a PPA. Add the PPA and install it using the following commands:
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install gstreamer0.10-ffmpeg

3.2 Fix Skype not using the correct system theme on 64bit

On 64bit Ubuntu systems, Skype uses the Clearlooks theme instead of the default Ubuntu theme, Ambiance (this also happens with other themes).

This occurs because Skype is a 32bit application and the GTK2 theme engine (Murrine or Pixmap in most cases) is not installed for 32bit.

Before:

Skype broken theme 64bit Ubuntu

After:

Skype fixed theme 64bit Ubuntu

To fix this, you need to install the 32bit Murrine and Pixmap GTK2 engines:
sudo apt-get install gtk2-engines-murrine:i386 gtk2-engines-pixbuf:i386

3.3 Fix missing Skype tray icon / appindicator on Ubuntu 64bit


On 64bit, the required package to get a Skype tray / appindicator icon is not installed automatically. To fix this, use the following command:
sudo apt-get install sni-qt:i386
The Skype tray icon might disappear after you log in, but it should show up after a few seconds.


4. Web browser (Firefox, Google Chrome / Chromium) tweaks


4.1 Firefox, Google Chrome/Chromium: if you want to use services such as Netflix, Maxdome and others, you can use Pipelight. Pipelight lets you use Microsoft Silverlight, Widevine (the built-in Chrome Widevine doesn't work with many websites), and more with native Linux web browsers (Pipelight itself uses Wine).

Netflix Ubuntu

Before installing Pipelight, it's strongly recommended to close your web browser. Without doing this, the plugin may fail to install or crash the browser (you can copy the instructions below to a text editor).

To install Pipelight in Ubuntu 14.04, you can use its official PPA. Add the PPA and install Pipelight using the commands below:
sudo apt-add-repository ppa:pipelight/stable
sudo apt-get update
sudo apt-get install pipelight-multi

Then, install the Silverlight plugin using the following command:
sudo pipelight-plugin --enable silverlight

To install the Widevine plugin, use the command below:
sudo pipelight-plugin --enable widevine


A lot more about Pipelight, here: Pipelight: Use Silverlight In Your Linux Browser To Watch Netflix, Maxdome Videos And More


4.2 Chromium will soon stop using the Netscape Plugin API, and as a result, the Linux Adobe Flash will stop working. To get Flash working in Chromium, you can use the Pepper Flash Player installer (Pepper Flash is extracted from Google Chrome), which is available in the official Ubuntu 14.04 repositories. To install it, use the following commands:
sudo apt-get install pepperflashplugin-nonfree
sudo update-pepperflashplugin-nonfree --install

Chromium Pepper Flash Ubuntu

For more about this, see: Pepper Flash Player Installer For Chromium Available In The Ubuntu 14.04 Repositories

4.3 Firefox doesn't use native notifications under Linux. A work-around for this issue is to use GNotifier, a Firefox extension that makes the browser use native notifications on the Linux desktop. The extension currently supports GNOME (Shell), Unity, KDE and Xfce.

Firefox native notifications GNOME Shell

Firefox native notifications Unity

The extension is available HERE and doesn't require restarting the browser after it's installed.


5. LibreOffice tweaks


LibreOffice has 2 cool features (well, one of them isn't exactly a feature but anyway) that aren't enabled by default: a sidebar that enables quick access to document styles, formatting, etc. and a cool new monochrome icon set.

LibreOffice sifr

5.1 To enable the LibreOffice sidebar, simply select View > Sidebar from the LibreOffice menu.

5.2 To use the monochrome icon set, firstly install it by clicking the button below:

Download for Ubuntu

Or, install it via the command line using:
sudo apt-get install libreoffice-style-sifr

And then to activate it, from the LibreOffice menu select Tools > Options > LibreOffice > View and select "Sifr" under "Icon size and style":


6. Nautilus "tweaks"


The heading says "tweaks" in quotes because one of them is not exactly a tweak, but a replacement.


6.1 Use the search / type-ahead feature that suit your needs

In Ubuntu 14.04, Nautilus was patched to use type-ahead find instead of its default behavior for a few Nautilus releases, which is recursive search. However, there's a Dconf option you can use to switch between these two behaviors.

Type-ahead find allows to type the name of a directory or file in the file manager to select it without searching in the sub-folders while the recursive search is, like the name suggests, a search inside the current folder and all its sub-folders.

Nautilus recursive search
Recursive search

Nautilus type-ahead find
Type-ahead find

To switch to recursive search in Nautilus under Ubuntu 14.04, use the following command:
gsettings set org.gnome.nautilus.preferences enable-interactive-search false

If you want to switch back to type-ahead find ("interactive search"), use the command below:
gsettings set org.gnome.nautilus.preferences enable-interactive-search true

More info: Nautilus Type-Ahead Find Feature Enabled By Default In Ubuntu 14.04

6.2 If you don't like Nautilus 3.10, switch to Nemo

As you know, Ubuntu 14.04 uses Nautilus 3.10 as the default file manager. Nautilus is nice, but it lacks many features it once used to have, like the dual pane view (which was triggered using F3). You can get this back by using Nemo, which I patched to work properly under Unity and to get rid of the Cinnamon dependencies (the original patches were created by Jacob Zimmermann, I just updated them for a newer Nemo version and added some other patches for better desktop integration).

Nemo file manager

Since there are some quite a few things you should know before replacing Nautilus with Nemo in Ubuntu 14.04, I won't post the instructions here, but you can read all about it in an article I posted a while back: Install Nemo With Unity Patches (And Without Cinnamon Dependencies) In Ubuntu (it includes instructions for replacing Nautilus with Nemo, installing some Nemo extensions as well as how to revert the changes in case you want to go back to Nautilus as the default file manager).



7. Nvidia Optimus tweaks


Note for AMD hybrid graphics users: you can use fglrx-pxpress and AMD Indicator which are basically the equivalents of the tweaks below for AMD, but since my laptop uses Nvidia Optimus, it means I can't test this on AMD hybrid graphics so I won't post instructions here. See the Ubuntu wiki for more info.

7.1 Switch between Nvidia and Intel graphics

Installing nvidia-prime can get your system to boot in low graphics mode if it's not used properly so be careful. This should be considered an "expert" feature and should only be used by those who know how to fix their system in case something goes wrong!

It's also important to note that you need to use LightDM (so this won't work for Ubuntu GNOME users by default because it uses GDM - you'll need to switch to LightDM) and the proprietary Nvidia drivers!

In Ubuntu 14.04, you can switch between the Nvidia and Intel graphics from the Nvidia Settings. Firstly, install nvidia-prime:
sudo apt-get purge bumblebee*
sudo apt-get install nvidia-prime
(the first command makes sure all the Bumblebee packages were purged - without this, nvidia-prime won't work)

Then simply open Nvidia Settings, select "PRIME Profiles" on the left and select the graphics card you want to use:

Ubuntu Nvidia Settings Prime profiles

Note that switching between CPUs requires a logout so you can't for instance run the desktop using the Intel graphics while running a game using the Nvidia graphics under the same session. For that you can continue to use Bumblebee, but unfortunately you can't use both, so remove nvidia-prime if you want to use Bumblebee.

7.2 Prime Indicator (requires the nvidia-prime package, see 7.1)

Ubuntu Prime indicator

To quickly switch between the Intel and Nvidia graphics or see which graphics card is currently in use, you can use Prime Indicator. You can install it in Ubuntu 14.04 using the following commands:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install prime-indicator


8. Laptop tweaks


8.1 Improve battery life

There are various tweaks that you can apply to your laptop to save battery power, but many of them depend on the hardware, Linux distribution, some are outdated or too hard to apply for regular users and so on.

TLP is an advanced power management command line tool for Linux that tries to apply these settings / tweaks for you automatically, depending on your Linux distribution and hardware.

To install TLP in Ubuntu 14.04, use the commands below:
sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw
sudo tlp start
Important: make sure laptop-mode-tools is not installed (simply run "sudo apt-get remove laptop-mode-tools" and it will be removed if it's installed), as it conflicts with TLP.

For more information, see our article on TLP.


8.2 Thermald + Intel P-State

While some users have reported that their laptops actually get a bit hotter using this, but that they get better performance with Thermald + Intel P-State (see the comments), for my laptop, this has done wonders and I can say that my now quite old laptop was never cooler. That of course might not be the case for you (since it depends on your hardware), but you can give it a try and see for yourself.

Since the instructions are pretty long, I won't post them here. Instead, see our Thermald + Intel P-State article.


9. Install codecs, Java and encrypted DVD playback


9.1 To be able to play most audio and video formats, install Ubuntu Restricted Extras by clicking the button below:

Download for Ubuntu

Or install it using the following command:
sudo apt-get install ubuntu-restricted-extras

9.2 I suggest to also install the unrestricted version of libavcodec so you don't encounter issues with missing codecs when trying to use some video editors or transcoders - install them by clicking the button below:

Download for Ubuntu

Or by using the following command:
sudo apt-get install libavcodec-extra

9.3 You may also need Java, but you must figure out what you need. Most users will only need OpenJRE and the Java browser plugin which you can install by clicking the button below:

Download for Ubuntu

Or by using the following command:
sudo apt-get install icedtea-7-plugin openjdk-7-jre

For development, you'll also want OpenJDK which you can install by using the button below:

Download for Ubuntu

Or by using the following command:
sudo apt-get install openjdk-7-jdk

If for various reasons, you need Oracle Java (the package includes JDK, JRE and the browser plugin), you can install Oracle Java 7 by using the following commands:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

9.4 Encrypted DVD playback: the Medibuntu repository no longer exists and while most packages in the Medibuntu archive are obsolete or unnecessary because most are now in the official Ubuntu repositories or have better equivalents, livdvdcss is still required for playing encrypted DVDs. 

You can enable encrypted DVD playback in Ubuntu 14.04 by using the following commands:
sudo apt-get install libdvdread4
sudo /usr/share/doc/libdvdread4/install-css.sh


10. Other tweaks / things to install


10.1 As you probably know by now, Ubuntu One will be shut down. If you were using this cloud storage service, there are many alternatives you can use, which work under Linux. Dropbox is probably the most popular, but you can also use Google Drive, which is getting better and better and it's cheap too if you want some extra space (you also get 15GB of free storage).

Ubuntu Google Drive

There's no official Google Drive client for Linux (yet), but you can use a tool like Insync (paid), or Google Drive Ocamlfuse, a tool that lets you mount Google Drive in Linux. To install Google Drive Ocamlfuse in Ubuntu 14.04, use the following commands:
sudo add-apt-repository ppa:alessandro-strada/ppa
sudo apt-get update
sudo apt-get install google-drive-ocamlfuse

Once it's installed, you'll firstly need to authorize it with Google, by running the following command:
google-drive-ocamlfuse
This should open a tab in your default web browser, asking to allow google-drive-ocamlfuse to access your Google Drive. Click "Allow", wait a few seconds for google-drive-ocamlfuse to retrieve the authorization code and you're done.

Now let's mount Google Drive. Create a folder in your home directory, let's call it "gdrive":
mkdir ~/gdrive

And mount Goole Drive using the command below:
google-drive-ocamlfuse ~/gdrive

That's it.

More info: Mount Google Drive In Linux With google-drive-ocamlfuse

10.2 If you're constantly getting crash report popups, disable Apport

Apport is disabled by default in stable released according to THIS (thanks Silviu!) however, it's not disabled if you've installed an alpha, beta or daily build.

Reporting bugs is important for Ubuntu, but if you get a large number of crash reports and nothing is actually crashing, you can disable error reporting. To do this, you need to edit "/etc/default/apport" with a text editor such as Gedit (as root):
gksu gedit /etc/default/apport
and change "enabled" from "1" to "0", then save the file.

After completing the steps above, Apport won't be started at boot any more, but let's stop the running Apport process too, so you don't have to wait until you restart your computer:
sudo service apport stop

More info: How To Get Rid Of Internal System Error Apport Popups In Ubuntu


10.3 Unity global menu & HUD support for Java swing applications

Unity global menu java swing applications

Unity HUD java swing applications


By default, Java Swing applications (IntelliJ IDEA, Android Studio, jDownloader and others) don't support Unity global menu (AppMenu) / HUD. You can get these features though, by using JAyatana, which you can install in Ubuntu 14.04 by using the following commands:
sudo add-apt-repository ppa:danjaredg/jayatana
sudo apt-get update
sudo apt-get install jayatana
Once installed, log out and log back in.

More info: Get Unity Global Menu / HUD Support For Java Swing Applications With JAyatana

10.4 Adobe Flash Player (YouTube and a few other websites only, it seems) hardware acceleration with Intel graphics

libvdpau-va-gl is a VDPAU driver that uses OpenGL under the hood to accelerate drawing and scaling, and VA-API (if available) to accelerate video decoding.

Using it, you can get hardware acceleration on some Intel graphics cards for Mplayer (well, we already have mplayer-vaapi but it hasn't been merged) and even Adobe Flash Player. That means a lot less CPU usage.

For instance, in my test, a full-screen 1080p flash YouTube video used around 160-170% CPU without libvdpau-va-gl and about 14-17% CPU when using libvdpau-va-gl:

libvdpau-va-gl1

Since there are a few things you should know and the instructions include 2 use cases, I won't post the instructions here and instead, I'll add a link to our libvdpau-va-gl article: Adobe Flash Player Hardware Acceleration on Intel Graphics Cards

Skype doesn't show up on ubuntu upper panel

If you also find your skype doesn't show up on ubuntu upper panel, 
here is the way to get it back. 
 
 
$ sudo apt-get install sni-qt:i386