mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-21 02:10:11 +08:00
commit
cbbc1333fb
@ -1,8 +1,9 @@
|
||||
Linux 中的TCP/IP网络配置:net-tools vs. iproute2
|
||||
iproute2 对决 net-tools
|
||||
================================================================================
|
||||
如今很多系统管理员依然通过组合使用诸如ifconfig、route、arp和netstat等命令行工具(统称为net-tools)来配置网络功能,解决网络故障。net-tools起源于BSD的TCP/IP工具箱,后来成为老版本Linux内核中配置网络功能的工具。但自2001年起,Linux社区已经对其停止维护。同时,一些比如Arch Linux和CentOS/RHEL 7的Linux发行版则已经完全抛弃了net-tools,以支持iproute2。
|
||||
|
||||
作为网络配置工具的一份子,iproute2的出现旨在在功能上取代net-tools。net-tools通过procfs(/proc)和ioctl系统调用去访问和改变内核网络配置,而iproute2则通过netlink套接字接口与内核通讯。抛开性能而言,iproute2的用户接口比net-tools显得更加直观。比如,各种网络资源(如link、IP地址、路由和隧道等)均使用合适的对象抽象去定义,使得用户可使用一致的语法去管理不同的对象。更重要的是,到目前为止,iproute2仍处在[持续开发][1]中。
|
||||
如今很多系统管理员依然通过组合使用诸如ifconfig、route、arp和netstat等命令行工具(统称为net-tools)来配置网络功能,解决网络故障。net-tools起源于BSD的TCP/IP工具箱,后来成为老版本Linux内核中配置网络功能的工具。**但自2001年起,Linux社区已经对其停止维护。**同时,一些Linux发行版比如Arch Linux和CentOS/RHEL 7则已经完全抛弃了net-tools,只支持iproute2。
|
||||
|
||||
作为网络配置工具的一份子,iproute2的出现旨在从功能上取代net-tools。net-tools通过procfs(/proc)和ioctl系统调用去访问和改变内核网络配置,而iproute2则通过netlink套接字接口与内核通讯。抛开性能而言,iproute2的用户接口比net-tools显得更加直观。比如,各种网络资源(如link、IP地址、路由和隧道等)均使用合适的对象抽象去定义,使得用户可使用一致的语法去管理不同的对象。更重要的是,到目前为止,iproute2仍处在[持续开发][1]中。
|
||||
|
||||
如果你仍在使用net-tools,而且尤其需要跟上新版Linux内核中的最新最重要的网络特性的话,那么是时候转到iproute2的阵营了。原因就在于使用iproute2可以做很多net-tools无法做到的事情。
|
||||
|
||||
@ -27,10 +28,12 @@ Linux 中的TCP/IP网络配置:net-tools vs. iproute2
|
||||
使用这些命令来激活或停用某个指定的网络接口。
|
||||
|
||||
使用**net-tools**:
|
||||
|
||||
$ sudo ifconfig eth1 up
|
||||
$ sudo ifconfig eth1 down
|
||||
|
||||
使用**iproute2**:
|
||||
|
||||
$ sudo ip link set down eth1
|
||||
$ sudo ip link set up eth1
|
||||
|
||||
@ -39,9 +42,11 @@ Linux 中的TCP/IP网络配置:net-tools vs. iproute2
|
||||
使用这些命令配置网络接口的IPv4地址。
|
||||
|
||||
使用**net-tools**:
|
||||
|
||||
$ sudo ifconfig eth1 10.0.0.1/24
|
||||
|
||||
使用**iproute2**:
|
||||
|
||||
$ sudo ip addr add 10.0.0.1/24 dev eth1
|
||||
|
||||
值得注意的是,可以使用iproute2给同一个接口分配多个IP地址,ifconfig则无法这么做。使用ifconfig的变通方案是使用[IP别名][2]。
|
||||
@ -55,9 +60,11 @@ Linux 中的TCP/IP网络配置:net-tools vs. iproute2
|
||||
就IP地址的移除而言,除了给接口分配全0地址外,net-tools没有提供任何合适的方法来移除网络接口的IPv4地址。相反,iproute2则能很好地完全。
|
||||
|
||||
使用**net-tools**:
|
||||
|
||||
$ sudo ifconfig eth1 0
|
||||
|
||||
使用**iproute2**:
|
||||
|
||||
$ sudo ip addr del 10.0.0.1/24 dev eth1
|
||||
|
||||
### 显示网络接口的IPv4地址 ###
|
||||
@ -65,9 +72,11 @@ Linux 中的TCP/IP网络配置:net-tools vs. iproute2
|
||||
按照如下操作可查看某个指定网络接口的IPv4地址。
|
||||
|
||||
使用**net-tools**:
|
||||
|
||||
$ ifconfig eth1
|
||||
|
||||
使用**iproute2**:
|
||||
|
||||
$ ip addr show dev eth1
|
||||
|
||||
同样,如果接口分配了多个IP地址,iproute2会显示出所有地址,而net-tools只能显示一个IP地址。
|
||||
@ -79,21 +88,25 @@ Linux 中的TCP/IP网络配置:net-tools vs. iproute2
|
||||
使用这些命令为网络接口添加IPv6地址。net-tools和iproute2都允许用户为一个接口添加多个IPv6地址。
|
||||
|
||||
使用**net-tools**:
|
||||
|
||||
$ sudo ifconfig eth1 inet6 add 2002:0db5:0:f102::1/64
|
||||
$ sudo ifconfig eth1 inet6 add 2003:0db5:0:f102::1/64
|
||||
|
||||
使用**iproute2**:
|
||||
|
||||
$ sudo ip -6 addr add 2002:0db5:0:f102::1/64 dev eth1
|
||||
$ sudo ip -6 addr add 2003:0db5:0:f102::1/64 dev eth1
|
||||
|
||||
### 显示网络接口的IPv6地址 ###
|
||||
|
||||
按照如下操作可显示某个指定网络接口的IPv6地。net-tools和iproute2都可以显示出所有已分配的IPv6地址。
|
||||
按照如下操作可显示某个指定网络接口的IPv6地址。net-tools和iproute2都可以显示出所有已分配的IPv6地址。
|
||||
|
||||
使用**net-tools**:
|
||||
|
||||
$ ifconfig eth1
|
||||
|
||||
使用**iproute2**:
|
||||
|
||||
$ ip -6 addr show dev eth1
|
||||
|
||||

|
||||
@ -103,9 +116,11 @@ Linux 中的TCP/IP网络配置:net-tools vs. iproute2
|
||||
使用这些命令可移除接口中不必要的IPv6地址。
|
||||
|
||||
使用**net-tools**:
|
||||
|
||||
$ sudo ifconfig eth1 inet6 del 2002:0db5:0:f102::1/64
|
||||
|
||||
使用**iproute2**:
|
||||
|
||||
$ sudo ip -6 addr del 2002:0db5:0:f102::1/64 dev eth1
|
||||
|
||||
### 改变网络接口的MAC地址 ###
|
||||
@ -113,9 +128,11 @@ Linux 中的TCP/IP网络配置:net-tools vs. iproute2
|
||||
使用下面的命令可[篡改网络接口的MAC地址][3],请注意在更改MAC地址前,需要停用接口。
|
||||
|
||||
使用**net-tools**:
|
||||
|
||||
$ sudo ifconfig eth1 hw ether 08:00:27:75:2a:66
|
||||
|
||||
使用**iproute2**:
|
||||
|
||||
$ sudo ip link set dev eth1 address 08:00:27:75:2a:67
|
||||
|
||||
### 查看IP路由表 ###
|
||||
@ -123,6 +140,7 @@ Linux 中的TCP/IP网络配置:net-tools vs. iproute2
|
||||
net-tools中有两个选择来显示内核的IP路由表:route和netstat。在iproute2中,使用命令ip route。
|
||||
|
||||
使用**net-tools**:
|
||||
|
||||
$ route -n
|
||||
|
||||
----------
|
||||
@ -140,10 +158,12 @@ net-tools中有两个选择来显示内核的IP路由表:route和netstat。在
|
||||
这里的命令用来添加或修改内核IP路由表中的默认路由规则。请注意在net-tools中可通过添加新的默认路由、删除旧的默认路由来实现修改默认路由。在iproute2使用ip route命令来代替。
|
||||
|
||||
使用**net-tools**:
|
||||
|
||||
$ sudo route add default gw 192.168.1.2 eth0
|
||||
$ sudo route del default gw 192.168.1.1 eth0
|
||||
|
||||
使用**iproute2**:
|
||||
|
||||
$ sudo ip route add default via 192.168.1.2 dev eth0
|
||||
$ sudo ip route replace default via 192.168.1.2 dev eth0
|
||||
|
||||
@ -152,10 +172,12 @@ net-tools中有两个选择来显示内核的IP路由表:route和netstat。在
|
||||
使用下面命令添加或移除一个静态路由。
|
||||
|
||||
使用**net-tools**:
|
||||
|
||||
$ sudo route add -net 172.16.32.0/24 gw 192.168.1.1 dev eth0
|
||||
$ sudo route del -net 172.16.32.0/24
|
||||
|
||||
使用**iproute2**:
|
||||
|
||||
$ sudo ip route add 172.16.32.0/24 via 192.168.1.1 dev eth0
|
||||
$ sudo ip route del 172.16.32.0/24
|
||||
|
||||
@ -169,6 +191,7 @@ net-tools中有两个选择来显示内核的IP路由表:route和netstat。在
|
||||
$ netstat -l
|
||||
|
||||
使用**iproute2**:
|
||||
|
||||
$ ss
|
||||
$ ss -l
|
||||
|
||||
@ -179,6 +202,7 @@ net-tools中有两个选择来显示内核的IP路由表:route和netstat。在
|
||||
使用这些命令显示内核的ARP表。
|
||||
|
||||
使用**net-tools**:
|
||||
|
||||
$ arp -an
|
||||
|
||||
使用**iproute2**:
|
||||
@ -192,6 +216,7 @@ net-tools中有两个选择来显示内核的IP路由表:route和netstat。在
|
||||
按照如下操作在本地ARP表中添加或删除一个[静态ARP项][4]。
|
||||
|
||||
使用**net-tools**:
|
||||
|
||||
$ sudo arp -s 192.168.1.100 00:0c:29:c0:5a:ef
|
||||
$ sudo arp -d 192.168.1.100
|
||||
|
||||
@ -223,7 +248,7 @@ via: http://xmodulo.com/2014/09/linux-tcpip-networking-net-tools-iproute2.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[KayGuoWhu](https://github.com/KayGuoWhu)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,129 @@
|
||||
在 Linux 中使用"avconv"工具录制计算机桌面视频和音频
|
||||
================================================================================
|
||||
**Libav**是一款跨平台的工具库,能够用来处理多媒体文件、流和协议。它最初是源自ffmpeg。Libav带有一些工具,比如:
|
||||
|
||||
- **Avplay**: 一款视频音频播放器。
|
||||
- **Avconv**: 能够记录多个设备输入源的一个多媒体转换器和视频音频录制器。
|
||||
- **Avprobe**: 一个连接多媒体文件流并且返回关于这个文件流的统计信息的工具。
|
||||
- **Libavfilter**: 一个Libav工具的过滤器(filtering)API。
|
||||
|
||||
在这篇文章里面,我们就要展示如何通过'Avconv'程序在**Debian/Ubuntu/Linux Mint**发行版上录制Linux桌面视频音频。
|
||||
|
||||
### 第一步:下载 Avconv 工具 ###
|
||||
|
||||
**1.** **avconv**是 “**libav-tools**” 的一部分, 可以通过官方的基于debian的仓库下载,比如Mint、Ubuntu。输入下面命令即可:
|
||||
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install libav-tools
|
||||
|
||||

|
||||
|
||||
*下载Avconv工具*
|
||||
|
||||
**注意**: 如果从默认仓库下载的话, ‘**avconv**’ 的版本可能比较老。 因此我们推荐你拉取最新的git官方版本。
|
||||
|
||||
$ sudo apt-get install yasm
|
||||
$ git clone git://git.libav.org/libav.git
|
||||
$ cd libav
|
||||
$ ./configure
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
**注意**: 你应该运行 ‘**./configure –help**’ 来列出所有的可选配置选项并且安装相应的解码器和库,你还需要做很多工作来解决依赖问题。
|
||||
|
||||
也要注意,如果你是从源代码编译的,就需要使用**sudo avconv**而不是**avconv**来运行这个工具。
|
||||
|
||||
### 第二步:开始录制桌面视频 ###
|
||||
|
||||
**2.**一切就绪,现在可以通过运行下面的命令录制你的视频了:
|
||||
|
||||
$ avconv -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 4 $HOME/output.avi
|
||||
|
||||
简单解释一下这个命令:
|
||||
|
||||
- **avconv -f x11grab** 默认从X服务捕捉画面。
|
||||
- **-r 25** 这是你需要的视频帧率,可以自行设置。
|
||||
- **-s 1920×1080** 是你的系统的桌面分辨率,要设置成你当前桌面的分辨率,这一点非常重要。
|
||||
- **-i :0.0** 我们要记录的位置(X 服务输出端口),设置成这样就可以了。
|
||||
- **-vcodec libx264** 我们用来录制视频的编码器。
|
||||
- **-threads 4** 线程数,可以根据情况更改。
|
||||
- **$HOME/output** 输出的目标文件路径。
|
||||
- **.avi** 使用的视频格式,可以换成 “flv”、“mp4″、 “wmv”、 “mov”、 “mkv”等。
|
||||
|
||||
**3.**在运行命令之后,就会在terminal上自动运行一个进程进行记录,按"Ctrl+C"键来终止记录。
|
||||
|
||||

|
||||
|
||||
*录制桌面视频*
|
||||
|
||||
**4.** 现在,你可以使用VLC或者其他的播放器,或者使用来自Libav包里的播放器"avplay"来播放你录制的视频。
|
||||
|
||||
$ avplay $HOME/output.avi
|
||||
|
||||
**注意:** 别忘了替换输出文件的路径为你自己的,录制效果还是很好的。
|
||||
|
||||

|
||||
|
||||
*播放录制的文件*
|
||||
|
||||
这有一段我用 “**avconv**” 录制的[视频](http://www.youtube.com/embed/g1FEh4wByGE) (墙外)。
|
||||
|
||||
|
||||
### 第三步: 开始录制桌面的音频和视频 ###
|
||||
|
||||
**5.** 如果也想同时录制音频,先运行这个命令,列出所有的音频输入源:
|
||||
|
||||
$ arecord -l
|
||||
|
||||
结果类似这样:
|
||||
|
||||

|
||||
|
||||
*检查音频输入源*
|
||||
|
||||
在我这里,我只有一个音频输入源,所以数量是**1**,这就是我使用如下命令来捕捉我的视频以及麦克风的音频的原因。
|
||||
|
||||
$ avconv -f alsa -i hw:1 -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 4 output-file2.avi
|
||||
|
||||
我修改了部分地方,下面做个简短的解释:
|
||||
|
||||
- **-f** alsa 一个从alsa设备捕捉声音的选项。
|
||||
- **-i** hw:1 是一个从 “hw:1” 设备捕捉音频的选项,这个设备是我电脑上仅有的一个音频输入设备。
|
||||
|
||||
**注意**: 如果你想用**arecord -l**显示的**1**之外的设备的话,别忘了替换 “**1**”。
|
||||
|
||||
结束录制,再来一次“**Ctrl + C**” 就可以。
|
||||
|
||||
### 第四步: 开始录制桌面音频 ###
|
||||
|
||||
**6.** 如果只想录制音频的话,使用下面的命令。
|
||||
|
||||
$ avconv -f alsa -i hw:1 out.wav
|
||||
|
||||
**7.** 替换成 **.mp3** 等Libav支持的格式都可以,播放 **out.wav**就能听到你自己的声音了。
|
||||
|
||||

|
||||
|
||||
*录制桌面音频*
|
||||
|
||||
###最后 ###
|
||||
|
||||
“**avconv**” 工具可以用来做很多其他事情,不仅仅是录制桌面视频,更多的教程和文档请移步到官网。
|
||||
|
||||
- [https://libav.org/avconv.html][1]
|
||||
|
||||
你对"avconv"的体验如何,你使用过其他工具录制桌面视频么?在评论里面和我们分享吧。
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/record-ubuntu-desktop-screen-using-avconv/
|
||||
|
||||
作者:[Hanny Helal][a]
|
||||
译者:[ggaaooppeenngg](https://github.com/ggaaooppeenngg)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.tecmint.com/author/hannyhelal/
|
||||
[1]:https://libav.org/avconv.html
|
@ -1,6 +1,6 @@
|
||||
[Quick Tip]如何修复Lubuntu中的Docky混合错误
|
||||
小技巧:如何修复Lubuntu中的Docky混合错误
|
||||
================================================================================
|
||||
总所周知,**Docky**是Unix/Linux类系统中的轻量级应用启动器。我是 Lubuntu 和 Docky的忠实粉丝,因为他们不需要占用我的所有系统资源,这样就可以同时运行更多应用。我在笔记本上使用Docky应用启动器,系统为Lubuntu 14.04.
|
||||
总所周知,**Docky**是Unix/Linux类系统中的轻量级应用启动器。我是 Lubuntu 和 Docky 的忠实粉丝,因为它们不需要占用我的所有系统资源,这样就可以同时运行更多应用。我在笔记本上使用Docky应用启动器,系统为Lubuntu 14.04.
|
||||
|
||||
但是,如果你使用LXDE发行版,你也许肯定遇到过使用Docky时报混合的错误。看下面的截图。
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||

|
||||
|
||||
这时,你结可以使用3D背景和隐藏功能,如自动隐藏(Auto-hide),Intellihide和窗口闪烁(Window dodge)等。
|
||||
这时,你就可以使用3D背景和隐藏功能,如自动隐藏(Auto-hide),Intellihide和窗口闪烁(Window dodge)等。
|
||||
|
||||

|
||||
|
||||
@ -32,7 +32,7 @@ via: http://www.unixmen.com/quick-tip-fix-docky-compositing-error-lubuntu/
|
||||
|
||||
作者:[SK][a]
|
||||
译者:[Vic020/VicYu](http://www.vicyu.net)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,154 @@
|
||||
11 Useful Utilities To Supercharge Your Ubuntu Experience
|
||||
================================================================================
|
||||
**Whether you’re a relative novice or a seasoned pro, we all want to get the most from our operating system. Ubuntu, like most modern OSes, has more to offer than what is presented at first blush.**
|
||||
|
||||
From tweaking and refining the look, behaviour and performance of the Unity desktop to performing system maintenance, there are a huge array of useful utilities and apps that can help **tune Ubuntu to meet your needs in no time**.
|
||||
|
||||
Caveat time: Ubuntu has always shipped with ‘sane defaults’ — options that just work — out of the box. These defaults are well suited for the majority of people. They’re tested, accepted and recommended.
|
||||
|
||||
But one size doesn’t fit all. For the tinkerers and experimenters among us the default experience is a starting point from which to tailor.
|
||||
|
||||
So, without any more waffle, here is a set of 11 nifty utilities to help you supercharge your Ubuntu experience.
|
||||
|
||||
### Unity Tweak Tool ###
|
||||
|
||||

|
||||
|
||||
I’ll kick off this list with the big one: **Unity Tweak** Tool. The kitchen sink of customisation, Unity Tweak Tool offers a comprehensive set of system tweaks tuned for Ubuntu and the Unity desktop.
|
||||
|
||||
It’s stuffed full of switches, toggles and control, letting you configure everything from the way Unity looks to the way it behaves. Use it to **quickly and easily change the GTK theme and icon set**, set up hot corners, adjust launcher size, add or remove workspaces, and — notably — enable Unity’s elusive ‘minimise on click’ feature.
|
||||
|
||||
Free and readily available from the Software Center, Unity Tweak Tool is one well worth keeping in your back pocket.
|
||||
|
||||
### Unity Privacy Indicator ###
|
||||
|
||||

|
||||
|
||||
Privacy. A big, big issue and rightly so. But the topic is often shaded rather than binary; you may be happy to let some data or habits, say apps you frequently open, be logged locally, but not be ok with the searches you make in the Dash being ferried to a third-party server (however anonymous that data may be).
|
||||
|
||||
[Privacy Indicator][1] is a useful tool to help you stay abreast of what files, folders and services are being accessed, logged and recce’d on the Ubuntu desktop.
|
||||
|
||||
With a quick click on the ‘eye’ icon added to the desktop panel you can:
|
||||
|
||||
- Toggle Online Search Results, Zeitgeist, HUD Logging & GeoIP
|
||||
- Quick access to clean Zeitgeist, F2, Recent Files, etc.
|
||||
- Options to show/hide desktop icons and name in the panel
|
||||
|
||||
The latter two options may seem a little misplaced in this app but have less obvious privacy implications for those who take screenshots or screen share.
|
||||
|
||||
- [Download Indicator Privacy (.deb)][2]
|
||||
|
||||
### Unity Folders ###
|
||||
|
||||

|
||||
|
||||
**Android, iOS, OS X, Chrome OS, and GNOME Shell have app folders, and so can Unity with a nifty third-party app. **
|
||||
|
||||
“Unity Folders” allows you to organise apps on the Unity Launcher into handy folders — think ‘games’, ‘office’, ‘social‘, etc. You get quick access to your favourite apps without needing to open the Dash, which may suit your workflow.
|
||||
|
||||
Each ‘folder’ is, actually, an application that opens up and positions itself near the origin point. But the overall effect is one that looks like an OS X style stack or an Android folder popover.
|
||||
|
||||
Folder icons can be customised or auto-generated based on the applications tucked up inside. Existing folders can be edited, rearranged, rename and re-other stuff, too.
|
||||
|
||||
- Create as many folders as you like
|
||||
- Choose custom or auto-generated folder icon
|
||||
- 3 folder layouts to choose from
|
||||
- Set custom icons for apps added to folders
|
||||
- Edit existing folders
|
||||
|
||||
- Unity Folders Website
|
||||
|
||||
### Caffeine ###
|
||||
|
||||
A staple for many of us, and not just in our drinks, Caffeine offers a fast, silent way to stop your screensaver or lock-screen kicking in. The degree of usefulness will depend on your circumstances (read: quirks of your system), and though it’s not quite as user friendly as it once was, it’s still worth [checking out][3].
|
||||
|
||||
### System Monitor Indicator ###
|
||||
|
||||

|
||||
|
||||
If you’re a stat hound who likes to keep tabs on apps, processes and hardware status, Linux makes it easy. From Conky Configs to Terminal Commands — there’s no shortage of ways to monitor your CPU usage, network traffic or GPU temperature.
|
||||
|
||||
But by far my favourite is System **Monitor Indicator** – also known as indicator-multiload — available from the Ubuntu Software Center. It has a host of configuration options, too.
|
||||
|
||||
- [Click to Install ‘System Load Indicator’ on Ubuntu][4]
|
||||
|
||||
### Power Saving Tools for Linux Laptops ###
|
||||
|
||||

|
||||
|
||||
**TLP**
|
||||
|
||||
Linux distributions don’t have the best reputation when it comes to power efficiency on portable devices.
|
||||
|
||||
If your own Linux laptop can barely get you from the sofa to the kitchen before needing a recharge, there are some tools you can try.
|
||||
|
||||
TLP is one of the most popular automated background tool promising to prolong battery life of laptops running Linux. It does this by adjusting the settings and behaviour of system processes and hardware, such as enabling Wi-Fi power saving mode, runtime power management of PCI bus devices, and processor frequency scaling.
|
||||
|
||||
It’s available to [install on Ubuntu 14.04 LTS and later using the dedicated TLP PPA][5] and comes with a ‘catch-all’ config to get you started. The more advanced users among you can dive in and manually adjust the settings to suit your own hardware, something that a [thorough guide on the TLP wiki][6] makes easy.
|
||||
|
||||
**Laptop Mode Tools**
|
||||
|
||||
If TLP sounds a little too complex — and there’s no shame if it does — there’s a simpler alternative: **Laptop Mode Tools**. This package is available to install from the Ubuntu Software Center and keeps the tweaks made to a set of sane defaults (Wi-Fi, Bluetooth, etc.).
|
||||
|
||||
Laptop Mode Tools cannot be installed at the same time as TLP.
|
||||
|
||||
- [Laptop Mode Tools in Ubuntu Software Center][7]
|
||||
|
||||
### Intel Graphics Installer ###
|
||||
|
||||

|
||||
|
||||
The Intel Graphics Installer tool is a must-have for those running Intel graphics hardware who want the best performance they can get. It makes finding and installing the latest Intel GPU drivers a painless, fuss-free affair — no PPAs or Terminal kung foo needed.
|
||||
|
||||
- [Download Intel Graphics Installer for Linux 0.7][8]
|
||||
|
||||
### Hardware Stats ###
|
||||
|
||||

|
||||
|
||||
If you plan on upgrading your PC or replacing a worn-out part you’ll need to get some specific hardware details, such as RAM type, CPU socket set or what PCI slots are available.
|
||||
|
||||
**I-Nex** makes unearthing this, and host of other detailed system stats, easy. Use it to find your motherboard model number, RAM stepping, S.M.A.R.T. status and…well, pretty much anything else you can think of!
|
||||
|
||||
- [Learn More About I-Nex on Launchpad][9]
|
||||
|
||||
### Disk Space Visualizer ###
|
||||
|
||||

|
||||
|
||||
In this age of 1TB hard drives we might not need to be as prudent with disk space as we once were. But for those of using a smallish SSD, running multiple partitions or working in a virtual machine with a fixed-size virtual disk, there’ll be times when freeing up a bit of extra space is required.
|
||||
|
||||
GNOME Disks, installed in Ubuntu by default, makes finding the biggest space-gobbling culprits easy. Ideal for locating hidden logs, caches, and media files.
|
||||
|
||||
### BleachBit (Cruft Cleaner) ###
|
||||
|
||||

|
||||
|
||||
Windows users will be familiar with applications like CCleaner, which scan for and clean out junk files, empty folders, bloated caches, and obsolete packages. For a a similarly quick and effortless click n’ clean solution on Ubuntu try **BleachBit**.
|
||||
|
||||
It is a powerful tool, so do pay attention to what you’re cleaning. Don’t aimlessly check every box; not everything that it can clean needs to be. Play it smart; when in doubt, leave it out.
|
||||
|
||||
- [Install BleachBit from Ubuntu Software Center][10]
|
||||
|
||||
Got a favourite system utility of your own? Let others know about it in the comments.
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.omgubuntu.co.uk/2014/11/useful-tools-for-ubuntu-do-you-use-them
|
||||
|
||||
作者:[Joey-Elijah Sneddon][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://plus.google.com/117485690627814051450/?rel=author
|
||||
[1]:http://www.florian-diesch.de/software/indicator-privacy/index.html
|
||||
[2]:http://www.florian-diesch.de/software/indicator-privacy/dist/indicator-privacy_0.04-1_all.deb
|
||||
[3]:http://www.omgubuntu.co.uk/2014/05/stop-ubuntu-sleeping-caffeine
|
||||
[4]:apt://indicator-mulitload
|
||||
[5]:https://launchpad.net/~linrunner/+archive/ubuntu/tlp/+packages
|
||||
[6]:http://linrunner.de/en/tlp/docs/tlp-configuration.html
|
||||
[7]:https://apps.ubuntu.com/cat/applications/laptop-mode-tools/
|
||||
[8]:https://01.org/linuxgraphics/downloads/2014/intelr-graphics-installer-linux-1.0.7
|
||||
[9]:https://launchpad.net/i-nex
|
||||
[10]:https://apps.ubuntu.com/cat/applications/bleachbit/
|
@ -0,0 +1,196 @@
|
||||
Five Magnificent Linux Music Streaming Clients
|
||||
================================================================================
|
||||
Digital streams almost totally command my music listening these days. Over the years I have amassed a large collection of CDs at considerable expense; most of them now sit neglected gathering dust. Almost all music streaming services fall short of the audio quality of CDs, but their popularity has more to do with sheer convenience than high-fidelity sound reproduction. Music streaming has not only been to the detriment of CD sales; digital downloads have also experienced a slowing down of sales. This is only set to continue. Audiophiles may be tempted to embrace music streaming given that there are now services such as Tidal which offers high fidelity music streaming, 25 million tracks encoded with the FLAC format streamed at 1,411kbps.
|
||||
|
||||
CDs are not going away though. Music streaming services do experience issues with record labels and artists who are unhappy with the amount of return they receive from letting their music be hosted on the service. This is still in flux; we have seen this year Led Zeppelin, Pink Floyd, Metallica sign up to streaming services, but there are still some notable omissions such as the Beatles, Radiohead and AC/DC who refuse to allow fans to stream their music. Even where a record label or singer has given permission to allow streaming services to access their work, an artist's back catalog can be pulled at a moment's notice. This month, Taylor Swift’s entire catalog of music was pulled from Spotify's streaming service at the pop singer’s request. Some people will still prefer to "possess" their collection, but it's looking like an increasingly old fashioned way to enjoy music.
|
||||
|
||||
The Linux platform has matured into a good way of listening to streaming music services. There are clients available for most of the music streaming services; I hope TIDAL will support Linux on the desktop in due course, and not rely on a web player. All of the applications featured in this article are excellent. An honorable mention should be given to Amarok, pianobar, and Tomahawk.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Spotify is a proprietary peer-to-peer music streaming service that allows users to listen to tracks or albums on demand. The service describes itself as "A world of music. Instant, simple and free". Spotify uses 96kbps streaming on mobile, 160kbps on desktop and 320kbps for "Premium subscribers" - all encoded in the Ogg Vorbis format. Spotify is free for those who choose to live with adverts, or at a reasonable monthly charge without them.
|
||||
|
||||
Spotify is a fantastic service, offering access to a huge library of music covering all different types of music such as pop, alternative, classical, techno, and rock. It is a great way of dipping into new music. The service has the support of major labels including Sony BMG, EMI, Universal, and Warner Music, as well as independent labels and distribution networks like Labrador Records, The Orchard, Alligator Records, Merlin, CD Baby, INgrooves as well as classical music labels such as Chandos, Naxos, EMI Classic, Warner Classics, Denon Essentials and many more. The breadth of music is continuing to expand at a phenomenal pace.
|
||||
|
||||
Spotify does not officially support Linux at the moment. However, they have developed a preview build of Spotify for Linux, which works well. As its a preview release, this version is still unsupported.
|
||||
|
||||
Spotify is available in Andorra, Argentina, Australia, Austria, Belgium, Bulgaria, Colombia, Cyprus, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Iceland, Ireland, Italy, Latvia, Liechtenstein, Lithuania, Luxembourg, Malaysia, Malta, Mexico, Monaco, Netherlands, New Zealand, Norway, the Philippines, Poland, Portugal, Spain, Singapore, Sweden, Switzerland, Taiwan, Turkey, the United Kingdom, the United States, Uruguay, and a few others.
|
||||
|
||||
**Features include:**
|
||||
|
||||
- A well designed interface makes navigation effortless
|
||||
- Create and edit playlists
|
||||
- Discover new music
|
||||
- Share music and playlists
|
||||
- Radio feature
|
||||
- Top Lists
|
||||
- Additional functionality with large variety of apps
|
||||
|
||||
- Website: [www.spotify.com/uk/download/previews][1]
|
||||
- Developer: Spotify
|
||||
- License: Proprietary
|
||||
- Version Number: Preview
|
||||
|
||||
----------
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Pithos is an open source native Pandora Radio client for Linux. It offers a lightweight alternative to the official Pandora.com web client. The graphical user interface integrates with desktop features such as media keys, notifications, and the sound menu.
|
||||
|
||||
The Pandora music service is only intended to be used by US IP addresses. However, users located outside the US can use Pandora with a VPN.
|
||||
|
||||
**Features include: **
|
||||
|
||||
- Play / Pause / Next Song
|
||||
- Switching stations
|
||||
- Remembers your user name and password
|
||||
- Bookmarking of songs and artists
|
||||
- Cover Art
|
||||
- Thumbs Up / Thumbs Down / Tired of this song
|
||||
- Notification popup with song info
|
||||
- Launching pandora.com song info page and station page
|
||||
- Reconnecting when pandora session times out
|
||||
- Editing QuickMix
|
||||
- Creating stations
|
||||
- Media Key support
|
||||
- Proxy support
|
||||
- Last.fm scrobbling support
|
||||
- Volume control
|
||||
- Plugins including Screensaver pause
|
||||
- Two DBUS APIs: MPRIS and Pithos
|
||||
|
||||
- Website: [pithos.github.io][2]
|
||||
- Developer: Kevin Mehall
|
||||
- License: GNU GPL v3
|
||||
- Version Number: 1.0.0
|
||||
|
||||
----------
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Clementine is a cross-platform, lightweight, modern music player and library organiser based on Amarok. Clementine focuses on a fast and easy-to-use interface for searching and playing your music.
|
||||
|
||||
It is inspired by Amarok 1.4, focusing on a fast and easy-to-use interface for searching and playing your music.
|
||||
|
||||
Features include:
|
||||
|
||||
- Search and play your local music library
|
||||
- Listen to internet radio from Last.fm and SomaFM
|
||||
- Tabbed playlists, import and export M3U, XSPF, PLS and ASX
|
||||
- Create smart playlists and dynamic playlists
|
||||
- Load M3U and XSPF playlists
|
||||
- Undo and redo in the playlist
|
||||
- Edit tags on MP3 and OGG files, organise your music
|
||||
- Download missing album cover art from Last.fm
|
||||
- Podcast support with integration with gpodder.net
|
||||
- Graphical equalizer
|
||||
- Cross-platform works on Windows, Mac OS X and Linux
|
||||
- Native desktop notifications on Linux (libnotify) and Mac OS X (Growl)
|
||||
- Fetch missing tags from MusicBrainz
|
||||
- Attractive on screen display
|
||||
- Queue manager
|
||||
- Supports MPRIS on Linux, or remote control using the command-line
|
||||
- Supports indexing and playing music from Google Drive
|
||||
- Support for Soundcloud
|
||||
- Support for jazzradio.com
|
||||
- Support for Moodbar
|
||||
- Visualizations from projectM
|
||||
- Copy music to your iPod, iPhone, MTP or mass-storage USB player
|
||||
- Remote control
|
||||
- Transcode music into MP3, Ogg Vorbis, Ogg Speex, FLAC or AAC
|
||||
|
||||
- Website: [www.clementine-player.org][3]
|
||||
- Developer: David Sansome, John Maguire
|
||||
- License: GNU GPL v3
|
||||
- Version Number: 1.2
|
||||
|
||||
----------
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Nuvola Player is a free and open source project that offers cloud music integration for your desktop (system tray, Ubuntu sound menu, dock menu and notifications).
|
||||
|
||||
To use all of the streaming services, you need Flash and HTML5 audio support. Some web-based streaming services can utilize HTML5 Audio technology for music playback instead of the Flash plugin. Nuvola Player requires GStreamer with MP3 decoder plugin to provide HTML5 Audio support.
|
||||
|
||||
**Supported Services:**
|
||||
|
||||
- Amazon Cloud Player integrated with the MP3 store and allows users to store their music on Amazon Cloud Drive, and play that music from any supported web browsers
|
||||
- Bandcamp an online music store, as well as a platform for artist promotion, that caters mainly to independent artists
|
||||
- Deezer a French web-based music streaming service. It allows users to listen to music on various devices online or offline. It currently has 18 million licensed tracks, over 30,000 radio channels and 22 million users (1.5 million subscribers)
|
||||
- 8tracks a website that fuses elements of internet radio and social networking revolving around the concept of streaming user-curated playlists consisting of at least 8 tracks
|
||||
- Google Play Music a digital content service from Google which includes an online store for music, movies, books, and Android apps and games, as well as a cloud media player that supports uploading a user's own music and buying music at Google Play Store
|
||||
- Grooveshark an international online music search engine, music streaming service and music recommendation web software application, allowing users to search for, stream, and upload music that can be played immediately or added to a playlist
|
||||
- Grooveshark Mobile the HTML5-based mobile version of Grooveshark which does not require Flash
|
||||
- Hype Machine an amalgamation of Pandora Radio and Pitchfork Media. It aggregates the most recently posted songs from a selection of music blogs (about 1,500) and lists them on the website's main page
|
||||
- Jango a free online music streaming service that allows users to create and share custom radio stations
|
||||
- Logitech Media Server the open source media server for Logitech Squeezebox devices. It supports plug-ins and multiple only services like Deezer or Spotify
|
||||
- Pandora an automated music recommendation service and "custodian" of the Music Genome Project available only in the United States
|
||||
- Rdio an ad-free music subscription service
|
||||
- Spotify a commercial music streaming service providing digital rights management-restricted content from record labels
|
||||
- This is My Jam a place to put your favorite song of the moment & hear great music, handpicked every day by friends
|
||||
|
||||
**Features include:**
|
||||
|
||||
- Multimedia keys
|
||||
- Shows desktop notifications
|
||||
- Integrates with various sound menus, applets and launchers and more
|
||||
- Last FM and Libre FM scrobbling
|
||||
- Lyrics fetching
|
||||
- Support for Amazon Music Prime streaming
|
||||
|
||||
- Website: [tiliado.eu/nuvolaplayer][4]
|
||||
- Developer: Jiří Janoušek and service maintainers
|
||||
- License: 2-Clause BSD license
|
||||
- Version Number: 2.4.3
|
||||
|
||||
----------
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Atraci is a multi-platform open source streaming application that lets users listen to more than 60 million songs. It is still in an early stage of development, so the application is not the most feature laden.
|
||||
|
||||
Atraci use iTunes, Last.fm and SoundCloud to display song information - cover, title, artist. Atraci searches the best match for this song on YouTube and streams the highest quality video stream.
|
||||
|
||||
**Features include: **
|
||||
|
||||
- No advertisements, no sign up required
|
||||
- Intuitive user interface
|
||||
- Smart matching search for any song, artist name or album. Atraci checks it against online listings to show correct title, album artwork, track lists and so on, with listed options being the highest quality video streams
|
||||
- Album and artist autosuggestions
|
||||
- Sort results by 'default', 'artist' or ‘track’
|
||||
- View results in 'grid' or 'list' layouts
|
||||
- Accompanying video can be made full screen
|
||||
- Create playlists with shuffle and repeat options
|
||||
- In-app volume slider, track scrubber and album artwork
|
||||
- History of recently played tracks
|
||||
|
||||
- Website: [atraci.github.io/Atraci-website][5]
|
||||
- Developer: The Atraci Team
|
||||
- License: The MIT License
|
||||
- Version Number: 0.7.0
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linuxlinks.com/article/20141116052055674/MusicStreaming.html
|
||||
|
||||
作者:Frazer Kline
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:https://www.spotify.com/uk/download/previews/
|
||||
[2]:http://pithos.github.io/
|
||||
[3]:https://www.clementine-player.org/
|
||||
[4]:https://tiliado.eu/nuvolaplayer/
|
||||
[5]:http://atraci.github.io/Atraci-website/
|
62
sources/talk/20141127 What Makes a Good Programmer.md
Normal file
62
sources/talk/20141127 What Makes a Good Programmer.md
Normal file
@ -0,0 +1,62 @@
|
||||
What Makes a Good Programmer?
|
||||
================================================================================
|
||||
What makes a good programmer? It’s an interesting question to ask yourself. It makes you reflect on the craft of software development. It is also a good question to ask your colleagues. It can trigger some interesting discussions on how you work together. Here are five skills I think are crucial to have in order to be a good programmer.
|
||||
|
||||
### 1. Problem Decomposition ###
|
||||
|
||||
Programming is about solving problems. But before you write any code, you need to be clear on how to solve the problem. One skill good programmers have is the ability to break the problem down in smaller and smaller parts, until each part can be easily solved. But it is not enough simply to find a way to solve the problem. A good programmer finds a way to model the problem in such a way that the resulting program is easy to reason about, easy to implement and easy to test.
|
||||
|
||||
Some of the most complicated programs I have worked on were complicated in part because the implementation did not fit the problem very well. This led to code that was hard to understand. When the problem is well modeled, I agree with Bernie Cosell (interviewed in the excellent [Coders at Work][1]):
|
||||
|
||||
> “…there are very few inherently hard programs. If you are looking at a piece of code and it looks very hard – if you can’t understand what this thing is supposed to be doing – that’s almost always an indication that it was poorly thought through. At that point you don’t roll up your sleeves and try to fix the code; you take a step back and think it through again. When you’ve thought it through enough, you’ll find out that it’s easy“.
|
||||
|
||||
### 2. Scenario Analysis ###
|
||||
|
||||
Good developers have the ability to consider many different scenarios for the program. This applies both to the logic in the program, and to the internal and external events that can occur. To consider the different paths in the logic, they ask questions like: What happens if this argument is null? What if none of these conditions are true? Is this method thread-safe? To discover what types of events the software needs to handle, they will ask questions like: What if this queue becomes full? What if there is no response to this request? What if the other server restarts while this server is restarting?
|
||||
|
||||
The good programmers ask themselves: How can this break? In other words, they have the ability to think like testers. In contrast, inexperienced programmers mostly only consider the “happy path” – the normal flow of control when everything goes as expected (which it does most of the time). But of course, the unexpected inevitably happens, and the program needs to be able to cope with that.
|
||||
|
||||
### 3. Naming ###
|
||||
|
||||
Programming consists to a large degree of naming things: classes, methods and variables. When done well, the program becomes largely self-documenting, meaning that the function of the program is quite clear just from reading the source code. One effect of self-documenting code is that it naturally leads to many smaller methods, rather than a few large ones, simply because then you have more places to put meaningful names (there are [other reasons][2] why many small methods are good too).
|
||||
|
||||
Coming up with good names is much harder than it sounds. I like this quote (from Phil Karlton): “There are only two hard things in Computer Science: cache invalidation and naming things.” Partly naming is hard because it needs to be clear in your mind what each name represents. Sometimes that is not immediately clear, but only becomes apparent as the development proceeds. Therefore, renaming is just as important as naming.
|
||||
|
||||
Naming things well also includes coming up with concepts to be used, and what these concepts should be called. By having well-thought out, distinctly named concepts that are used consistently (in the program, and when discussing the domain with programmers and non-programmers), writing the program becomes much easier.
|
||||
|
||||
### 4. Consistency ###
|
||||
|
||||
Perhaps the biggest challenge in programming is managing complexity. Consistency is one way to combat complexity. It reduces some of the complexity by allowing us to see patterns and infer how things are named, used and handled. With consistency, we don’t need to use brain power to remember exceptions and random variations. Instead we can concentrate on [essential complexity, not accidental complexity][3].
|
||||
|
||||
Consistency is important across the board. It applies to variable names and grouping, method naming, the division into modules, the directory structure, the GUI, error handling, logging, documentation etc. For example, if some variables are related and appear together (in declarations, method calls or as columns in the database) then always use them in the same order. Then it becomes easier to see if one is missing, or if they have been mixed up. For an operation, if it is called delete in one place, don’t call it remove in another place – stick with the same name. Steve McConnell also has some good advice on using opposites precisely in [Code Complete][4]. For example, begin/end are opposites, as are start/stop. Don’t mix names from different pairs (for example using begin/stop) when dealing with opposites.
|
||||
|
||||
Inconsistencies can get introduced when modifying a program. Sloppy programmers don’t pay attention to if what they add is consistent with the existing code or not. Good programmers are relentless in ensuring that seemingly small details are just right. They know how important consistency is in the overall fight against complexity.
|
||||
|
||||
### 5. Learning ###
|
||||
|
||||
As a software developer, you are constantly learning. Before adding a new feature, you have to understand what it is supposed to do. Before adding code to an existing program, you usually have to learn what the existing code does, in order fit the new functionality in properly. You also have to learn about the surrounding systems, in order to interface with them correctly. The ability to learn fast therefore makes you a much more effective developer.
|
||||
|
||||
Furthermore, because the pace of development in the software engineering field is so high, there is a steady stream of new languages, tools, techniques and frameworks to learn about. You can view this as good or bad. Fred Brooks lists learning as [one of the joys of the craft][5], and I agree. Learning new things is satisfying in itself. It also means that life as a developer never is boring.
|
||||
|
||||
### Conclusion ###
|
||||
|
||||
All of the above skills are generic – none of them are specific to any one language, framework or technology. If you have them, you can quickly learn a new language or tool, and write good software in that environment. Furthermore, because they are general in nature, they will not become obsolete in a couple of years.
|
||||
|
||||
These are my answers for what makes a good programmer. What do you think makes a good programmer? Let me know in the comments.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://henrikwarne.com/2014/06/30/what-makes-a-good-programmer/
|
||||
|
||||
作者:[Henrik Warne][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://henrikwarne.com/about/
|
||||
[1]:http://www.amazon.com/review/R2OV0TG7MJGXGL
|
||||
[2]:http://henrikwarne.com/2013/08/31/7-ways-more-methods-can-improve-your-program/
|
||||
[3]:http://faculty.salisbury.edu/~xswang/Research/Papers/SERelated/no-silver-bullet.pdf
|
||||
[4]:http://www.amazon.com/review/R269BBARXH1V6R/
|
||||
[5]:http://henrikwarne.com/2012/06/02/why-i-love-coding/
|
@ -1,3 +1,4 @@
|
||||
forsil translating ...
|
||||
How to use on-screen virtual keyboard on Linux
|
||||
================================================================================
|
||||
On-screen virtual keyboard is an alternative input method that can replace a real hardware keyboard. Virtual keyboard may be a necessity in various cases. For example, your hardware keyboard is just broken; you do not have enough keyboards for extra machines; your hardware does not have an available port left to connect a keyboard; you are a disabled person with difficulty in typing on a real keyboard; or you are building a touchscreen-based web kiosk.
|
||||
|
@ -0,0 +1,103 @@
|
||||
How To Create A Multiboot USB From Ubuntu Using MultiSystem
|
||||
================================================================================
|
||||
### Introduction ###
|
||||
|
||||
For those who don’t know, **MultiSystem** is a small, Open Source freeware to create a multiboot usb drives from Linux systems. Using this utility, we can create any number of bootable Linux distributions in a USB drive. All you need is an Internet connection(at the time of MultiSystem installation only), and a sufficient size of a USB drive depending upon the number of distributions you want to include in that USB drive.
|
||||
|
||||
### Install MultiSystem On Ubuntu 14.10/14.04 ###
|
||||
|
||||
#### Manual Installation: ####
|
||||
|
||||
[Download MultiSystem][1] script, and extract it anywhere of your choice. Go to the extracted location, and run the script as shown below.
|
||||
|
||||
sudo ./install-depot-multisystem.sh
|
||||
|
||||
#### Installation Using PPA: ####
|
||||
|
||||
Alternatively, you can install MultiSystem more easily using PPA as shown below.
|
||||
|
||||
sudo apt-add-repository 'deb http://liveusb.info/multisystem/depot all main'
|
||||
wget -q -O - http://liveusb.info/multisystem/depot/multisystem.asc | sudo apt-key add -
|
||||
sudo apt-get update
|
||||
sudo apt-get install multisystem
|
||||
|
||||
After installation, It will automatically open. Just click Close button to exit.
|
||||
|
||||
### Post Installation ###
|
||||
|
||||
Once installed, plug-in your USB key, and launch MultiSystem either from Unity Dash or Menu.
|
||||
|
||||

|
||||
|
||||
At first time, the MultiSystem interface will look like below.
|
||||
|
||||

|
||||
|
||||
Select the USB drive, and click **Confirm** button. You may get the following error dialog box. Don’t worry, It says our USB drive has no label. Click Ok to set label by MultiSystem itself.
|
||||
|
||||

|
||||
|
||||
Then, unplug/replug the USB key, and launch MultiSystem again. Select the USB key, and click Confirm again. Now, you’ll be asked to confirm Grub2 installation in your USB key. Click Ok to continue.
|
||||
|
||||

|
||||
|
||||
Finally, you’ll be pleased with MultiSystem interface. Now’ it’s time to create multiboot usb key.
|
||||
|
||||

|
||||
|
||||
### Usage ###
|
||||
|
||||
MultiSystem is very simple to use. Drag the ISO of your choice into the MultiSystem window. If it doesn’t work, click on the **cd icon** on the bottom and select the ISO’s.
|
||||
|
||||

|
||||
|
||||
Now, MultiSystem will copy the files from the ISO, and make the USB key as bootable.
|
||||
|
||||

|
||||
|
||||
Likewise, you can add as many distributions as you want in your USB key. In my case, I have added two Linux distributions: CentOS 6.5 and Android.
|
||||
|
||||
After adding all ISO’s, you will now see the list of bootable distributions in the MultiSystem main window.
|
||||
|
||||

|
||||
|
||||
That’s it. Our multiboot USB key is ready to use. Reboot your system, and set the first boot device as USB in your Bios. Select the distribution you want to install, and start installing the OS from the multiboot USB key.
|
||||
|
||||

|
||||
|
||||
Additionally, MultiSystem includes some extra options such as:
|
||||
|
||||
- Grub Settings;
|
||||
- Grub & Burg bootloaders Update;
|
||||
- Download Live Cds;
|
||||
- VirtualBox installation;
|
||||
- Format USB key;
|
||||
- and many.
|
||||
|
||||
To view the list of additional options, navigate to the **Menus** tab of the MultiSystem.
|
||||
|
||||

|
||||
|
||||
Also, you can test the multiboot USB key within your Ubuntu desktop itself using QEMU or Oracle VirtualBox.
|
||||
|
||||

|
||||
|
||||
MultiSystem tool is one of the best and useful tool ever I have tested. This tool will definitely useful for those who wants to install multiple different operating systems on their systems. You don’t have to carry your CD/DVD pouch wherever you go. Just buy a 16GB 0r 32GB USB, and dumb all Operating systems you want to install in it. and install OS like a boss.
|
||||
|
||||
And, the good news for Windows OS users is it supports some Windows os too. I tested Windows 7, and it’s working!
|
||||
|
||||
Enjoy!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.unixmen.com/create-multiboot-usb-ubuntu-using-multisystem/
|
||||
|
||||
作者:[SK][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.unixmen.com/author/sk/
|
||||
[1]:http://liveusb.info/multisystem/install-depot-multisystem.sh.tar.bz2
|
||||
[2]:http://liveusb.info/dotclear/
|
76
sources/tech/20141127 How to install Docker on CentOS 7.md
Normal file
76
sources/tech/20141127 How to install Docker on CentOS 7.md
Normal file
@ -0,0 +1,76 @@
|
||||
[translating by KayGuoWhu]
|
||||
How to install Docker on CentOS 7
|
||||
================================================================================
|
||||
Docker is an open-source tool that makes creating & managing **Linux containers(LXC)** easy. Containers are like lightweight VMs which can be started & stopped in milliseconds. Dockers help the system admin & coders to develop their application in a container and can further scale up to 1000 of nodes.
|
||||
|
||||
The main difference between container and VM(Virtual machine) is that dockers provide **process based isolation** , whereas VM provides full isolation of resources. Virtual machine takes a minute to start where as container can be started in a second or less than a second. Container uses the Kernel of host OS , whereas VM uses the separate Kernel.
|
||||
|
||||
One of the limitation of Docker is that it can be used only on **64bit hosts** OS.
|
||||
|
||||
In this post we will discuss how to install docker in CentOS 7.x
|
||||
|
||||
### Installation of Docker on CentOS 7 ###
|
||||
|
||||
Docker package is included in the default CentOS-Extras repository. So to install docker , simply run below yum command :
|
||||
|
||||
[root@localhost ~]# yum install docker
|
||||
|
||||
### Start the Docker Service ###
|
||||
|
||||
Once the Installation is finished , start docker service and enable it at boot using below commands
|
||||
|
||||
[root@localhost ~]# service docker start
|
||||
[root@localhost ~]# chkconfig docker on
|
||||
|
||||
**Download the official Centos images Locally**
|
||||
|
||||
[root@localhost ~]# docker pull centos
|
||||
Pulling repository centos
|
||||
192178b11d36: Download complete
|
||||
70441cac1ed5: Download complete
|
||||
ae0c2d0bdc10: Download complete
|
||||
511136ea3c5a: Download complete
|
||||
5b12ef8fd570: Download complete
|
||||
|
||||
**Verify CentOS images that have been fetched :**
|
||||
|
||||
[root@localhost ~]# docker images centos
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
centos centos5 192178b11d36 2 weeks ago 466.9 MB
|
||||
centos centos6 70441cac1ed5 2 weeks ago 215.8 MB
|
||||
centos centos7 ae0c2d0bdc10 2 weeks ago 224 MB
|
||||
centos latest ae0c2d0bdc10 2 weeks ago 224 MB
|
||||
|
||||
**Run a Docker Container :**
|
||||
|
||||
[root@localhost ~]# docker run -i -t centos /bin/bash
|
||||
[root@dbf66395436d /]#
|
||||
|
||||
As we can see centos container has been started and we got the bash shell. In docker command we have used options like ‘-i attaches stdin and stdout’ and ‘-t allocates a terminal or console’ . To disconnect from container type exit .
|
||||
|
||||
[root@cd05639b3f5c /]# cat /etc/redhat-release
|
||||
CentOS Linux release 7.0.1406 (Core)
|
||||
[root@cd05639b3f5c /]# exit
|
||||
exit
|
||||
[root@localhost ~]#
|
||||
|
||||
We can also search Containers based on fedora & ubuntu OS.
|
||||
|
||||
[root@localhost ~]# docker search ubuntu
|
||||
[root@localhost ~]# docker search fedora
|
||||
|
||||
**Display the list of running containers **
|
||||
|
||||

|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linuxtechi.com/install-docker-on-centos-7/
|
||||
|
||||
作者:[Pradeep Kumar][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.linuxtechi.com/author/pradeep/
|
76
sources/tech/20141127 Quick systemd-nspawn guide.md
Normal file
76
sources/tech/20141127 Quick systemd-nspawn guide.md
Normal file
@ -0,0 +1,76 @@
|
||||
Quick systemd-nspawn guide
|
||||
================================================================================
|
||||
I switched to using systemd-nspawn in place of chroot and wanted to give a quick guide to using it. The short version is that I’d strongly recommend that anybody running systemd that uses chroot switch over - there really are no downsides as long as your kernel is properly configured.
|
||||
|
||||
Chroot should be no stranger to anybody who works on distros, and I suspect that the majority of Gentoo users have need for it from time to time.
|
||||
|
||||
### The Challenges of chroot ###
|
||||
|
||||
For most interactive uses it isn’t sufficient to just run chroot. Usually you need to mount /proc, /sys, and bind mount /dev so that you don’t have issues like missing ptys, etc. If you use tmpfs you might also want to mount the new tmp, var/tmp as tmpfs. Then you might want to make other bind mounts into the chroot. None of this is particularly difficult, but you usually end up writing a small script to manage it.
|
||||
|
||||
Now, I routinely do full backups, and usually that involves excluding stuff like tmp dirs, and anything resembling a bind mount. When I set up a new chroot that means updating my backup config, which I usually forget to do since most of the time the chroot mounts aren’t running anyway. Then when I do leave it mounted overnight I end up with backups consuming lots of extra space (bind mounts of large trees).
|
||||
|
||||
Finally, systemd now by default handles bind mounts a little differently when they contain other mount points (such as when using -rbind). Apparently unmounting something in the bind mount will cause systemd to unmount the corresponding directory on the other side of the bind. Imagine my surprise when I unmounted my chroot bind to /dev and discovered /dev/pts and /dev/shm no longer mounted on the host. It looks like there are ways to change that, but this isn’t the point of my post (it just spurred me to find another way).
|
||||
|
||||
### Systemd-nspawn’s Advantages ###
|
||||
|
||||
Systemd-nspawn is a tool that launches a container, and it can operate just like chroot in its simplest form. By default it automatically sets up most of the overhead like /dev, /tmp, etc. With a few options it can also set up other bind mounts as well. When the container exits all the mounts are cleaned up.
|
||||
|
||||
From the outside of the container nothing appears different when the container is running. In fact, you could spawn 5 different systemd-nspawn container instances from the same chroot and they wouldn’t have any interaction except via the filesystem (and that excludes /dev, /tmp, and so on - only changes in /usr, /etc will propagate across). Your backup won’t see the bind mounts, or tmpfs, or anything else mounted within the container.
|
||||
|
||||
The container also has all those other nifty container benefits like containment - a killall inside the container won’t touch anything outside, and so on. The security isn’t airtight - the intent is to prevent accidental mistakes.
|
||||
|
||||
Then, if you use a compatible sysvinit (which includes systemd, and I think recent versions of openrc), you can actually boot the container, which drops you to a getty inside. That means you can use fstab to do additional mounts inside the container, run daemons, and so on. You get almost all the benefits of virtualization for the cost of a chroot (no need to build a kernel, and so on). It is a bit odd to be running systemctl poweroff inside what looks just like a chroot, but it works.
|
||||
|
||||
Note that unless you do a bit more setup you will share the same network interface with the host, so no running sshd on the container if you have it on the host, etc. I won’t get into this but it shouldn’t be hard to run a separate network namespace and bind the interfaces so that the new instance can run dhcp.
|
||||
|
||||
### How to do it ###
|
||||
|
||||
So, getting it actually working will likely be the shortest bit in this post.
|
||||
|
||||
You need support for namespaces and multiple devpts instances in your kernel:
|
||||
|
||||
CONFIG_UTS_NS=y
|
||||
CONFIG_IPC_NS=y
|
||||
CONFIG_USER_NS=y
|
||||
CONFIG_PID_NS=y
|
||||
CONFIG_NET_NS=y
|
||||
CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
|
||||
|
||||
From there launching a namespace just like a chroot is really simple:
|
||||
|
||||
systemd-nspawn -D .
|
||||
|
||||
That’s it - you can exit from it just like a chroot. From inside you can run mount and see that it has taken care of /dev and /tmp for you. The “.” is the path to the chroot, which I assume is the current directory. With nothing further it runs bash inside.
|
||||
|
||||
If you want to add some bind mounts it is easy:
|
||||
|
||||
systemd-nspawn -D . --bind /usr/portage
|
||||
|
||||
Now your /usr/portage is bound to your host, so no need to sync/etc. If you want to bind to a different destination add a “:dest” after the source, relative to the root of the chroot (so --bind foo is the same as --bind foo:foo).
|
||||
|
||||
If the container has a functional init that can handle being run inside, you can add a -b to boot it:
|
||||
|
||||
systemd-nspawn -D . --bind /usr/portage -b
|
||||
|
||||
Watch the init do its job. Shut down the container to exit.
|
||||
|
||||
Now, if that container is running systemd you can direct its journal to the host journal with -h:
|
||||
|
||||
systemd-nspawn -D . --bind /usr/portage -j -b
|
||||
|
||||
Now, nspawn registers the container so that it shows up in machinectl. That makes it easy to launch a new getty on it, or ssh to it (if it is running ssh - see my note above about network namespaces), or power it off from the host.
|
||||
|
||||
That’s it. If you’re running systemd I’d suggest ditching chroot almost entirely in favor of nspawn.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://rich0gentoo.wordpress.com/2014/07/14/quick-systemd-nspawn-guide/
|
||||
|
||||
作者:[rich0][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://rich0gentoo.wordpress.com/
|
164
sources/tech/20141127 Some Sentences about Java.md
Normal file
164
sources/tech/20141127 Some Sentences about Java.md
Normal file
@ -0,0 +1,164 @@
|
||||
[a598799539 translating...]
|
||||
Some Sentences about Java
|
||||
================================================================================
|
||||
There is nothing new in this article. I just collected some trivial statements which may not be trivial for some of the junior programmers programmers. Boring old stuff.
|
||||
|
||||
If you happen all of these things you know more about Java than the average house wife. I do not know if there is point to know all of these. You can be a fairly good Java programmer if you do not know some of these features. However a lot of new information in this article probably indicates you have room to develop.
|
||||
|
||||
### There are 4 different protection types ###
|
||||
|
||||
in Java (not three). These are `private`, package private, `protected` and `public`. If you do not specify any protection modifier when you define an element in a class it will be package private (and not public and not protected).
|
||||
|
||||

|
||||
|
||||
There are four levels of protection in Java.
|
||||
|
||||
On the other hand if you do not specify protection modifier in front of a method declaration in an interface: it will be public. You may specify it to be explicitly public but it does not have effect on Java and SONAR will not like you doing so.
|
||||
|
||||

|
||||
|
||||
Protection is Transitive
|
||||
|
||||
> My opinion about Java allowing you to optionally write `public` in front of a method in an interface is that this is a technology mistake.
|
||||
|
||||
Similarly you can write `final` in front of a field in an interface, or even `static`. It may imply that they could be non-static or non-final: not true. Fields of an interface are final and static. Always.
|
||||
|
||||
### Protected and package private are not the same ###
|
||||
|
||||
Package private (or default) protection will let other classes of the same package access to the method or field. Protected methods and fields can be used from classes in the same package (so far the same as package private) and in addition to that it can be used from other classes that extend the class containing the protected field or method.
|
||||
|
||||
### Protected is transitive ###
|
||||
|
||||
If there are three packages `a`, `b` and `c`, each containing a class named `A`, `B` and `C` so that `B` extends `A` and `C` extends `B` then the class `C` can access the protected fields and methods of `A`.
|
||||
|
||||
package a;
|
||||
|
||||
public class A {
|
||||
protected void a() {
|
||||
|
||||
}
|
||||
}
|
||||
package b;
|
||||
|
||||
import a.A;
|
||||
|
||||
public class B extends A {
|
||||
protected void b() {
|
||||
a();
|
||||
}
|
||||
}
|
||||
package c;
|
||||
|
||||
import b.B;
|
||||
|
||||
public class C extends B {
|
||||
protected void c() {
|
||||
a();
|
||||
}
|
||||
}
|
||||
|
||||
### Interface can not define protected methods ###
|
||||
|
||||
Many thinks that you can also define `protected` methods in an interface. When programming the compiler makes it obvious fast and brutally: you can not. Btw: this is why I think that allowing the `public` keyword in an interface is a technology mistake: it makes people think that it could also be something else as well.
|
||||
|
||||

|
||||
|
||||
Private is the new public
|
||||
|
||||
If you want to declare a `protected` method in an interface, you probably did not understand encapsulation.
|
||||
|
||||
### Private is not that private ###
|
||||
|
||||
Private variables and methods are visible inside the compilation unit. If that sounds too cryptic: in the same Java file (almost). This is a bit more than “in the class where they are defined”. They can also be seen from classes and interfaces that are in the same compilation unit. Inner and nested classes can see private fields and methods of the class enclosing them. However enclosing classes can also see the private methods and fields of the classes they enclose down to any depth.
|
||||
|
||||
package a;
|
||||
|
||||
class Private {
|
||||
private class PrivateInPrivate {
|
||||
private Object object;
|
||||
}
|
||||
|
||||
Object m() {
|
||||
return new PrivateInPrivate().object;
|
||||
}
|
||||
}
|
||||
|
||||
This latter is not widely known. As a matter of fact it is rarely useful.
|
||||
|
||||
### Private is class level not object ###
|
||||
|
||||
If you can access a variable or method you can access it no matter which object it belongs to. If `this.a` is accessible then `another.a` is also accessible assumed that `another` is an instance of the same class. Objects that are instances of the same class can fool around with each others variables or methods. Rarely makes sense to have such a code though. A real life exception is `equals()` (as generated by Eclipse, lines 15 and 18):
|
||||
|
||||
package a;
|
||||
|
||||
public class PrivateIsClass {
|
||||
private Object object;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
PrivateIsClass other = (PrivateIsClass) obj;
|
||||
if (object == null) {
|
||||
if (other.object != null)
|
||||
return false;
|
||||
} else if (!object.equals(other.object))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
### Static classes may have many instances ###
|
||||
|
||||

|
||||
|
||||
Protection is not object level. It is class level.
|
||||
|
||||
Classes that are not supposed to have any instances are usually called utility classes. They contain only static fields and static methods and the only constructor is private, not invoked from any of the static methods of the class. In Java 8 you can have such a beasts implemented in interfaces, since Java 8 interfaces can have static methods in it. I am not convinced that we should use that feature instead of utility classes. I am not absolutely convinced that we should use utility classes at all.
|
||||
|
||||
Static classes are always inside in another class (or interface). They are nested classes. They are static and just as static methods can not access instance methods and fields of the class similarly a static nested class can not access the instance methods and fields of the embedding class. That is because nested classes do not have a reference (pointer if you like) to an instance of the embedding class. Inner classes, as opposed to nested classes are non static and can not be created without an instance of the embedding class. Each instance of an inner class has a reference to exactly one instance of the embedding class and thus an inner class can access instance methods and fields of the embedding class.
|
||||
|
||||
Because of this you can not create an inner class without an instance of the surrounding class. You need not specify it though if this is the current object, a.k.a `this`. In that case you can write `new`, which is, in this case, just a short form for `this.new`. In a static environment, for example from a static method you have to specify which instance of the enclosing class should the inner class created with. See the line 10:
|
||||
|
||||
package a;
|
||||
|
||||
class Nesting {
|
||||
static class Nested {}
|
||||
class Inner {}
|
||||
void method(){
|
||||
Inner inner = new Inner();
|
||||
}
|
||||
static void staticMethod(){
|
||||
Inner inner = new Nesting().new Inner();
|
||||
}
|
||||
}
|
||||
|
||||
### Anonymous classes can access only final variables ###
|
||||
|
||||

|
||||
|
||||
Variable has to be effective final
|
||||
|
||||
When an anonymous class is defined inside a method, it can access local variables if they are final. But saying that is vague. They have to be declared final and they also have to be effective final. This is what is released a bit in Java 8. You need not declare such variables as final but they still have to be effective final.
|
||||
|
||||

|
||||
|
||||
Java 8 does not require final, only effective final
|
||||
|
||||
Why do you need to declare something final, when it has to checked to be like that anyway. Like method arguments. They also have to be final. You say that this is not a requirement of Java? Well, you are right. It is a requirement of programming in good style.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.javacodegeeks.com/2014/11/some-sentences-about-java.html
|
||||
|
||||
作者:[Peter Verhas][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.javacodegeeks.com/author/peter-verhas/
|
@ -0,0 +1,98 @@
|
||||
dupeGuru – Find And Remove Duplicate Files Instantly From Hard Drive
|
||||
================================================================================
|
||||
### Introduction ###
|
||||
|
||||
Disk full is one of the big trouble for us. No matter how we’re careful, sometimes we might copy the same file to multiple locations, or download the same file twice unknowingly. Therefore, sooner or later we will end up with disk full error message, which is worst when we really need some space to store important data. If you believe your system has multiple duplicate files, then **dupeGuru** might help you.
|
||||
|
||||
dupeGuru team have also developed applications called **dupeGuru Music Edition** to remove duplicate music files, and **dupeGuru Picture Edition** to remove duplicate pictures.
|
||||
|
||||
### 1. dupeGuru (Standard Edition) ###
|
||||
|
||||
For those who don’t know about [dupeGuru][1], It is a free, open source, cross-platform application that can used to find and remove the duplicate files in your system. It will run under Linux, Windows, and Mac OS X platforms. It uses a quick fuzzy matching algorithm to find the duplicate files in minutes. Also, you can tweak dupeGuru to find exactly what kind of duplicate files you want to, and eliminate what kind of files from deletion. It supports English, French, German, Chinese (Simplified), Czech, Italian, Armenian, Russian, Ukrainian, Brazilian, and Vietnamese.
|
||||
|
||||
#### Install dupeGuru On Ubuntu 14.10/14.04/13.10/13.04/12.04 ####
|
||||
|
||||
dupeGuru developers have created a Ubuntu PPA to ease the installation. To install dupeGuru, enter the following commands one by one in your Terminal.
|
||||
|
||||
sudo apt-add-repository ppa:hsoft/ppa
|
||||
sudo apt-get update
|
||||
sudo apt-get install dupeguru-se
|
||||
|
||||
#### Usage ####
|
||||
|
||||
Usage is very simple. Launch dupeGuru either from Unity Dash or Menu.
|
||||
|
||||

|
||||
|
||||
Click + button on the bottom, and add the folder you want to scan. Click Scan button to start finding the duplicate files.
|
||||
|
||||

|
||||
|
||||
If the selected folder contains any duplicate files, it will display them. As you in the below screen shot, I have a duplicate file in the Downloads directory.
|
||||
|
||||

|
||||
|
||||
Now, you can decide what to do. You can either delete the duplicate file, or rename it, or copy/move it to another location. To do that select the duplicate files, or check the box that says “**Dupes only**” on the Menu bar. If you selected the Dupes only option, the duplicates files will only visible. So you can select and delete them easily. Click on the **Actions** drop-down box. Finally, select the action you want to perform. Here, I just want to delete the duplicate file, so I selected the option: **Send marked to Recycle bin**.
|
||||
|
||||

|
||||
|
||||
Then, click **Proceed** to delete the duplicate files.
|
||||
|
||||

|
||||
|
||||
### 2. dupeGuru Music Edition ###
|
||||
|
||||
[dupeGuru Music Edition][2] or dupeGuru ME in short, is just like dupeGuru. It does everything dupeGuru does, but it has more information columns (such as bitrate, duration, tags, etc..) and more scan types (filename with fields, tags and audio content). Like dupeGuru, dupeGuru ME also runs on Linux, Windows, and Mac OS X.
|
||||
|
||||
It supports variety of formats such as MP3, WMA, AAC (iTunes format), OGG, FLAC, loss-less AAC and loss-less WMA etc,
|
||||
|
||||
#### Install dupeGuru ME On Ubuntu 14.10/14.04/13.10/13.04/12.04 ####
|
||||
|
||||
Now, we don’t have to add any PPA, because already the added in the previous steps. So, enter the following command to install from your Terminal.
|
||||
|
||||
sudo apt-get install dupeguru-me
|
||||
|
||||
#### Usage ####
|
||||
|
||||
Launch it either from Unity dash or Menu. The usage, interface, and look of dupeGuru ME is similar to normal dupeGuru. Add the folder you to scan and select the action you want to perform. The duplicate music files will be deleted.
|
||||
|
||||

|
||||
|
||||
### 3. dupeGuru Picture Edition ###
|
||||
|
||||
[dupeGuru Picture Edition][3], or duepGuru PE in short, is a tool to find duplicate pictures on your computer. It is as like as dupeGuru, but is specialized for duplicate pictures matching. dupeGuru PE runs on Linux, Windows, and Mac OS X.
|
||||
|
||||
dupeGuru PE supports JPG, PNG, TIFF, GIF and BMP formats. All these formats can be compared together. The Mac OS X version of dupeGuru PE also supports PSD and RAW (CR2 and NEF) formats.
|
||||
|
||||
#### Install dupeGuru PE On Ubuntu 14.10/14.04/13.10/13.04/12.04 ####
|
||||
|
||||
As we have already added the PPA, We don’t need to add PPA for dupeGuru either. Just, run the following command to install it.
|
||||
|
||||
sudo apt-get install dupeguru-pe
|
||||
|
||||
#### Usage ####
|
||||
|
||||
It’s also look like dupeGuru, and dupeGuru ME in terms of usage, interface, and look.I wonder why the developer have created there separate versions for each category. It would be better, a single application has all of the above three features combined.
|
||||
|
||||
Launch it, add the folder you want to scan, and select the action you want to perform. That’s it. you duplicated files will be gone.
|
||||
|
||||

|
||||
|
||||
If you can’t remove them in case of any security problems, note down the location of the files, and manually delete them either from Terminal or File manager.
|
||||
|
||||
Cheers!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.unixmen.com/dupeguru-find-remove-duplicate-files-instantly-hard-drive/
|
||||
|
||||
作者:[SK][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.unixmen.com/author/sk/
|
||||
[1]:http://www.hardcoded.net/dupeguru/
|
||||
[2]:http://www.hardcoded.net/dupeguru_me/
|
||||
[3]:http://www.hardcoded.net/dupeguru_pe/
|
@ -1,8 +1,8 @@
|
||||
桌面看腻了?试试这 4 款漂亮的 Linux 图标主题吧
|
||||
================================================================================
|
||||
**Ubuntu 的默认图标主题在 5 年内[并未发生太大的变化][1],那些说“[图标早就彻底更新过了][2]”的你过来,我保证不打你。如果你确实想尝试一些新鲜的东西,我们将向你展示一些惊艳的替代品,它们会让你感到眼前一亮。**
|
||||
**Ubuntu 的默认图标主题在 5 年内[并未发生太大的变化][1],除了[一些古怪的新图标][2]。如果你确实想尝试一些新鲜的东西,我们将向你展示一些惊艳的替代品,它们会让你感到眼前一亮。**
|
||||
|
||||
如果还是感到不太满意,你可以在文末的评论里留下你比较中意的图标主题的链接地址。
|
||||
希望您可以在文末的评论里留下您比较中意的图标主题的链接地址。
|
||||
|
||||
### Captiva ###
|
||||
|
||||
@ -10,9 +10,9 @@
|
||||
|
||||
Captiva 图标 + elementary 文件夹图标 + Moka GTK
|
||||
|
||||
Captiva 是一款相对较新的图标主题,即使那些有华丽图标倾向的用户也会接受它。
|
||||
Captiva 是一款相对较新的图标主题,即使是那些喜欢华丽图标的用户也会接受它。
|
||||
|
||||
Captiva 由 DeviantArt 的用户 ~[bokehlicia][3] 制作,它并未使用现在非常流行的平面扁平风格,而是采用了一种圆润、柔和的外观。图标本身呈现出一种很有质感的材质外观,同时通过微调的阴影和亮丽的颜色提高了自身的格调。
|
||||
Captiva 由 DeviantArt 的用户 ~[bokehlicia][3] 制作,它并未使用现在非常流行的2D扁平化风格,而是采用了一种柔和圆滑的外观。图标本身呈现出一种很有质感的材质外观,同时通过微调的阴影和亮丽的颜色提高了自身的格调。
|
||||
|
||||
不过 Captiva 图标主题并未包含文件夹图标在内,因此它将使用 elementary(如果可以的话)或者普通的 Ubuntu 文件夹图标。
|
||||
|
||||
@ -24,29 +24,29 @@ Captiva 由 DeviantArt 的用户 ~[bokehlicia][3] 制作,它并未使用现在
|
||||
|
||||
或者,如果你不擅长通过软件源安装的话,你也可以直接从 DeviantArt 的主页上下载图标压缩包。把解压过的文件夹挪到家目录的‘.icons’目录下,即可完成安装。
|
||||
|
||||
不过在你完成安装后,你必须得通过像 [Unity Tweak Tool][4] 这样的工具来把你安装的图标主题(本文列出的其他图标主题也要这样)应用到系统上。
|
||||
无论你选择哪种方式来安装,你必须得通过像 [Unity Tweak Tool][4] 这样的工具来把你安装的图标主题(本文列出的其他图标主题也要这样)应用到系统上。
|
||||
|
||||
- [DeviantArt 上的 Captiva 图标主题][5]
|
||||
|
||||
### Square Beam ###
|
||||
|
||||

|
||||

|
||||
|
||||
Square Beam 图标在 Orchis GTK 主题下
|
||||
Orchis GTK 主题下的 Square Beam 图标
|
||||
|
||||
厌倦有棱角的图标了?尝试下 Square Beam 吧。Square Beam 因为其艳丽的色泽、尖锐的坡度变化和鲜明的图标形象,比本文列出的其他图标具有更加宏大的视觉效果。Square Beam 声称自己有超过 30,000 个(抱歉,我没有仔细数过...)的不同图标(!),因此你很难找到它没有考虑到的地方。
|
||||
厌倦有棱角的图标了?尝试下 Square Beam 吧。Square Beam 因为其艳丽的色泽、尖锐的坡度变化和鲜明的图标形象,比本文列出的其他图标具有更加宏大的视觉效果。Square Beam 声称自己有超过 30,000 个(抱歉,我没有仔细数过...)不同的图标(!),因此你很难找到它没有涉及到的地方。
|
||||
|
||||
- [GNOME-Look.org 上的 Square Beam 图标主题][6]
|
||||
|
||||
### Moka & Faba ###
|
||||
|
||||

|
||||

|
||||
|
||||
Moka/Faba Mono 图标在 Orchis GTK 主题下
|
||||
在 Orchis GTK 主题下的 Moka/Faba Mono 图标
|
||||
|
||||
这里得稍微介绍下 Moka 图标集。事实上,我敢打赌阅读此文的绝大部分用户正在使用这款图标。
|
||||
这里得稍微介绍下 Moka 图标集。事实上,我敢打赌阅读此文的大部分用户正在使用这款图标。
|
||||
|
||||
柔和的颜色、平滑的边缘以及简洁的图标艺术设计,Moka 是一款真正出色的覆盖全面的应用图标。它的兄弟 Faba 将这些特点展现得淋漓尽致,而 Moka 也将延续这些 —— 涵盖所有的系统图标、文件夹图标、面板图标,等等。
|
||||
淡柔的颜色、平滑的边缘以及简洁的图标艺术设计,Moka 是一款真正出色又覆盖全面的应用图标。它的兄弟 Faba 将这些特点展现得淋漓尽致,而 Moka 也将延续这些 —— 涵盖所有的系统图标、文件夹图标、面板图标,等等。这个组合的结果是...吸引你的眼球!
|
||||
|
||||
欲知 Ubuntu 上的安装详情、访问项目官方网站?请点击下面的链接。
|
||||
|
||||
@ -74,7 +74,7 @@ via: http://www.omgubuntu.co.uk/2014/09/4-gorgeous-linux-icon-themes-download
|
||||
|
||||
作者:[Joey-Elijah Sneddon][a]
|
||||
译者:[SteveArcher](https://github.com/SteveArcher)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[Caroline](https://github.com/carolinewuyan)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
@ -86,4 +86,4 @@ via: http://www.omgubuntu.co.uk/2014/09/4-gorgeous-linux-icon-themes-download
|
||||
[5]:http://bokehlicia.deviantart.com/art/Captiva-Icon-Theme-479302805
|
||||
[6]:http://gnome-look.org/content/show.php/Square-Beam?content=165094
|
||||
[7]:http://mokaproject.com/moka-icon-theme/download/ubuntu/
|
||||
[8]:http://gnome-look.org/content/show.php/Compass?content=160629
|
||||
[8]:http://gnome-look.org/content/show.php/Compass?content=160629
|
||||
|
@ -1,129 +0,0 @@
|
||||
用"Avconv"工具录制你的桌面视频和音频
|
||||
================================================================================
|
||||
**Libav**是一款跨平台的工具库,能够用来处理多媒体文件,流和协议,最初是fork自ffmpeg.Libav包含了子工具,比如:
|
||||
|
||||
- **Avplay**: 一款视频音频播放器.
|
||||
- **Avconv**: 能够记录多个设备输入源的一个多媒体转换器和视频音频录制器.
|
||||
- **Avprobe**: 一个连接多媒体文件流并且返回关于这个文件流的统计信息的工具.
|
||||
- **Libavfilter**:一个Libav工具的过滤器(filtering)API.
|
||||
|
||||
接下来,我们就要展示如何通过'Avconv'程序在**Debian/Ubuntu/Linux Mint**发行版上录制Linux桌面视频音频.
|
||||
### 步奏 1:下载 Avconv 工具 ###
|
||||
|
||||
**1.** **avconv**是 “**libav-tools**” 的一部分, 可以通过官方的基于debian的仓库下载,比如Mint,Ubuntu.输入下面命令即可:
|
||||
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install libav-tools
|
||||
|
||||

|
||||
|
||||
下载Avconv工具
|
||||
|
||||
**注意**: 如果从默认仓库下载的话 ‘**avconv**‘ 的版本可能比较老. 因此我们推荐你拉取最新的git官方版本.
|
||||
|
||||
$ sudo apt-get install yasm
|
||||
$ git clone git://git.libav.org/libav.git
|
||||
$ cd libav
|
||||
$ ./configure
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
**注意**: 你必须运行 “**./configure –help**” 去列出所有的可选配置选项并且安装相应的解码器和库,你还需要做很多去下载依赖.
|
||||
同样注意,如果你是从源代码编译的,就需要使用**sudo avconv**而不是**avconv**来运行这个工具.
|
||||
|
||||
### 步奏 2:开启桌面录制 ###
|
||||
|
||||
**2.**你已经准备好了,现在可以通过运行下面的命令录制你的视频了:
|
||||
|
||||
$ avconv -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 4 $HOME/output.avi
|
||||
|
||||
简单解释一下这个命令:
|
||||
|
||||
- **avconv -f x11grab** 默认从x服务捕捉画面.
|
||||
- **-r 25** 这是视频的帧率,可以自行设置.
|
||||
- **-s 1920×1080** 是你的画面分辨率,要设置成你当前画面的分辨率,这一点非常重要.
|
||||
- **-i :0.0** 记录的起点,设置成这样就可以了.
|
||||
- **-vcodec libx264** 我们用来录制视频的解码器.
|
||||
- **-threads 4**线程数, 可以根据情况更改.
|
||||
- **$HOME/output** 目标文件路径.
|
||||
- **.avi**视频格式,可以转换成 “flv”, “mp4″, “wmv”, “mov”, “mkv”.
|
||||
|
||||
**3.**在运行命令之后,录像机就会打开,并且在terminal上自动运行,按"Ctrl+C"建来终止.
|
||||
|
||||

|
||||
|
||||
录制桌面视频
|
||||
|
||||
**4.** 你可能需要使用VLC或者其他的播放器,或者你需要使用"avplay",这是一个Libav包里的播放器.
|
||||
|
||||
$ avplay $HOME/output.avi
|
||||
|
||||
**注意:** 别忘了替换输出文件的路径,录制效果还是很好的.
|
||||
|
||||

|
||||
|
||||
播放录制的文件
|
||||
|
||||
这有一段我用 “**avconv**” 录制的视频.
|
||||
|
||||
[视频地址](http://www.youtube.com/embed/g1FEh4wByGE)
|
||||
|
||||
<iframe width="640" height="380" frameborder="0" allowfullscreen="allowfullscreen" src="//www.youtube.com/embed/g1FEh4wByGE"></iframe>
|
||||
|
||||
### 步奏 3: 开始桌面音频和视频录制 ###
|
||||
|
||||
**5.** 如果想录制音频,先运行这个命令,列出所有的音频输入源:
|
||||
|
||||
$ arecord -l
|
||||
|
||||
如果结果是这样的
|
||||
|
||||

|
||||
|
||||
检查音频输入源
|
||||
|
||||
在我的例子中,我只有一个音频输入源,所以数量是**1**,这就是为什么我使用下面的命令来捕捉我的视频以及麦克风的音频了.
|
||||
|
||||
$ avconv -f alsa -i hw:1 -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 4 output-file2.avi
|
||||
|
||||
看黄色的部分:那是我修改了的地方,下面做个简短的解释:
|
||||
- **-f** alsa 一个从alsa设备捕捉声音的选项.
|
||||
- **-i** hw:1 是一个从 “hw:1” 设备捕捉画面的选项,这个设备是我电脑上仅有的一个设备.
|
||||
|
||||
**注意**: 别忘了替换 “**1**”,如果你想用**arecord -l**显示的**1**之外的设备的话.
|
||||
|
||||
结束录制, 再来一次“**Ctrl + C**” 就可以.
|
||||
|
||||
### 步奏 4:开始桌面音频的录制 ###
|
||||
|
||||
**6.** 如果只想录制音频的话,使用下面的命令.
|
||||
|
||||
$ avconv -f alsa -i hw:1 out.wav
|
||||
|
||||
**7.** 替换成 **.mp3** Libav支持的格式都可以,播放 **out.wav**就能听到你自己的声音了
|
||||
|
||||

|
||||
|
||||
录制桌面音频
|
||||
|
||||
###最后 ###
|
||||
|
||||
“**avconv**” 工具可以用来做很多其他事情,不仅仅是录制桌面视频,更多的教程和文档请移步到官网.
|
||||
|
||||
- [https://libav.org/avconv.html][1]
|
||||
|
||||
你对"avconv"的体验如何,你使用过其他工具录制桌面视频么?在评论里面和我们分享吧.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/record-ubuntu-desktop-screen-using-avconv/
|
||||
|
||||
作者:[Hanny Helal][a]
|
||||
译者:[ggaaooppeenngg](https://github.com/ggaaooppeenngg)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.tecmint.com/author/hannyhelal/
|
||||
[1]:https://libav.org/avconv.html
|
Loading…
Reference in New Issue
Block a user