- Linux Software Repositories
- Overview
- The Linux Package Signing Keys
- Key Details
- Command line key installation for APT
- Command line key installation for RPM
- Google url build linux
- What GN is for
- Getting a binary
- Examples
- Reporting bugs
- Sending patches
- Community
- Versioning and distribution
- Googler: Now You Can Google From Linux Terminal!
- Googler: Google in your Linux terminal
- Installation on Ubuntu
- Features & Basic Usage
- Thoughts on Googler?
- Google url build linux
Linux Software Repositories
Overview
Google’s Linux software packages will automatically configure the repository settings necessary to keep your Google Linux applications up-to-date. Please download and install packages from the appropriate product pages.
The Linux Package Signing Keys
Google’s Linux packages are signed with GNU Privacy Guard (GPG) keys. Google’s packages will automatically configure your package manager to verify product updates with the public signing key, but you may also install it separately if, for instance, you want to verify the integrity of an initial package download. Follow the instructions below to manually configure your package manager to use the keys.
Key Details
- Download: https://dl.google.com/linux/linux_signing_key.pub
- Key ID: Google, Inc. Linux Package Signing Key
- Fingerprint: 4CCA 1EAF 950C EE4A B839 76DC A040 830F 7FAC 5991
- Google, Inc. (Linux Package Signing Authority)
- Fingerprint: EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796
Command line key installation for APT
On an APT-based system (Debian, Ubuntu, etc.), download the key and then use apt to install it.
Recent versions of apt-get will automatically attempt to verify packages on download. If an appropriate key is not found or if the package is corrupted, you will get a message like the following:
Command line key installation for RPM
On an RPM-based system (Fedora, SUSE, Mandriva, RHEL, etc.), download the key and then use rpm to install it.
You can verify the key installation by running:
To manually verify an RPM package, you can run the command:
Источник
Google url build linux
GN is a meta-build system that generates build files for Ninja.
- Documentation in docs/. In particular GN Quick Start guide and the reference (the latter is all builtin help converted to a single file).
- An introductory presentation.
- The mailing list.
What GN is for
GN is currently used as the build system for Chromium, Fuchsia, and related projects. Some strengths of GN are:
It is designed for large projects and large teams. It scales efficiently to many thousands of build files and tens of thousands of source files.
It has a readable, clean syntax. Once a build is set-up, it is generally easy for people with no backround in GN to make basic edits to the build.
It is designed for multi-platform projects. It can cleanly express many complicated build variants across different platforms. A single build invocation can target multiple platforms.
It supports multiple parallel output directories, each with their own configuration. This allows a developer to maintain builds targeting debug, release, or different platforms in parallel without forced rebuilds when switching.
It has a focus on correctness. GN checks for the correct dependencies, inputs, and outputs to the extent possible, and has a number of tools to allow developers to ensure the build evolves as desired (for example, gn check , testonly , assert_no_deps ).
It has comprehensive build-in help available from the command-line.
Although small projects successfully use GN, the focus on large projects has some disadvanages:
GN has the goal of being minimally expressive. Although it can be quite flexible, a design goal is to direct members of a large team (who may not have much knowledge about the build) down an easy-to-understand, well-lit path. This isn’t necessarily the correct trade-off for smaller projects.
The minimal build configuration is relatively heavyweight. There are several files required and the exact way all compilers are linkers are run must be specified in the configuration (see “Examples” below). There is no default compiler configuration.
It is not easily composable. GN is designed to compile a single large project with relatively uniform settings and rules. Projects like Chromium do bring together multiple repositories from multiple teams, but the projects must agree on some conventions in the build files to allow this to work.
GN is designed with the expectation that the developers building a project want to compile an identical configuration. So while builds can integrate with the user‘s environment like the CXX and CFLAGS variables if they want, this is not the default and most project’s builds do not do this. The result is that many GN projects do not integrate well with other systems like ebuild.
There is no simple release scheme (see “Versioning and distribution” below). Projects are expected to manage the version of GN they require. Getting an appropriate GN binary can be a hurdle for new contributors to a project. Since it is relatively uncommon, it can be more difficult to find information and examples.
GN can generate Ninja build files for C, C++, Rust, Objective C, and Swift source on most popular platforms. Other languages can be compiled using the general “action” rules which are executed by Python or another scripting language (Google does this to compile Java and Go). But because this is not as clean, generally GN is only used when the bulk of the build is in one of the main built-in languages.
Getting a binary
You can download the latest version of GN binary for Linux, macOS and Windows from Google’s build infrastructure (see “Versioning and distribution” below for how this is expected to work).
Alternatively, you can build GN from source with a C++17 compiler:
On Windows, it is expected that cl.exe , link.exe , and lib.exe can be found in PATH , so you’ll want to run from a Visual Studio command prompt, or similar.
On Linux, Mac and z/OS, the default compiler is clang++ , a recent version is expected to be found in PATH . This can be overridden by setting CC , CXX , and AR .
On z/OS, building GN requires ZOSLIB to be installed, as described at that URL. When building with build/gen.py , use the option —zoslib-dir to specify the path to ZOSLIB:
By default, if you don’t specify —zoslib-dir , gn/build/gen.py expects to find zoslib directory under gn/third_party/ .
Examples
There is a simple example in examples/simple_build directory that is a good place to get started with the minimal configuration.
To build and run the simple example with the default gcc compiler:
For a maximal configuration see the Chromium setup:
and the Fuchsia setup:
Reporting bugs
If you find a bug, you can see if it is known or report it in the bug database.
Sending patches
GN uses Gerrit for code review. The short version of how to patch is:
Then, to upload a change for review:
The first time you do this you’ll get an error from the server about a missing change-ID. Follow the directions in the error message to install the change-ID hook and run git commit —amend to apply the hook to the current commit.
When revising a change, use:
which will add the new changes to the existing code review, rather than creating a new one.
We ask that all contributors sign Google’s Contributor License Agreement (either individual or corporate as appropriate, select ‘any other Google project’).
Community
You may ask questions and follow along with GN‘s development on Chromium’s gn-dev@ Google Group.
Versioning and distribution
Most open-source projects are designed to use the developer‘s computer’s current toolchain such as compiler, linker, and build tool. But the large centrally controlled projects that GN is designed for typically want a more hermetic environment. They will ensure that developers are using a specific compatible toolchain that is versioned with the code.
As a result, GN expects that the project choose the appropriate version of GN that will work with each version of the project. There is no “current stable version” of GN that is expected to work for all projects.
As a result, the GN developers do not maintain any packages in any of the various packaging systems (Debian, RedHat, HomeBrew, etc.). Some of these systems to have GN packages, but they are maintained by third parties and you should use them at your own risk. Instead, we recommend you refer your checkout tooling to download binaries for a specific hash from Google’s build infrastructure or compile your own.
GN does not guarantee the backwards-compatibility of new versions and has no branches or versioning scheme beyond the sequence of commits to the main git branch (which is expected to be stable).
In practice, however, GN is very backwards-compatible. The core functionality has been stable for many years and there is enough GN code at Google alone to make non-backwards-compatible changes very difficult, even if they were desirable.
There have been discussions about adding a versioning scheme with some guarantees about backwards-compatibility, but nothing has yet been implemented.
Источник
Googler: Now You Can Google From Linux Terminal!
Last updated September 15, 2016 By Munif Tanjim 29 Comments
A quick question: What do you do every day? Of course, a lot of things. But I can tell one thing, you search on Google almost every day (if not every day). Am I right?
Now, if you are a Linux user (which I’m guessing you are) here’s another question: wouldn’t it be nice if you can Google without even leaving the terminal? Without even firing up a Browser window?
If you are a *nix enthusiast and also one of those people who just love the view of the terminal, I know your answer is – Yes. And I think, the rest of you will also like the nifty little tool I’m going to introduce today. It’s called Googler!
Googler: Google in your Linux terminal
Googler is a straightforward command-line utility for Google-ing right from your terminal window. Googler mainly supports three types of Google Searches:
- Google Search: Simple Google searching, equivalent to searching on Google homepage.
- Google News Search: Google searching for News, equivalent to searching on Google News.
- Google Site Search: Google searching for results from a specific site.
Googler shows the search results with the title, URL and page excerpt. The search results can be opened directly in the browser with only a couple of keystrokes.
Installation on Ubuntu
Let’s go through the installation process first.
At first make sure you have python version 3.3 or later using this command:
If not, upgrade it. Googler requires python 3.3+ for running.
Though Googler is yet not available through package repository on Ubuntu, we can easily install it from the GitHub repository. All we have to do is run the following commands:
And that’s it. Googler is installed along with command autocompletion feature.
Features & Basic Usage
If we go through all its features, Googler is actually quite powerful a tool. Some of the main features are:
- Interactive Interface: Run the following command in terminal:
The interactive interface will be opened. The developer of Googler, Arun Prakash Jana calls it the omniprompt. You can enter ? for available commands on omniprompt.
Googler OmniPrompt Help
Googler OmniPrompt Help
From the omniprompt, enter any search phrases to initiate the search. You can then enter n or p to navigate next or previous page of search results.
To open any search result in a browser window, just enter the index number of that result. Or you can open the search page itself by entering o .
News Search: If you want to search News, start googler with the N optional argument:
The subsequent omniprompt will fetch results from Google News.
Site Search: If you want to search pages from a specific site, run googler with w
The subsequent omniprompt with fetch results only from It’s FOSS blog!
The above example command will open search results from Google’s Indian domain (in for India).
There are much more. You can twist Googler to suit your needs.
Googler can also be integrated with a text-based browser ( like – elinks, links, lynx, w3m etc.), so that you wouldn’t even need to leave the terminal for browsing web pages. The instructions can be found on the GitHub project page of Googler.
If you want a graphical demonstration of Googler’s various features, feel free to check the terminal recording attached to the GitHub project page : jarun/googler v2.7 quick demo.
Thoughts on Googler?
Though Googler might not feel necessary or desired to everybody, for someone who doesn’t want to open the browser just for searching on google or simply want to spend as much as time possible on the terminal window, it is a great tool indeed. What do you think?
Like what you read? Please share it with others.
Источник
Google url build linux
googler is a power tool to Google (web, news, videos and site search) from the command-line. It shows the title, URL and abstract for each result, which can be directly opened in a browser from the terminal. Results are fetched in pages (with page navigation). Supports sequential searches in a single googler instance.
googler was initially written to cater to headless servers without X. You can integrate it with a text-based browser. However, it has grown into a very handy and flexible utility that delivers much more. For example, fetch any number of results or start anywhere, limit search by any duration, define aliases to google search any number of websites, switch domains easily. all of this in a very clean interface without ads or stray URLs. The shell completion scripts make sure you don’t need to remember any options.
googler isn’t affiliated to Google in any way.
Here are some usage examples:
Google hello world:
Fetch 15 results updated within the last 14 months, starting from the 3 rd result for the keywords jungle book in site imdb.com:
Or instead of the last 14 months, look for results specifically between Apr 4, 2016 and Dec 31, 2016:
Read recent news on gadgets:
Fetch results on IPL cricket from Google India server in English:
Search for videos on PyCon 2020:
Search quoted text:
Search for a specific file type:
Disable automatic spelling correction, e.g. fetch results for googler instead of google :
I’m feeling lucky search:
Website specific search:
Site specific search continues at omniprompt.
Positional arguments are joined (with delimiting whitespace) to form the final query, so you can be creative with your aliases. For instance, always exclude seoarticlefactory.com from search results:
Alias to find definitions of words:
Look up n , p , o , O , q , g keywords or a result index at the omniprompt: as the omniprompt recognizes these keys or index strings as commands, you need to prefix them with g , e.g.,
Input and output redirection:
Note that -C is required to avoid printing control characters (for colored output).
Pipe output:
Use a custom color scheme, e.g., a warm color scheme designed for Solarized Dark (screenshot):
Tunnel traffic through an HTTPS proxy, e.g., a local Privoxy instance listening on port 8118:
By default the environment variable https_proxy is used, if defined.
Quote multiple search keywords to auto-complete (using completion script):
More help:
More fun stuff you can try with googler :
Table of contents
- Google Search, Google Site Search, Google News, Google Videos
- Fast and clean (no ads, stray URLs or clutter), custom color
- Navigate result pages from omniprompt, open URLs in browser
- Effortless keyword-based site search with googler @t add-on
- Search and option completion scripts for Bash, Zsh and Fish
- Fetch n results in a go, start at the n th result
- Disable automatic spelling correction and search exact keywords
- Specify duration, country/domain (default: worldwide/.com), language
- Google keywords (e.g. filetype:mime , site:somesite.com ) support
- Open the first result directly in browser (as in I’m Feeling Lucky)
- Non-stop searches: fire new searches at omniprompt without exiting
- HTTPS proxy, User Agent, TLS 1.2 (default) support
- Comprehensive documentation, man page with handy usage examples
- Minimal dependencies
googler requires Python 3.6 or later. Only the latest patch release of each minor version is supported.
To copy url to clipboard at the omniprompt, googler looks for xsel or xclip or termux-clipboard-set (in the same order) on Linux, pbcopy (default installed) on macOS and clip (default installed) on Windows. It also supports GNU Screen and tmux copy-paste buffers in the absence of X11.
From a package manager
Install googler from your package manager. If the version available is dated try an alternative installation method.
Packaging status (expand)
Tips for packagers
googler v2.7 and later ships with an in-place self-upgrade mechanism which you may want to disable. To do this, run
Packages for Arch Linux, CentOS, Debian, Fedora, openSUSE and Ubuntu are available with the latest stable release.
If you have git installed, clone this repository. Otherwise download the latest stable release or development version.
To install to the default location ( /usr/local ):
To remove googler and associated docs, run
PREFIX is supported, in case you want to install to a different location.
googler is a standalone executable (and can run even on environments like Termux). From the containing directory:
Downloading a single file
googler is a single standalone script, so you could download just a single file if you’d like to.
To install the latest stable version, run
You could then let googler upgrade itself by running
Similarly, if you want to install from git master (risky), run
and upgrade by running
Search keyword and option completion scripts for Bash, Fish and Zsh can be found in respective subdirectories of auto-completion/ . Please refer to your shell’s manual for installation instructions.
googler doesn’t have any! This is to retain the speed of the utility and avoid OS-specific differences. Users can enjoy the advantages of config files using aliases (with the exception of the color scheme, which can be additionally customized through an environment variable; see Colors). There’s no need to memorize options.
For example, the following alias for bash/zsh/ksh/etc.
fetches 7 results from the Google Russia server, with preference towards results in Russian.
The alias serves both the purposes of using config files:
- Persistent settings: when the user invokes g , it expands to the preferred settings.
- Override settings: thanks to the way Python argparse works, googler is written so that the settings in alias are completely overridden by any options passed from cli. So when the same user runs g -l de -c de -n 12 hello world , 12 results are returned from the Google Germany server, with preference towards results in German.
googler @t is a convenient add-on to Google Site Search with unique keywords. While googler has an integrated option to search a site, we simplified it further with aliases. The file googler_at contains a list of website search aliases. To source it, run:
With googler @t , here’s how you search Wikipedia for hexspeak :
Oh yes! You can combine other googler options too! To make life easier, you can also configure your shell to source the file when it starts.
All the aliases start with the @ symbol (hence the name googler @t ) and there is minimum chance they will conflict with any shell commands. Feel free to add your own aliases to the file and contribute back the interesting ones.
Text-based browser integration
googler works out of the box with several text-based browsers if the BROWSER environment variable is set. For instance,
or for one-time use,
Due to certain graphical browsers spewing messages to the console, googler suppresses browser output by default unless BROWSER is set to one of the known text-based browsers: currently elinks , links , lynx , w3m or www-browser . If you use a different text-based browser, you will need to explicitly enable browser output with the —show-browser-logs option. If you believe your browser is popular enough, please submit an issue or pull request and we will consider whitelisting it. See the man page for more details on —show-browser-logs .
If you need to use a GUI browser with BROWSER set, use the omniprompt key O . googler will try to ignore text-based browsers and invoke a GUI browser. Browser logs are always suppressed with O .
googler allows you to customize the color scheme via a six-letter string, reminiscent of BSD LSCOLORS . The six letters represent the colors of
- indices
- titles
- URLs
- metadata/publishing info (Google News only)
- abstracts
- prompts
respectively. The six-letter string is passed in either as the argument to the —colors option, or as the value of the environment variable GOOGLER_COLORS .
We offer the following colors/styles:
Letter | Color/Style |
---|---|
a | black |
b | red |
c | green |
d | yellow |
e | blue |
f | magenta |
g | cyan |
h | white |
i | bright black |
j | bright red |
k | bright green |
l | bright yellow |
m | bright blue |
n | bright magenta |
o | bright cyan |
p | bright white |
A-H | bold version of the lowercase-letter color |
I-P | bold version of the lowercase-letter bright color |
x | normal |
X | bold |
y | reverse video |
Y | bold reverse video |
The default colors string is GKlgxy , which stands for
- bold bright cyan indices
- bold bright green titles
- bright yellow URLs
- cyan metadata/publishing info
- normal abstracts
- reverse video prompts
- Bright colors (implemented as \x1b[90m – \x1b[97m ) may not be available in all color-capable terminal emulators;
- Some terminal emulators draw bold text in bright colors instead;
- Some terminal emulators only distinguish between bold and bright colors via a default-off switch.
Please consult the manual of your terminal emulator as well as the Wikipedia article on ANSI escape sequences.
To show the domain names in search results instead of the expanded URL (and use lesser space), set the environment variable DISABLE_URL_EXPANSION .
Windows Subsystem for Linux (WSL)
On WSL, GUI browsers on the Windows side cannot be detected by default. You need to explicitly set the BROWSER environment variable to the path of a Windows executable. For instance, you can put the following in your shell’s rc:
In some instances googler may show fewer number of results than you expect, e.g., if you fetch a single result ( -n 1 ) it may not show any results. The reason is Google shows some Google service (e.g. Youtube) results, map locations etc. depending on your geographical data, which googler tries to omit. In some cases Google (the web-service) doesn’t show exactly 10 results (default) on a search. We chose to omit these results as far as possible. While this can be fixed, it would need more processing (and more time). You can just navigate forward to fetch the next set of results.
By default googler applies some TCP optimizations and forces TLS 1.2 (on Python 3.4 and above). If you are facing connection issues, try disabling both using the —notweak switch.
Google News service is not available if the language is dk (Denmark), fi (Finland) or is (Iceland). Use -l en . Please refer to #187 for more information.
Some users have reported problems with a colored omniprompt (refer to issue #203) with iTerm2 on macOS. To force a plain omniprompt:
Initially I raised a pull request but I could see that the last change was made 7 years earlier. In addition, there is no GitHub activity from the original author Henri Hakkinen in past year. I have created this independent repo for the project with the name googler . I retained the original copyright information (though googler is organically different now).
Google provides a search API which returns the results in JSON format. However, as per my understanding from the official docs, the API issues the queries against an existing instance of a custom search engine and is limited by 100 search queries per day for free. In addition, I have reservations in paying if they ever change their plan or restrict the API in other ways. So I refrained from coupling with Google plans & policies or exposing my trackable personal custom search API key and identifier for the public. I retained the browser-way of doing it by fetching html, which is a open and free specification.
You can find a rofi script for googler here. Written by an anonymous user, untested and we don’t maintain it.
The Albert Launcher python plugins repo (awesome-albert-plugins) includes suggestions-enabled search plugins for a variety of websites using googler. Refer to the latter for demos and usage instructions.
Pull requests are welcome. Please visit #209 for a list of TODOs.
- Copyright © 2008 Henri Hakkinen
- Copyright © 2015-2021 Arun Prakash Jana
- Zhiming Wang
- Johnathan Jenkins
- SZ Lin
Special thanks to jeremija and Narrat for their contributions.
Logo copyright © 2017 Zhiming Wang.
You may freely redistribute it alongside the code, or use it when describing or linking to this project. You should NOT create modified versions of it, make it the logo or icon of your project (except personal forks and/or forks with the goal of upstreaming), or otherwise use it without written permission.
Источник