mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
20140220-3 选题
This commit is contained in:
parent
6c1f4d6f44
commit
64ecb8546a
43
sources/Because You Can--Windows 8 GTK Theme For Linux.md
Normal file
43
sources/Because You Can--Windows 8 GTK Theme For Linux.md
Normal file
@ -0,0 +1,43 @@
|
||||
Because You Can: Windows 8 GTK Theme For Linux
|
||||
================================================================================
|
||||
The weather is pretty torrid here in my home town at present, but it will likely pale to the storm that this post will generate: yes, I’m writing about a Windows GTK theme.
|
||||
|
||||
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/02/windows-8-gtk-theme.png)
|
||||
|
||||
Now, confession time: I, personally, do not sit at my desk and think: “**What my Ubuntu desktop really needs…is to look like another OS!**”. But while I may not find aping the appearance of other systems to my own tastes, there are plenty of users – maybe even including you – who do.
|
||||
|
||||
There’s nothing inherently wrong with this, either. It’s easy to have a fit of fanboy-ism and biased derision, but the flexibility afforded to tweakers, customisers and themers of Linux desktop environments is there to be taken advantage of, so I say ‘Why not?‘
|
||||
|
||||
### Windows 8 Modern UI ###
|
||||
|
||||
> ‘The aged Crayola-blue borders of Windows XP and the transparent excesses of Aero Glass are sorely dated.’
|
||||
|
||||
As Windows is the most widely used desktop OS in the world – booing and hissing goes here – it’s no surprise that a mountain of GTK and Metacity themes mimicking its appearance are on offer.
|
||||
|
||||
But the aged Crayola-blue borders of Windows XP and the transparent excesses of Aero Glass are dated. It’s now all about the colourful Modern UI.
|
||||
|
||||
The flat, solid and angular stylings of the theme introduced in Windows 8 has helped give Microsoft’s desktop OS a fresher feel, while the [consistent use of design cues from its other products][1], like Windows Phone 8 and Xbox One, affords a small dose of familiarity to users.
|
||||
|
||||
This particular Windows 8 GTK Theme comes closer than most to accurately matching the design language of its inspiration. Granted, I don’t use Windows 8 enough to know its theme inside-out. But superficiality matters most here, and on that score this theme succeeds.
|
||||
|
||||
Flat themes are not the preserve of Microsoft, though. Themes like [Iris Light, which we shared recently][2], are picking up in popularity on Linux, too.
|
||||
|
||||
### Download Windows 8 Theme for Linux ###
|
||||
|
||||
Grab the theme files from GNOME-Look, pop them in your ‘/usr/share/theme‘ folder and then apply using an app like Unity Tweak.
|
||||
|
||||
- [Windows 8 GTK Theme on GNOME-Look][3]
|
||||
- [Windows 8 Metacity Theme on GNOME-Look][4]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.omgubuntu.co.uk/2014/02/windows-8-metro-gtk-theme
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://en.wikipedia.org/wiki/Metro_(design_language)
|
||||
[2]:http://www.omgubuntu.co.uk/2014/01/iris-flat-gtk-theme-for-linux
|
||||
[3]:http://gnome-look.org/content/show.php?content=158721
|
||||
[4]:http://gnome-look.org/content/show.php/Windows+8+modern+UI?content=157024
|
@ -0,0 +1,84 @@
|
||||
How to convert an HTML web page to PNG image on Linux
|
||||
================================================================================
|
||||
One of the easiest way to screen capture a particular web page as a PNG image is by using [CutyCapt][1], which is a convenient command line Linux tool for converting any HTML webpage to a variety of vector and bitmat image formats (e.g., SVG, PDF, PS, PNG, JPEG, TIFF, GIF). Internally, CutyCapt uses WebKit rendering engine to export webpage rendering output to an image file. Built with Qt, CutyCapt is actually a cross-platform application available for other platforms such as Windows as well.
|
||||
|
||||
In this tutorial, I will describe how to **convert an HTML web page to PNG image format using CutyCapt**.
|
||||
|
||||
### Install CutyCapt on Linux ###
|
||||
|
||||
Here are distro-specific instructions to install CutyCapt on Linux.
|
||||
|
||||
**Install CutyCapt on Debian, Ubuntu or Linux Mint**
|
||||
|
||||
$ sudo apt-get install cutycapt
|
||||
|
||||
**Install CutyCapt on Fedora**
|
||||
|
||||
$ sudo yum install subversion qt-devel qtwebkit-devel gcc-c++ make
|
||||
$ svn co svn://svn.code.sf.net/p/cutycapt/code/ cutycapt
|
||||
$ cd cutycapt/CutyCapt
|
||||
|
||||
Before compilation on Fedora, you need to [patch][2] source code.
|
||||
|
||||
Open CutyCapt.hpp with a text editor, and add the following two lines at the beginning of the file.
|
||||
|
||||
#include <QNetworkReply>
|
||||
#include <QSslError>
|
||||
|
||||
Finally, compile and install CutyCapt as follows.
|
||||
|
||||
$ qmake-qt4
|
||||
$ make
|
||||
$ sudo cp CutyCapt /usr/local/bin/cutycapt
|
||||
|
||||
### Install CutyCapt on CentOS or RHEL ###
|
||||
|
||||
First [enable EPEL repository][3] on your Linux. Then follow the same procedure as in Fedora to build and install CutyCapt.
|
||||
|
||||
### Convert HTML to PNG with CutyCapt ###
|
||||
|
||||
To take a screenshot of an HTML page as a PNG image, simply run CutyCapt in the following format.
|
||||
|
||||
$ cutycapt --url=http://www.cnn.com --out=cnn.png
|
||||
|
||||
To save an HTML page to a different format (e.g., PDF), simply specify the output file appropriately.
|
||||
|
||||
$ cutycapt --url=http://www.cnn.com --out=cnn.pdf
|
||||
|
||||
The following shows command-line options of cutycapt.
|
||||
|
||||
![](http://farm3.staticflickr.com/2811/12542271814_3c2563d405_z.jpg)
|
||||
|
||||
### Convert HTML to PNG with CutyCapt on a Headless Server ###
|
||||
|
||||
While CutyCapt is a CLI tool, it requires an X server running. If you attempt to run CutyCapt on a headless server, you will get the error:
|
||||
|
||||
cutycapt: cannot connect to X server :0
|
||||
|
||||
If you want to run CutyCapt on a headless server without X windows, you can set up Xvfb (lightweight "fake" X11 server) on the server, so that CutyCapt does not complain.
|
||||
|
||||
To install Xvfb on Debian, Ubuntu or Linux Mint:
|
||||
|
||||
$ sudo apt-get install xvfb
|
||||
|
||||
To install Xvfb on Fedora, CentOS or RHEL:
|
||||
|
||||
$ sudo yum install xvfb
|
||||
|
||||
After installing Xvfb, proceed to run CutyCapt as follows.
|
||||
|
||||
$ xvfb-run --server-args="-screen 0, 1280x1200x24" cutycapt --url=http://www.cnn.com --out=cnn.png
|
||||
|
||||
It will launch Xvfb server first, and then use CutyCapt to screen capture the webpage. So it may take longer. If you want to make multiple screenshots, you may want to start Xvfb server as a background daemon beforehand.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/2014/02/convert-html-web-page-png-image-linux.html
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://cutycapt.sourceforge.net/
|
||||
[2]:https://github.com/hoehrmann/CutyCapt/issues/3
|
||||
[3]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html
|
103
sources/How to set up RainLoop webmail in Ubuntu server.md
Normal file
103
sources/How to set up RainLoop webmail in Ubuntu server.md
Normal file
@ -0,0 +1,103 @@
|
||||
How to set up RainLoop webmail in Ubuntu server
|
||||
================================================================================
|
||||
Webmail is undoubtedly an essential part of any mail server. While native email client software has typically more features compared to webmail services, accessing IMAP or SMTP server ports via an email client from outside of the trusted network can sometimes be tricky. Moreover, while you need a designated workstation, laptop, or mobile device to use an email client, you can use webmail services from anywhere as long as you have an Internet connection.
|
||||
|
||||
This tutorial will focus on setting up [RainLoop][1] webmail on an Ubuntu server running Apache. RainLoop is PHP-based webmail, and has the following features.
|
||||
|
||||
- Supports apache, nginx and other web servers.
|
||||
- Standard interface supplemented with a gallery of themes to select from.
|
||||
- Free to use for personal and non-profit projects.
|
||||
|
||||
As of this writing, there is no support for email filtering and out-of office auto replies yet.
|
||||
|
||||
### Install RainLoop on Ubuntu Server ###
|
||||
|
||||
First of all, necessary packages are set up in the server.
|
||||
|
||||
# apt-get install wget unzip apache2 php5 php5-mysql libmysqlclient15-dev mysql-server poppassd
|
||||
|
||||
Next, RainLoop is downloaded and installed.
|
||||
|
||||
# mkdir /var/www/webmail
|
||||
# cd /var/www/webmail
|
||||
# wget http://repository.Rainloop.net/v1/Rainloop-1.6.3.706-e3c14e17bc4370a1561bcc68d1d494fd.zip
|
||||
# unzip Rainloop-1.6.3.706-e3c14e17bc4370a1561bcc68d1d494fd.zip
|
||||
# rm Rainloop-*.zip
|
||||
|
||||
Then necessary permission is set.
|
||||
|
||||
# cd /var/www/webmail
|
||||
# find . -type d -exec chmod 755 {} \;
|
||||
# find . -type f -exec chmod 644 {} \;
|
||||
# chown –R www-data:www-data /var/www/webmail
|
||||
|
||||
We are almost ready to use RainLoop. Final adjustments are made through the admin panel, which will be described next.
|
||||
|
||||
### First-Time Configuration via Admin Panel ###
|
||||
|
||||
Most configuration parameters can be adjusted with a user-friendly admin panel. The admin panel is accessible using the following credentials.
|
||||
|
||||
1. URL: http://IP/webmail/?admin
|
||||
1. user: admin
|
||||
1. Pass: 12345
|
||||
|
||||
Of course it is recommended to change the default password as soon as possible. We will use the admin panel to adjust the following settings.
|
||||
|
||||
### Add Domains ###
|
||||
|
||||
Domain settings is available at Admin Panel > Domains > Add Domain Page. The recommended server IP is localhost i.e., 127.0.0.1. Based on the server configuration, RainLoop can be configured to use IMAP/IMAPS or SMTP/SMTPS. Also, make sure that the 'Use short login form' checkbox is enabled.
|
||||
|
||||
![](http://www.flickr.com/photos/xmodulo/12603680854/)
|
||||
|
||||
Settings can be verified using the ‘Test Connection’ button.
|
||||
|
||||
### Enable Contacts ###
|
||||
|
||||
The contacts feature needs database support. We will be using MySQL for enabling contacts. The database required by RainLoop can be created manually as follows.
|
||||
|
||||
# mysql -u root -p
|
||||
|
||||
mysqlcreate database rainloop;
|
||||
mysqlexit;
|
||||
|
||||
Now this feature can be enabled from Admin Panel > Contacts page.
|
||||
|
||||
![](http://www.flickr.com/photos/xmodulo/12603262215/)
|
||||
|
||||
Once again, settings can be checked using the ‘Test’ button.
|
||||
|
||||
### Enable Password Changing Plugin ###
|
||||
|
||||
Email accounts in most Linux-based mail servers are actual users of the operating system with their own UID and GID. Therefore, changing the password of these accounts has been tricky in the past. Fortunately, today there are tools available that can get the job done. One such tool is poppassd.
|
||||
|
||||
The first step is to install poppassd on the server, which can be done with apt-get.
|
||||
|
||||
# apt-get install poppassd
|
||||
|
||||
Next, to allow RainLoop to use poppassd, install RainLoop plugin for poppassd from Admin Panel > Packages page.
|
||||
|
||||
![](http://www.flickr.com/photos/xmodulo/12603357113/)
|
||||
|
||||
Finally, the poppassd plugin can be enabled from Admin Panel > Plugins page.
|
||||
|
||||
![](http://www.flickr.com/photos/xmodulo/12603681254/)
|
||||
|
||||
Now that all the parameters are set, a user can log in by providing their credentials as shown in the screenshot.
|
||||
|
||||
- URL: http://IP/webmail
|
||||
- user: user@domain
|
||||
- pass: password
|
||||
|
||||
![](http://www.flickr.com/photos/xmodulo/12603357333/)
|
||||
|
||||
Hope this helps.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/2014/02/rainloop-webmail-ubuntu-server.html
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://rainloop.net/
|
@ -0,0 +1,121 @@
|
||||
How to spoof the MAC address of a network interface on Linux
|
||||
================================================================================
|
||||
A 48-bit MAC address (e.g., 08:4f:b5:05:56:a0) is a globally unique identifier associated with a physical network interface, which is assigned by a manufacturer of the corresponding network interface card. Higher 24 bits in a MAC address (also known as OUI or "Organizationally Unique Identifier") uniquely identify the organization which has issued the MAC address, so that there is no conflict among all existing MAC addresses.
|
||||
|
||||
While a MAC address is a manufacturer-assigned hardware address, it can actually be modified by a user. This practice is often called "MAC address spoofing." In this tutorial, I am going to show **how to spoof the MAC address of a network interface on Linux**.
|
||||
|
||||
### Why Spoof a MAC Address? ###
|
||||
|
||||
There could be several technical reasons you may want to change a MAC address. Some ISPs authenticate a subscriber's Internet connection via the MAC address of their home router. Suppose your router is just broken in such a scenario. While your ISP re-establishes your Internet access with a new router, you could temporarily restore the Internet access by changing the MAC address of your computer to that of the broken router.
|
||||
|
||||
Many DHCP servers lease IP addresses based on MAC addresses. Suppose for any reason you need to get a different IP address via DHCP than the current one you have. Then you could spoof your MAC address to get a new IP address via DHCP, instead of waiting for the current DHCP lease to expire who knows when.
|
||||
|
||||
Technical reasons aside, there are also legitimate privacy and security reasons why you wish to hide your real MAC address. Unlike your layer-3 IP address which can change depending on the networks you are connected to, your MAC address can uniquely identify you wherever you go. Call me a paranoid, but you know what this means to [your privacy][1]. There is also an exploit known as [piggybacking][2], where a hacker snoops on your MAC address on a public WiFi network, and attempts to impersonate you using your MAC address while you are away.
|
||||
|
||||
### How to Spoof a MAC Address Temporarily ###
|
||||
|
||||
On Linux, you can switch MAC addresses temporarily at run time. Note that you will lose your network connection momentarily during MAC address transition. In this case, the changed MAC address will revert to the original when you reboot. On Linux, there are several easy ways to change a MAC address at run time.
|
||||
|
||||
#### Method One: iproute2 ####
|
||||
|
||||
$ sudo ip link set dev eth0 down
|
||||
$ sudo ip link set dev eth0 address 00:00:00:00:00:01
|
||||
$ sudo ip link set dev eth0 up
|
||||
|
||||
#### Method Two: macchanger ####
|
||||
|
||||
A command-line utility called macchanger allows you to change MAC addresses from known vendor list.
|
||||
|
||||
To install macchanger on Debian, Ubuntu or Linux Mint:
|
||||
|
||||
$ sudo apt-get install macchanger
|
||||
|
||||
To install macchanger on Fedora:
|
||||
|
||||
$ sudo yum install macchanger
|
||||
|
||||
To install macchanger on CentOS or RHEL:
|
||||
|
||||
$ wget http://ftp.club.cc.cmu.edu/pub/gnu/macchanger/macchanger-1.6.0.tar.gz
|
||||
$ tar xvfvz macchanger-1.6.0.tar.gz
|
||||
$ cd macchanger-1.6.0
|
||||
$ ./configure
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
The following examples are some of advanced usages of macchanger. With macchanger, you no longer have to deactivate/reactivate a network interface manually.
|
||||
|
||||
To spoof a MAC address to a different value:
|
||||
|
||||
$ sudo macchanger --mac=00:00:00:00:00:01 eth0
|
||||
|
||||
To spoof a MAC address to a random value while preserving the same OUI:
|
||||
|
||||
$ sudo macchanger -e eth0
|
||||
|
||||
To spoof a MAC address to a completely random value:
|
||||
|
||||
$ sudo macchanger -r eth0
|
||||
|
||||
To get all MAC address OUIs associated with a particular vendor (e.g., Juniper):
|
||||
|
||||
$ macchanger -l | grep -i juniper
|
||||
|
||||
![](http://www.flickr.com/photos/xmodulo/12602895995/)
|
||||
|
||||
To show the original permanent and spoofed MAC addresses:
|
||||
|
||||
$ macchanger -s eth0
|
||||
|
||||
> Current MAC: 56:95:ac:ee:6e:77 (unknown)
|
||||
> Permanent MAC: 00:0c:29:97:68:02 (Vmware, Inc.)
|
||||
|
||||
### How to Spoof a MAC Address Permanently ###
|
||||
|
||||
If you want to spoof your MAC address permanently across reboots, you can specify the spoofed MAC address in interface configuration files. For example, if you want to change the MAC address of eth0, do the following.
|
||||
|
||||
#### On Fedora, CentOS or RHEL: ####
|
||||
|
||||
$ sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0
|
||||
|
||||
> DEVICE=eth0
|
||||
> MACADDR=00:00:00:00:00:01
|
||||
|
||||
Alternatively, you can create a custom startup script in /etc/NetworkManager/dispatcher.d as follows, especially if you are using Network Manager. I assume that you already installed macchanger.
|
||||
|
||||
$ sudo vi /etc/NetworkManager/dispatcher.d/000-changemac
|
||||
|
||||
> #!/bin/bash
|
||||
>
|
||||
> case "$2" in
|
||||
> up)
|
||||
> macchanger --mac=00:00:00:00:00:01 "$1"
|
||||
> ;;
|
||||
> esac
|
||||
|
||||
$ sudo chmod 755 /etc/NetworkManager/dispatcher.d/000-changemac
|
||||
|
||||
#### On Debian, Ubuntu or Linux Mint: ####
|
||||
|
||||
Create a custom startup script in /etc/network/if-up.d/ as follows.
|
||||
|
||||
$ sudo vi /etc/network/if-up.d/changemac
|
||||
|
||||
> #!/bin/sh
|
||||
>
|
||||
> if [ "$IFACE" = eth0 ]; then
|
||||
> ip link set dev "$IFACE" address 00:00:00:00:00:01
|
||||
> fi
|
||||
|
||||
$ sudo chmod 755 /etc/network/if-up.d/changemac
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/2014/02/spoof-mac-address-network-interface-linux.html
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.identityblog.com/?p=1131
|
||||
[2]:http://en.wikipedia.org/wiki/Piggybacking_(Internet_access)
|
@ -0,0 +1,21 @@
|
||||
Ubuntu 14.04's System Settings received show/hide username option
|
||||
================================================================================
|
||||
As you know, Ubuntu 14.04 is currently in development, process that is to generate the upcoming Ubuntu 14.04 LTS in the next months.
|
||||
|
||||
The latest changes arrived in Ubuntu 14.04 via the regular updates bring a minor-yet-handy feature, allowing you to easily show/hide the username on the Unity panel.
|
||||
|
||||
That means that if you navigate to `System Settings-->User Accounts`, you will see a new `Show my login name in the menu bar` entry, entry unchecked by default.
|
||||
|
||||
If you check it, your username will appear on the Unity panel, if you uncheck it, the top panel displays no username.
|
||||
|
||||
![](http://iloveubuntu.net/pictures_me/system%20settings%20show%20hide%20username.png)
|
||||
|
||||
The entry is handy, for example, if you want to take a screenshot of your desktop with your username visible, you are to 1 click-away check the option, shortly after you can unclutter the Unity panel by disabling the option without requiring non-default applications.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://iloveubuntu.net/ubuntu-1404s-system-settings-received-showhide-username-option
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
Loading…
Reference in New Issue
Block a user