yannstatic/static/2020/11/25/NEW-PC1-ArchLinux-XFCE-ASUS-H110M-A.html

3864 lines
280 KiB
HTML
Raw Normal View History

2024-10-31 20:18:37 +01:00
<!DOCTYPE html><html lang="fr">
<head><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"><title>PC1 Ordinateur Bureau ArchLinux xfce (NEW) - YannStatic</title>
<meta name="description" content="Ordinateur PC1">
<link rel="canonical" href="https://static.rnmkcy.eu/2020/11/25/NEW-PC1-ArchLinux-XFCE-ASUS-H110M-A.html"><link rel="alternate" type="application/rss+xml" title="YannStatic" href="/feed.xml">
<!-- - include head/favicon.html - -->
<link rel="shortcut icon" type="image/png" href="/assets/favicon/favicon.png"><link rel="stylesheet" href="/assets/css/main.css"><link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" ><!-- start custom head snippets --><link rel="stylesheet" href="/assets/css/expand.css">
<!-- end custom head snippets --><script>(function() {
window.isArray = function(val) {
return Object.prototype.toString.call(val) === '[object Array]';
};
window.isString = function(val) {
return typeof val === 'string';
};
window.hasEvent = function(event) {
return 'on'.concat(event) in window.document;
};
window.isOverallScroller = function(node) {
return node === document.documentElement || node === document.body || node === window;
};
window.isFormElement = function(node) {
var tagName = node.tagName;
return tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA';
};
window.pageLoad = (function () {
var loaded = false, cbs = [];
window.addEventListener('load', function () {
var i;
loaded = true;
if (cbs.length > 0) {
for (i = 0; i < cbs.length; i++) {
cbs[i]();
}
}
});
return {
then: function(cb) {
cb && (loaded ? cb() : (cbs.push(cb)));
}
};
})();
})();
(function() {
window.throttle = function(func, wait) {
var args, result, thisArg, timeoutId, lastCalled = 0;
function trailingCall() {
lastCalled = new Date;
timeoutId = null;
result = func.apply(thisArg, args);
}
return function() {
var now = new Date,
remaining = wait - (now - lastCalled);
args = arguments;
thisArg = this;
if (remaining <= 0) {
clearTimeout(timeoutId);
timeoutId = null;
lastCalled = now;
result = func.apply(thisArg, args);
} else if (!timeoutId) {
timeoutId = setTimeout(trailingCall, remaining);
}
return result;
};
};
})();
(function() {
var Set = (function() {
var add = function(item) {
var i, data = this._data;
for (i = 0; i < data.length; i++) {
if (data[i] === item) {
return;
}
}
this.size ++;
data.push(item);
return data;
};
var Set = function(data) {
this.size = 0;
this._data = [];
var i;
if (data.length > 0) {
for (i = 0; i < data.length; i++) {
add.call(this, data[i]);
}
}
};
Set.prototype.add = add;
Set.prototype.get = function(index) { return this._data[index]; };
Set.prototype.has = function(item) {
var i, data = this._data;
for (i = 0; i < data.length; i++) {
if (this.get(i) === item) {
return true;
}
}
return false;
};
Set.prototype.is = function(map) {
if (map._data.length !== this._data.length) { return false; }
var i, j, flag, tData = this._data, mData = map._data;
for (i = 0; i < tData.length; i++) {
for (flag = false, j = 0; j < mData.length; j++) {
if (tData[i] === mData[j]) {
flag = true;
break;
}
}
if (!flag) { return false; }
}
return true;
};
Set.prototype.values = function() {
return this._data;
};
return Set;
})();
window.Lazyload = (function(doc) {
var queue = {js: [], css: []}, sources = {js: {}, css: {}}, context = this;
var createNode = function(name, attrs) {
var node = doc.createElement(name), attr;
for (attr in attrs) {
if (attrs.hasOwnProperty(attr)) {
node.setAttribute(attr, attrs[attr]);
}
}
return node;
};
var end = function(type, url) {
var s, q, qi, cbs, i, j, cur, val, flag;
if (type === 'js' || type ==='css') {
s = sources[type], q = queue[type];
s[url] = true;
for (i = 0; i < q.length; i++) {
cur = q[i];
if (cur.urls.has(url)) {
qi = cur, val = qi.urls.values();
qi && (cbs = qi.callbacks);
for (flag = true, j = 0; j < val.length; j++) {
cur = val[j];
if (!s[cur]) {
flag = false;
}
}
if (flag && cbs && cbs.length > 0) {
for (j = 0; j < cbs.length; j++) {
cbs[j].call(context);
}
qi.load = true;
}
}
}
}
};
var load = function(type, urls, callback) {
var s, q, qi, node, i, cur,
_urls = typeof urls === 'string' ? new Set([urls]) : new Set(urls), val, url;
if (type === 'js' || type ==='css') {
s = sources[type], q = queue[type];
for (i = 0; i < q.length; i++) {
cur = q[i];
if (_urls.is(cur.urls)) {
qi = cur;
break;
}
}
val = _urls.values();
if (qi) {
callback && (qi.load || qi.callbacks.push(callback));
callback && (qi.load && callback());
} else {
q.push({
urls: _urls,
callbacks: callback ? [callback] : [],
load: false
});
for (i = 0; i < val.length; i++) {
node = null, url = val[i];
if (s[url] === undefined) {
(type === 'js' ) && (node = createNode('script', { src: url }));
(type === 'css') && (node = createNode('link', { rel: 'stylesheet', href: url }));
if (node) {
node.onload = (function(type, url) {
return function() {
end(type, url);
};
})(type, url);
(doc.head || doc.body).appendChild(node);
s[url] = false;
}
}
}
}
}
};
return {
js: function(url, callback) {
load('js', url, callback);
},
css: function(url, callback) {
load('css', url, callback);
}
};
})(this.document);
})();
</script><script>
(function() {
var TEXT_VARIABLES = {
version: '2.2.6',
sources: {
font_awesome: 'https://use.fontawesome.com/releases/v5.0.13/css/all.css',
jquery: '/assets/js/jquery.min.js',
leancloud_js_sdk: '//cdn.jsdelivr.net/npm/leancloud-storage@3.13.2/dist/av-min.js',
chart: 'https://cdn.bootcss.com/Chart.js/2.7.2/Chart.bundle.min.js',
gitalk: {
js: 'https://cdn.bootcss.com/gitalk/1.2.2/gitalk.min.js',
css: 'https://cdn.bootcss.com/gitalk/1.2.2/gitalk.min.css'
},
valine: 'https://unpkg.com/valine/dist/Valine.min.js'
},
site: {
toc: {
selectors: 'h1,h2,h3'
}
},
paths: {
search_js: '/assets/search.js'
}
};
window.TEXT_VARIABLES = TEXT_VARIABLES;
})();
</script>
</head>
<body>
<div class="root" data-is-touch="false">
<div class="layout--page js-page-root"><!----><div class="page__main js-page-main page__viewport hide-footer has-aside has-aside cell cell--auto">
<div class="page__main-inner"><div class="page__header d-print-none"><header class="header"><div class="main">
<div class="header__title">
<div class="header__brand"><svg id="svg" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="400" height="478.9473684210526" viewBox="0, 0, 400,478.9473684210526"><g id="svgg"><path id="path0" d="M308.400 56.805 C 306.970 56.966,303.280 57.385,300.200 57.738 C 290.906 58.803,278.299 59.676,269.200 59.887 L 260.600 60.085 259.400 61.171 C 258.010 62.428,256.198 63.600,255.645 63.600 C 255.070 63.600,252.887 65.897,252.598 66.806 C 252.460 67.243,252.206 67.600,252.034 67.600 C 251.397 67.600,247.206 71.509,247.202 72.107 C 247.201 72.275,246.390 73.190,245.400 74.138 C 243.961 75.517,243.598 76.137,243.592 77.231 C 243.579 79.293,241.785 83.966,240.470 85.364 C 239.176 86.740,238.522 88.365,237.991 91.521 C 237.631 93.665,236.114 97.200,235.554 97.200 C 234.938 97.200,232.737 102.354,232.450 104.472 C 232.158 106.625,230.879 109.226,229.535 110.400 C 228.933 110.926,228.171 113.162,226.434 119.500 C 226.178 120.435,225.795 121.200,225.584 121.200 C 225.373 121.200,225.200 121.476,225.200 121.813 C 225.200 122.149,224.885 122.541,224.500 122.683 C 223.606 123.013,223.214 123.593,223.204 124.600 C 223.183 126.555,220.763 132.911,219.410 134.562 C 218.443 135.742,217.876 136.956,217.599 138.440 C 217.041 141.424,215.177 146.434,214.532 146.681 C 214.240 146.794,214.000 147.055,214.000 147.261 C 214.000 147.467,213.550 148.086,213.000 148.636 C 212.450 149.186,212.000 149.893,212.000 150.208 C 212.000 151.386,208.441 154.450,207.597 153.998 C 206.319 153.315,204.913 150.379,204.633 147.811 C 204.365 145.357,202.848 142.147,201.759 141.729 C 200.967 141.425,199.200 137.451,199.200 135.974 C 199.200 134.629,198.435 133.224,196.660 131.311 C 195.363 129.913,194.572 128.123,193.870 125.000 C 193.623 123.900,193.236 122.793,193.010 122.540 C 190.863 120.133,190.147 118.880,188.978 115.481 C 188.100 112.928,187.151 111.003,186.254 109.955 C 185.358 108.908,184.518 107.204,183.847 105.073 C 183.280 103.273,182.497 101.329,182.108 100.753 C 181.719 100.177,180.904 98.997,180.298 98.131 C 179.693 97.265,178.939 95.576,178.624 94.378 C 178.041 92.159,177.125 90.326,175.023 87.168 C 174.375 86.196,173.619 84.539,173.342 83.486 C 172.800 81.429,171.529 79.567,170.131 78.785 C 169.654 78.517,168.697 77.511,168.006 76.549 C 167.316 75.587,166.594 74.800,166.402 74.800 C 166.210 74.800,164.869 73.633,163.421 72.206 C 160.103 68.936,161.107 69.109,146.550 69.301 C 133.437 69.474,128.581 70.162,126.618 72.124 C 126.248 72.495,125.462 72.904,124.872 73.033 C 124.282 73.163,123.088 73.536,122.219 73.863 C 121.349 74.191,119.028 74.638,117.061 74.858 C 113.514 75.254,109.970 76.350,108.782 77.419 C 107.652 78.436,100.146 80.400,97.388 80.400 C 95.775 80.400,93.167 81.360,91.200 82.679 C 90.430 83.195,89.113 83.804,88.274 84.031 C 85.875 84.681,78.799 90.910,74.400 96.243 L 73.400 97.456 73.455 106.028 C 73.526 117.055,74.527 121.238,77.820 124.263 C 78.919 125.273,80.400 127.902,80.400 128.842 C 80.400 129.202,81.075 130.256,81.900 131.186 C 83.563 133.059,85.497 136.346,86.039 138.216 C 86.233 138.886,87.203 140.207,88.196 141.153 C 89.188 142.098,90.000 143.104,90.000 143.388 C 90.000 144.337,92.129 148.594,92.869 149.123 C 93.271 149.410,93.600 149.831,93.600 150.059 C 93.600 150.286,93.932 150.771,94.337 151.136 C 94.743 151.501,95.598 153.004,96.237 154.475 C 96.877 155.947,97.760 157.351,98.200 157.596 C 98.640 157.841,99.900 159.943,101.000 162.267 C 102.207 164.817,103.327 166.644,103.825 166.876 C 104.278 167.087,105.065 168.101,105.573 169.130 C 107.658 173.348,108.097 174.093,110.006 176.647 C 111.103 178.114,112.000 179.725,112.000 180.227 C 112.000 181.048,113.425 183.163,114.678 184.200 C 115.295 184.711,117.396 188.733,117.720 190.022 C 117.855 190.562,118.603 191.633,119.381 192.402 C 120.160 193.171,121.496 195.258,122.351 197.039 C 123.206 198.820,124.167 200.378,124.487 200.501 C 124.807 200.624,125.953 202.496,127.034 204.662 C 128.114 206.828,129.676 209.299,130.505 210.153 C 131.333 211.007,132.124 212.177,132.262 212.753 C 132.618 214.239,134.291 217.048,136.288 219.5
" href="/">YannStatic</a></div><!--<button class="button button--secondary button--circle search-button js-search-toggle"><i class="fas fa-search"></i></button>--><!-- <li><button class="button button--secondary button--circle search-button js-search-toggle"><i class="fas fa-search"></i></button></li> -->
<!-- Champ de recherche -->
<div id="searchbox" class="search search--dark" style="visibility: visible">
<div class="main">
<div class="search__header"></div>
<div class="search-bar">
<div class="search-box js-search-box">
<div class="search-box__icon-search"><i class="fas fa-search"></i></div>
<input id="search-input" type="text" />
<!-- <div class="search-box__icon-clear js-icon-clear">
<a><i class="fas fa-times"></i></a>
</div> -->
</div>
</div>
</div>
</div>
<!-- Script pointing to search-script.js -->
<script>/*!
* Simple-Jekyll-Search
* Copyright 2015-2020, Christian Fei
* Licensed under the MIT License.
*/
(function(){
'use strict'
var _$Templater_7 = {
compile: compile,
setOptions: setOptions
}
const options = {}
options.pattern = /\{(.*?)\}/g
options.template = ''
options.middleware = function () {}
function setOptions (_options) {
options.pattern = _options.pattern || options.pattern
options.template = _options.template || options.template
if (typeof _options.middleware === 'function') {
options.middleware = _options.middleware
}
}
function compile (data) {
return options.template.replace(options.pattern, function (match, prop) {
const value = options.middleware(prop, data[prop], options.template)
if (typeof value !== 'undefined') {
return value
}
return data[prop] || match
})
}
'use strict';
function fuzzysearch (needle, haystack) {
var tlen = haystack.length;
var qlen = needle.length;
if (qlen > tlen) {
return false;
}
if (qlen === tlen) {
return needle === haystack;
}
outer: for (var i = 0, j = 0; i < qlen; i++) {
var nch = needle.charCodeAt(i);
while (j < tlen) {
if (haystack.charCodeAt(j++) === nch) {
continue outer;
}
}
return false;
}
return true;
}
var _$fuzzysearch_1 = fuzzysearch;
'use strict'
/* removed: const _$fuzzysearch_1 = require('fuzzysearch') */;
var _$FuzzySearchStrategy_5 = new FuzzySearchStrategy()
function FuzzySearchStrategy () {
this.matches = function (string, crit) {
return _$fuzzysearch_1(crit.toLowerCase(), string.toLowerCase())
}
}
'use strict'
var _$LiteralSearchStrategy_6 = new LiteralSearchStrategy()
function LiteralSearchStrategy () {
this.matches = function (str, crit) {
if (!str) return false
str = str.trim().toLowerCase()
crit = crit.trim().toLowerCase()
return crit.split(' ').filter(function (word) {
return str.indexOf(word) >= 0
}).length === crit.split(' ').length
}
}
'use strict'
var _$Repository_4 = {
put: put,
clear: clear,
search: search,
setOptions: __setOptions_4
}
/* removed: const _$FuzzySearchStrategy_5 = require('./SearchStrategies/FuzzySearchStrategy') */;
/* removed: const _$LiteralSearchStrategy_6 = require('./SearchStrategies/LiteralSearchStrategy') */;
function NoSort () {
return 0
}
const data = []
let opt = {}
opt.fuzzy = false
opt.limit = 10
opt.searchStrategy = opt.fuzzy ? _$FuzzySearchStrategy_5 : _$LiteralSearchStrategy_6
opt.sort = NoSort
opt.exclude = []
function put (data) {
if (isObject(data)) {
return addObject(data)
}
if (isArray(data)) {
return addArray(data)
}
return undefined
}
function clear () {
data.length = 0
return data
}
function isObject (obj) {
return Boolean(obj) && Object.prototype.toString.call(obj) === '[object Object]'
}
function isArray (obj) {
return Boolean(obj) && Object.prototype.toString.call(obj) === '[object Array]'
}
function addObject (_data) {
data.push(_data)
return data
}
function addArray (_data) {
const added = []
clear()
for (let i = 0, len = _data.length; i < len; i++) {
if (isObject(_data[i])) {
added.push(addObject(_data[i]))
}
}
return added
}
function search (crit) {
if (!crit) {
return []
}
return findMatches(data, crit, opt.searchStrategy, opt).sort(opt.sort)
}
function __setOptions_4 (_opt) {
opt = _opt || {}
opt.fuzzy = _opt.fuzzy || false
opt.limit = _opt.limit || 10
opt.searchStrategy = _opt.fuzzy ? _$FuzzySearchStrategy_5 : _$LiteralSearchStrategy_6
opt.sort = _opt.sort || NoSort
opt.exclude = _opt.exclude || []
}
function findMatches (data, crit, strategy, opt) {
const matches = []
for (let i = 0; i < data.length && matches.length < opt.limit; i++) {
const match = findMatchesInObject(data[i], crit, strategy, opt)
if (match) {
matches.push(match)
}
}
return matches
}
function findMatchesInObject (obj, crit, strategy, opt) {
for (const key in obj) {
if (!isExcluded(obj[key], opt.exclude) && strategy.matches(obj[key], crit)) {
return obj
}
}
}
function isExcluded (term, excludedTerms) {
for (let i = 0, len = excludedTerms.length; i < len; i++) {
const excludedTerm = excludedTerms[i]
if (new RegExp(excludedTerm).test(term)) {
return true
}
}
return false
}
/* globals ActiveXObject:false */
'use strict'
var _$JSONLoader_2 = {
load: load
}
function load (location, callback) {
const xhr = getXHR()
xhr.open('GET', location, true)
xhr.onreadystatechange = createStateChangeListener(xhr, callback)
xhr.send()
}
function createStateChangeListener (xhr, callback) {
return function () {
if (xhr.readyState === 4 && xhr.status === 200) {
try {
callback(null, JSON.parse(xhr.responseText))
} catch (err) {
callback(err, null)
}
}
}
}
function getXHR () {
return window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP')
}
'use strict'
var _$OptionsValidator_3 = function OptionsValidator (params) {
if (!validateParams(params)) {
throw new Error('-- OptionsValidator: required options missing')
}
if (!(this instanceof OptionsValidator)) {
return new OptionsValidator(params)
}
const requiredOptions = params.required
this.getRequiredOptions = function () {
return requiredOptions
}
this.validate = function (parameters) {
const errors = []
requiredOptions.forEach(function (requiredOptionName) {
if (typeof parameters[requiredOptionName] === 'undefined') {
errors.push(requiredOptionName)
}
})
return errors
}
function validateParams (params) {
if (!params) {
return false
}
return typeof params.required !== 'undefined' && params.required instanceof Array
}
}
'use strict'
var _$utils_9 = {
merge: merge,
isJSON: isJSON
}
function merge (defaultParams, mergeParams) {
const mergedOptions = {}
for (const option in defaultParams) {
mergedOptions[option] = defaultParams[option]
if (typeof mergeParams[option] !== 'undefined') {
mergedOptions[option] = mergeParams[option]
}
}
return mergedOptions
}
function isJSON (json) {
try {
if (json instanceof Object && JSON.parse(JSON.stringify(json))) {
return true
}
return false
} catch (err) {
return false
}
}
var _$src_8 = {};
(function (window) {
'use strict'
let options = {
searchInput: null,
resultsContainer: null,
json: [],
success: Function.prototype,
searchResultTemplate: '<li><a href="{url}" title="{desc}">{title}</a></li>',
templateMiddleware: Function.prototype,
sortMiddleware: function () {
return 0
},
noResultsText: 'No results found',
limit: 10,
fuzzy: false,
debounceTime: null,
exclude: []
}
let debounceTimerHandle
const debounce = function (func, delayMillis) {
if (delayMillis) {
clearTimeout(debounceTimerHandle)
debounceTimerHandle = setTimeout(func, delayMillis)
} else {
func.call()
}
}
const requiredOptions = ['searchInput', 'resultsContainer', 'json']
/* removed: const _$Templater_7 = require('./Templater') */;
/* removed: const _$Repository_4 = require('./Repository') */;
/* removed: const _$JSONLoader_2 = require('./JSONLoader') */;
const optionsValidator = _$OptionsValidator_3({
required: requiredOptions
})
/* removed: const _$utils_9 = require('./utils') */;
window.SimpleJekyllSearch = function (_options) {
const errors = optionsValidator.validate(_options)
if (errors.length > 0) {
throwError('You must specify the following required options: ' + requiredOptions)
}
options = _$utils_9.merge(options, _options)
_$Templater_7.setOptions({
template: options.searchResultTemplate,
middleware: options.templateMiddleware
})
_$Repository_4.setOptions({
fuzzy: options.fuzzy,
limit: options.limit,
sort: options.sortMiddleware,
exclude: options.exclude
})
if (_$utils_9.isJSON(options.json)) {
initWithJSON(options.json)
} else {
initWithURL(options.json)
}
const rv = {
search: search
}
typeof options.success === 'function' && options.success.call(rv)
return rv
}
function initWithJSON (json) {
_$Repository_4.put(json)
registerInput()
}
function initWithURL (url) {
_$JSONLoader_2.load(url, function (err, json) {
if (err) {
throwError('failed to get JSON (' + url + ')')
}
initWithJSON(json)
})
}
function emptyResultsContainer () {
options.resultsContainer.innerHTML = ''
}
function appendToResultsContainer (text) {
options.resultsContainer.innerHTML += text
}
function registerInput () {
options.searchInput.addEventListener('input', function (e) {
if (isWhitelistedKey(e.which)) {
emptyResultsContainer()
debounce(function () { search(e.target.value) }, options.debounceTime)
}
})
}
function search (query) {
if (isValidQuery(query)) {
emptyResultsContainer()
render(_$Repository_4.search(query), query)
}
}
function render (results, query) {
const len = results.length
if (len === 0) {
return appendToResultsContainer(options.noResultsText)
}
for (let i = 0; i < len; i++) {
results[i].query = query
appendToResultsContainer(_$Templater_7.compile(results[i]))
}
}
function isValidQuery (query) {
return query && query.length > 0
}
function isWhitelistedKey (key) {
return [13, 16, 20, 37, 38, 39, 40, 91].indexOf(key) === -1
}
function throwError (message) {
throw new Error('SimpleJekyllSearch --- ' + message)
}
})(window)
}());
</script>
<!-- Configuration -->
<script>
SimpleJekyllSearch({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
json: '/search.json',
//searchResultTemplate: '<li><a href="https://static.rnmkcy.eu{url}">{date}&nbsp;{title}</a></li>'
searchResultTemplate: '<li><a href="{url}">{date}&nbsp;{title}</a></li>'
})
</script>
<!-- Fin déclaration champ de recherche --></div><nav class="navigation">
2024-11-28 11:42:23 +01:00
<ul><li class="navigation__item"><a href="/archive.html">Etiquettes</a></li><li class="navigation__item"><a href="/htmldoc.html">Documents</a></li><li class="navigation__item"><a href="/liens_ttrss.html">Liens</a></li><li class="navigation__item"><a href="/syntaxe-markdown.html">Aide</a></li></ul>
2024-10-31 20:18:37 +01:00
</nav></div>
</header>
</div><div class="page__content"><div class ="main"><div class="grid grid--reverse">
<div class="col-main cell cell--auto"><!-- start custom main top snippet --><div id="results-container" class="search-result js-search-result"></div><!-- end custom main top snippet -->
<article itemscope itemtype="http://schema.org/Article"><div class="article__header"><header><h1 style="color:Tomato;">PC1 Ordinateur Bureau ArchLinux xfce (NEW)</h1></header></div><meta itemprop="headline" content="PC1 Ordinateur Bureau ArchLinux xfce (NEW)"><div class="article__info clearfix"><ul class="left-col menu"><li>
2024-11-08 14:10:33 +01:00
<a class="button button--secondary button--pill button--sm" style="color:#00FFFF" href="/archive.html?tag=archlinux">archlinux</a>
2024-10-31 20:18:37 +01:00
</li></ul><ul class="right-col menu"><li>
<i class="far fa-calendar-alt"></i>&nbsp;<span title="Création" style="color:#FF00FF">25&nbsp;nov.&nbsp;&nbsp;2020</span>
<span title="Modification" style="color:#00FF7F">&nbsp;3&nbsp;mars&nbsp;&nbsp;2021</span></li></ul></div><meta itemprop="datePublished" content="2021-03-03T00:00:00+01:00">
<meta itemprop="keywords" content="archlinux"><div class="js-article-content">
<div class="layout--article"><!-- start custom article top snippet -->
<style>
#myBtn {
display: none;
position: fixed;
bottom: 10px;
right: 10px;
z-index: 99;
font-size: 12px;
font-weight: bold;
border: none;
outline: none;
background-color: white;
color: black;
cursor: pointer;
padding: 5px;
border-radius: 4px;
}
#myBtn:hover {
background-color: #555;
}
</style>
<button onclick="topFunction()" id="myBtn" title="Haut de page">&#8679;</button>
<script>
//Get the button
var mybutton = document.getElementById("myBtn");
// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
<!-- end custom article top snippet -->
<div class="article__content" itemprop="articleBody"><details>
<summary><b>Afficher/cacher Sommaire</b></summary>
<!-- affichage sommaire -->
<div class="toc-aside js-toc-root"></div>
</details><h1 id="ordinateur-pc1">Ordinateur PC1</h1>
<h2 id="matériel">Matériel</h2>
<h3 id="carte-mère-asus-h110m-am2">Carte mère ASUS H110M-A/M.2</h3>
<p><img src="/images/H110-MA.png" alt="" width="150" /></p>
<p><a href="/files/F11483_H110M-A_M_2_UM_WEB.pdf">Carte mère ASUS H110M-A/M.2</a></p>
<p><strong>CPU</strong></p>
<ul>
<li>Intel® Socket 1151 for 7th/6th Generation Core™ i7/Core™ i5/Core™ i3/Pentium®/Celeron® Processors</li>
<li>Supports Intel® 14 nm CPU</li>
<li>Supports Intel® Turbo Boost Technology 2.0
<ul>
<li>The Intel® Turbo Boost Technology 2.0 support depends on the CPU types.</li>
<li>Refer to <a href="http://www.asus.com/">www.asus.com</a> for CPU support list</li>
</ul>
</li>
<li>Chipset</li>
<li>Intel® H110</li>
</ul>
<p><strong>Réseau</strong></p>
<ul>
<li>Contrôleur Gigabit Intel 1219v compatible avec LANGuard</li>
</ul>
<p><strong>Memory</strong></p>
<ul>
<li>2 x DIMM, Max. 32GB, DDR4 2400/2133 MHz Non-ECC, Un-buffered Memory</li>
<li>Supports Intel® Extreme Memory Profile (XMP)
<ul>
<li>Hyper DIMM support is subject to the physical characteristics of individual CPUs.</li>
<li>Refer to www.asus.com for the Memory QVL (Qualified Vendors Lists).</li>
<li>Due to Intel® chipset limitation, DDR4 2400MHz memory frequency is only supported by 7th Generation Intel® processors. Higher memory modules will run at the maximum transfer rate of DDR4 2400MHz.</li>
<li>Due to Intel® chipset limitation, DDR4 2133MHz and higher memory modules on 6th Generation Intel® processors will run at the maximum transfer rate of DDR4 2133MHz.</li>
</ul>
</li>
</ul>
<p><strong>Graphic</strong></p>
<ul>
<li>Integrated Graphics Processor- Intel® HD Graphics support</li>
<li>Multi-VGA output support : HDMI/DVI-D/RGB ports
<ul>
<li>Supports HDMI with max. resolution 4096 x 2160 @ 24 Hz / 2560 x 1600 @ 60 Hz</li>
<li>Supports DVI-D with max. resolution 1920 x 1200 @ 60 Hz</li>
<li>Supports RGB with max. resolution 1920 x 1200 @ 60 Hz</li>
</ul>
</li>
<li>Maximum shared memory of 1024 MB</li>
<li>Supports up to 2 displays simultaneously</li>
</ul>
<p><strong>Expansion Slots</strong></p>
<ul>
<li>1 x PCIe 3.0/2.0 x16 (x16 mode)</li>
<li>2 x PCIe 2.0 x1</li>
</ul>
<p><strong>Storage</strong></p>
<ul>
<li>Intel® H110 chipset :</li>
<li>1 x M.2 Socket 3, with M key, type 2242/2260/2280 storage devices support (both SATA &amp; PCIE mode)*2</li>
<li>4 x SATA 6Gb/s port(s),</li>
<li>Intel® Rapid Storage Technology supports*1</li>
<li>LAN</li>
<li>Intel® I219V</li>
</ul>
<p><strong>Audio</strong></p>
<ul>
<li>Realtek® ALC887 8-Channel High Definition Audio CODEC *2
<ul>
<li>Supports : Jack-detection, Front Panel Jack-retasking</li>
</ul>
<p><strong>Audio Feature :</strong></p>
<ul>
<li>LED-illuminated design - Brighten up your build with the gorgeous illuminated audio trace path.</li>
<li>Audio Shielding: Ensures precision analog/digital separation and greatly reduced multi-lateral interference</li>
<li>Dedicated audio PCB layers: Separate layers for left and right channels to guard the quality of the sensitive audio signals</li>
<li>Premium Japanese audio capacitors: Provide warm, natural and immersive sound with exceptional clarity and fidelity</li>
</ul>
</li>
</ul>
<p><strong>USB Ports</strong></p>
<ul>
<li>Intel® H110 chipset :</li>
<li>4 x USB 3.1 Gen 1 port(s) (2 at back panel, blue, 2 at mid-board)</li>
<li>Intel® H110 chipset :</li>
<li>6 x USB 2.0/1.1 port(s) (4 at back panel, black, 2 at mid-board)</li>
</ul>
<p><strong>Special Features</strong></p>
<ul>
<li>ASUS 5X Protection II :
<ul>
<li>ASUS LANGuard - 2.5X higher surge tolerance</li>
<li>ASUS DIGI+ VRM - 5 Phase digital power design</li>
<li>ASUS DRAM Overcurrent Protection - Prevents damage from short circuits</li>
<li>ASUS Stainless-Steel Back I/O - 3X corrosion-resistance for greater durability</li>
<li>ASUS ESD Guards - Electrostatic discharge protection</li>
</ul>
</li>
<li>ASUS EPU :
<ul>
<li>EPU</li>
</ul>
</li>
<li>ASUS Exclusive Features :
<ul>
<li>AI Suite 3</li>
<li>Ai Charger</li>
<li>Low EMI Solution</li>
<li>USB 3.0 Boost</li>
<li>Mobo Connect</li>
<li>PC Cleaner</li>
</ul>
</li>
<li>ASUS Quiet Thermal Solution :
<ul>
<li>Stylish Fanless Design Heat-sink solution</li>
<li>ASUS Fan Xpert</li>
</ul>
</li>
<li>ASUS EZ DIY :
<ul>
<li>ASUS CrashFree BIOS 3</li>
<li>ASUS EZ Flash 3</li>
<li>ASUS UEFI BIOS EZ Mode</li>
<li>Push Notice</li>
</ul>
</li>
<li>ASUS Q-Design :
<ul>
<li>ASUS Q-Slot</li>
<li>ASUS Q-DIMM</li>
</ul>
</li>
</ul>
<p><strong>Back I/O Ports</strong></p>
<ul>
<li>1 x PS/2 keyboard (purple)</li>
<li>1 x PS/2 mouse (green)</li>
<li>1 x DVI-D</li>
<li>1 x D-Sub</li>
<li>1 x HDMI</li>
<li>1 x LAN (RJ45) port(s)</li>
<li>2 x USB 3.1 Gen 1 (blue)</li>
<li>4 x USB 2.0</li>
<li>3 x Audio jack(s)</li>
</ul>
<p><strong>Internal I/O Ports</strong></p>
<ul>
<li>1 x USB 3.1 Gen 1 connector(s) support(s) additional 2 USB 3.1 Gen 1 port(s)</li>
<li>1 x USB 2.0 connector(s) support(s) additional 2 USB 2.0 port(s)</li>
<li>1 x M.2 Socket 3</li>
<li>1 x COM port(s) connector(s)</li>
<li>4 x SATA 6Gb/s connector(s)</li>
<li>1 x CPU Fan connector(s) (1 x 4 -pin)</li>
<li>1 x Chassis Fan connector(s) (1 x 4 -pin)</li>
<li>1 x S/PDIF out header(s)</li>
<li>1 x 24-pin EATX Power connector(s)</li>
<li>1 x 4-pin ATX 12V Power connector(s)</li>
<li>1 x Front panel audio connector(s) (AAFP)</li>
<li>1 x Clear CMOS jumper(s)</li>
<li>1 x System panel connector</li>
</ul>
<p><strong>Accessories</strong></p>
<ul>
<li>Users manual</li>
<li>I/O Shield</li>
<li>2 x SATA 3Gb/s cable(s)</li>
<li>1 x M.2 Screw Package</li>
<li>1 x Supporting DVD</li>
</ul>
<p><strong>Manageability</strong></p>
<ul>
<li>WfM 2.0, DMI 3.0, WOL by PME, PXE</li>
</ul>
<p><strong>Form Factor</strong></p>
<ul>
<li>mATX Form Factor</li>
<li>8.9 inch x 7.3 inch ( 22.6 cm x 18.5 cm )</li>
</ul>
<p><strong>BIOS</strong></p>
<ul>
<li>128 Mb Flash ROM, UEFI AMI BIOS, PnP, DMI 3.0, WfM2.0, SM BIOS 3.0, ACPI 5.0, Multi-language BIOS, ASUS EZ Flash 3, ASUS CrashFree BIOS 3, My Favorites, Quick Note, Last Modified Log, F12 PrintScreen function, and ASUS DRAM SPD (Serial Presence Detect) memory information</li>
</ul>
<p>Mise à jour du bios</p>
<ul>
<li><a href="/files/E12583_BIOS_Update_EM_V3_WEB_20170614.pdf">Update BIOS ASUS H110M-A/M.2</a></li>
<li><a href="https://www.asus.com/fr/Motherboards/H110M-A-M-2/HelpDesk_Download/">BIOS H110M-A-M-2 (download)</a>
<ul>
<li><strong>Version 3408 2017/07/21</strong> Mise à jour BIOS effectuée le 13/10/2017</li>
<li><strong>Version 4202 2019/03/15</strong> Mise à jour BIOS effectuée le</li>
</ul>
</li>
</ul>
<p>Après mise à jour du BIOS , il faut activer <strong>Intel Virtualization Technology</strong></p>
<ol>
<li>Accès au BIOS (F2)</li>
<li>Advanced Mode (F7)
<ul>
<li>Onglet <em>Advanced</em></li>
<li>Faire défiler le champ <em>Cpu configuration</em> jusquau paramètre <strong>Intel Virtualization Technology</strong></li>
<li>Activer <strong>Intel Virtualization Technology Enabled</strong></li>
<li>Onglet <em>Exit</em></li>
</ul>
</li>
<li><strong>Save changes &amp; reset</strong></li>
</ol>
<h3 id="processeur-refroidisseur-mémoire-alimentation">Processeur Refroidisseur Mémoire Alimentation</h3>
<p><strong>Intel Core i3-6100 (3.7 GHz)</strong> <br />
Processeur Dual Core Socket 1151 Cache L3 3 Mo Intel HD Graphics 530 0.014 micron (version boîte - garantie Intel 3 ans) <br />
<img src="/images/intel-core-i3.png" alt="" width="10%" /></p>
<p><strong>CPU UPGRADE</strong> <a href="http://www.cpu-upgrade.com/mb-ASUS/H110M-A_M.2.html">ASUS H110M-A/M.2 processor support and specifications</a> (<em>list des CPU compatibles avec la carte mère</em>)</p>
<p><strong>Processeur <a href="http://www.cpu-upgrade.com/CPUs/Intel/Core_i5/i5-7500.html">Intel Core i5-7500 CPU</a> mis en place le 20/02/2020</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>General specs
Microarchitecture: Kaby Lake
Core Name: Kaby Lake-S
Manufacturing Process: 0.014 micron
Socket Type: Socket 1151
The Number of Cores: 4
The Number of Threads: 4
Multiprocessing: Not supported
Frequency: 3.4 GHz
Maximum Turbo Frequency: 3.8 GHz
L1 Cache: 128 KB (code)
128 KB (data)
L2 Cache: 1 MB
L3 Cache: 6 MB
Thermal Design Power: 65 Watt
Integrated GPU: Intel HD 630
Supported memory: DDR3L-1333 / DDR3L-1600 / DDR4-2133 / DDR4-2400
Instructions and Technologies
Execute Disable Bit? Yes
64-bit Support? Yes
Hyper-Threading technology? No
Turbo Boost? Yes
Virtualization? Yes
Enhanced SpeedStep? Yes
Instruction Set Extensions: AES
AVX
AVX2
F16C
FMA3
MMX
SSE
SSE2
SSE3
SSE4
Supplemental SSE3
</code></pre></div></div>
<p><strong>Cooler Master Hyper TX3i</strong> <br />
Ventilateur pour processeur (pour socket Intel 775 / 1150 / 1151 / 1155 / 1156) <br />
<img src="/images/CoolerMasterHyperTX3i.png" alt="" width="10%" /></p>
<p><strong>Kingston ValueRAM 16 Go DDR4 2133 MHz CL15 DR X8</strong> <br />
RAM DDR4 PC4-17000 - KVR21N15D8/16 (garantie 10 ans par Kingston) <br />
<img src="/images/ram-ddr4.png" alt="" width="10%" /></p>
<p><strong>Zalman ZM500-GV 80PLUS Bronze</strong> <br />
Alimentation 500W ATX 12V v2.3 80PLUS Bronze <br />
<img src="/images/zalman-zm500.png" alt="" width="20%" /></p>
<p><strong>Western Digital Red 4 To SATA 3”5 6Gb/s</strong><br />
<img src="/images/wd40efrx.png" alt="" width="10%" /><br />
<em>Spécifiquement conçus pour les systèmes NAS de 1 à 8 baies, les disques durs Western Digital Red sont faits pour tourner 24h/24 et 7j/7, et destinés aux particuliers et aux petites structures de travail. Ces disques durs au format 3.5” sont construits autour de 64 à 256 Mo de cache sur un bus SATA III. Leur compatibilité est assurée avec la plupart des serveurs NAS de grandes marques .</em></p>
<p><strong>Western Digital Caviar GP WD5000AACS 500GB 5400 to 7200 RPM 16MB Cache SATA 3.0Gb/s 3.5” Internal Hard Drive Bare Drive 3”5</strong><br />
<img src="/images/sata3p5.png" alt="" width="10%" /></p>
<p><strong>Crucial SSD C300-CTFDDAC064M 64Go</strong><br />
<strong>Crucial SSD CT512MX1 512Go</strong><br />
<img src="/images/crucial-ssd.png" alt="" width="10%" /></p>
<h2 id="archlinux">ArchLinux</h2>
<p><img src="/images/48px-Archlinux_logo.svg.png" alt="" /></p>
<p>Boot sur clé USB en UEFI contenant image ISO archlinux (format <strong>aaaa.mm.jj-dual.iso</strong>)</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>loadkeys fr # en est en qwerty , il faut saisir 'loqdkeys'
</code></pre></div></div>
<h3 id="partitionnement-du-disque">Partitionnement du disque</h3>
<p>Partitionnement du disque SSD 120G GPT + LVM</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>gdisk /dev/sda
</code></pre></div></div>
<p>On passe en mode expert : x<br />
On efface tout : z</p>
<p>Après partitionnement</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>gdisk -l /dev/sda
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>GPT fdisk (gdisk) version 1.0.5
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 234441648 sectors, 111.8 GiB
Model: CT120BX300SSD1
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): 2E7D3E67-A473-499C-9193-414E47C07873
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 234441614
Partitions will be aligned on 2048-sector boundaries
Total free space is 2925 sectors (1.4 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 1050623 512.0 MiB EF00 efi
2 1050624 1638399 287.0 MiB 8300 boot
3 1638400 234440703 111.0 GiB 8300 lvm-partition
</code></pre></div></div>
<p>Les partitions logiques lvm</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> roota ct120bx -wi-ao---- 40,00g
home vg-nas-one -wi-ao---- 100,00g
</code></pre></div></div>
<p>On utilise le volume physique vg-nas-one pour le home</p>
<h3 id="système-de-fichiers">Système de fichiers</h3>
<p>Type de fichier <strong>ext4</strong> pour les autres partitions</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
mkfs.ext4 /dev/ct120bx/roota
mkfs.ext4 /dev/vg-nas-one/home
</code></pre></div></div>
<h3 id="archlinux-installation-de-base">Archlinux ,installation de base</h3>
<p>Points de montage</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mount /dev/ct120bx/roota /mnt
<span class="nb">mkdir</span> /mnt/home
mount /dev/vg-nas-one/home /mnt/home
<span class="nb">mkdir</span> <span class="nt">-p</span> /mnt/boot/efi
mount /dev/sda2 /mnt/boot
mount /dev/sda1 /mnt/boot/efi
</code></pre></div></div>
<p>create: 2020-11-25
modifier le fichier <strong>/etc/pacman.d/mirrorlist</strong> pour ne garder quun seul miroir (facultatif)<br />
passer la commande suivante avant la première ligne pacstrap :</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>export LANG=C
</code></pre></div></div>
<p>installation</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pacstrap /mnt base base-devel linux linux-firmware nano dhcpcd lvm2
</code></pre></div></div>
<p>NOTE : Il est possible de se connecter en ssh pour la suite de linstallation:</p>
<ul>
<li>Modifier le mot de passe root : <code class="language-plaintext highlighter-rouge">passwd</code></li>
<li>Relever ladresse IP :<code class="language-plaintext highlighter-rouge">ip addr</code></li>
<li>Lancer sshd : <code class="language-plaintext highlighter-rouge">systemctl start sshd.socket</code></li>
<li>Depuis le poste distant : <code class="language-plaintext highlighter-rouge">ssh root@adresseIP</code></li>
</ul>
<p>générer le fichier <strong>/etc/fstab</strong> qui liste les partitions présentes avec les UUID des partitions</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>genfstab -U -p /mnt &gt;&gt; /mnt/etc/fstab
</code></pre></div></div>
<p>Passage en chroot</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>arch-chroot /mnt
</code></pre></div></div>
<p>Fuseau horaire Europe/Paris</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>timedatectl set-timezone Europe/Paris
</code></pre></div></div>
<p>Activer la synchronisation ntp</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>timedatectl set-ntp true
timedatectl
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> Local time: jeu. 2020-12-17 11:09:44 CET
Universal time: jeu. 2020-12-17 10:09:44 UTC
RTC time: jeu. 2020-12-17 10:09:44
Time zone: Europe/Paris (CET, +0100)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
</code></pre></div></div>
<p>Clavier en mode texte, créer le fichier /etc/vconsole.conf.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>echo "KEYMAP=fr" &gt; /etc/vconsole.conf
</code></pre></div></div>
<p>localisation française, le fichier /etc/locale.conf doit contenir la bonne valeur pour LANG</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>nano /etc/locale.conf
</code></pre></div></div>
<p>Ajouter</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>LANG=fr_FR.UTF-8
LC_COLLATE=C
</code></pre></div></div>
<p>Il faut supprimer le <strong>#</strong> au début de la ligne fr_FR.UTF-8 UTF-8 dans le fichier <strong>/etc/locale.gen</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>nano /etc/locale.gen
</code></pre></div></div>
<p>puis exécuter:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>locale-gen
</code></pre></div></div>
<p>spécifier la locale pour la session courante</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>export LANG=fr_FR.UTF-8
</code></pre></div></div>
<p>on a une machine en mono-démarrage sur Archlinux, et on peut demander à ce que lheure appliquée soit UTC</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>hwclock --systohc --utc
</code></pre></div></div>
<p>create: 2020-11-25
modifier le fichier <em>/etc/mkinitcpio.conf</em></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>nano /etc/mkinitcpio.conf
</code></pre></div></div>
<p>ajouter <code class="language-plaintext highlighter-rouge">lvm2</code> entre <code class="language-plaintext highlighter-rouge">block</code> et <code class="language-plaintext highlighter-rouge">filesystems</code> dans les <strong>HOOKS</strong><br />
puis exécuter <strong>mkinitcpio</strong> qui est un script shell utilisé pour créer un environnement qui se chargé en premier en mémoire :</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mkinitcpio -p linux # linux-lts si vous voulez le noyau lts
</code></pre></div></div>
<p>nom de la machine /etc/hostname</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>echo "archyan" &gt; /etc/hostname
</code></pre></div></div>
<p>Créer fichier hosts</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>nano /etc/hosts
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>127.0.0.1 localhost
::1 localhost
127.0.1.1 archyan
</code></pre></div></div>
<p>mot de passe root</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>passwd root
</code></pre></div></div>
<p>Assurez-vous que vous utilisez toujours de la racine darche. Installez les paquets nécessaires :</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pacman -S grub efibootmgr
</code></pre></div></div>
<p>Créez le répertoire si inexistant où la partition EFI sera montée :</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mkdir -p /boot/efi
</code></pre></div></div>
<p>Maintenant, vérifiez ou montez la partition ESP</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mount /dev/sda1 /boot/efi
</code></pre></div></div>
<p>Installez grub comme ceci :</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
</code></pre></div></div>
<p>Un dernier pas :</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>grub-mkconfig -o /boot/grub/grub.cfg
</code></pre></div></div>
<p>Créer un utilisateur yann avec la commande suivante</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>useradd -m -g users -G power,storage,wheel -s /bin/bash yann
passwd yannick
</code></pre></div></div>
<p>Modifier sudoers pour accès sudo sans mot de passe à lutilisateur</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>echo "yann ALL=(ALL) NOPASSWD: ALL" &gt;&gt; /etc/sudoers
</code></pre></div></div>
<p>On peut maintenant quitter tout, démonter proprement les partitions et redémarrer.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>exit
umount -R /mnt
reboot # Redémarrage
# oter la clé USB
</code></pre></div></div>
<p>On se connecte en utilisateur</p>
<h3 id="openssh">Openssh</h3>
<p><img src="/images/ssh_logo1.png" alt="" /></p>
<p>Installation et lancement</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pacman -S openssh
</code></pre></div></div>
<p>Validation</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>systemctl enable sshd.socket
</code></pre></div></div>
<p>Lancement SSH</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>systemctl start sshd.socket
</code></pre></div></div>
<p>On peut se connecter en utilisateur dun autre poste</p>
<h3 id="outils-et-applications">Outils et applications</h3>
<p>On commence par tout ce qui est graphique : gimp, cups (gestion de limprimante) et hplip (si vous avez une imprimante scanner Hewlett Packard). Le paquet python-pyqt5 est indispensable pour linterface graphique de HPLIP. Webkigtk2 étant indispensable pour la lecture de laide en ligne de Gimp. outil rsync, Retext éditeur markdown, firefox fr, thunderbird, libreoffice, gdisk</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S cups system-config-printer gimp hplip rsync firefox-i18n-fr git libreoffice-fresh-fr thunderbird-i18n-fr wget jq figlet bind-tools
</code></pre></div></div>
<p>installer Yay (écrit en go) pour compléter Pacman</p>
<p>Yay :</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git clone https://aur.archlinux.org/yay
cd yay
makepkg -sri
cd ..
sudo rm -r yay
</code></pre></div></div>
<p>On supprime la dépendance Go !!!)<br />
Yay (Utiliser la version précompilée, il faut au minimun <strong>yay</strong> déjà installé) :</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>yay -S yay-bin
</code></pre></div></div>
<p>Cette version précompilée de yay est beaucoup plus rapide à installer et à maintenir (il supprime linstallation de yay précédente)…</p>
<h3 id="historique-de-la-ligne-de-commande">Historique de la ligne de commande</h3>
<p>Ajoutez la recherche dhistorique de la ligne de commande au terminal.<br />
Tapez un début de commande précédent, puis utilisez shift + up (flèche haut) pour rechercher lhistorique filtré avec le début de la commande.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo -s
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># Global, tout utilisateur
echo '"\e[1;2A": history-search-backward' | sudo tee -a /etc/inputrc
echo '"\e[1;2B": history-search-forward' | sudo tee -a /etc/inputrc
exit
</code></pre></div></div>
<h3 id="fix-invalid-or-corrupted-package-pgp-signature-error-in-arch-linux">Fix “invalid or corrupted package (PGP signature)” Error In Arch Linux</h3>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S archlinux-keyring
</code></pre></div></div>
<h3 id="xorg">Xorg</h3>
<p><img src="/images/X.Org_Logo.svg" alt="" width="100" /></p>
<p>Toutes les commandes en mode su (sudo -s)</p>
<p>Installation de Xorg.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S xorg
</code></pre></div></div>
<h2 id="xfce">XFCE</h2>
<p><img src="/images/Xfce_logo.png" alt="" width="100" /></p>
<p>Installation</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S xfce4 xfce4-goodies
</code></pre></div></div>
<p>Valider tout par défaut</p>
<p>Thèmes et icônes</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>yay -S matcha-gtk-theme numix-circle-icon-theme-git numix-gtk-theme-git zuki-themes
</code></pre></div></div>
<p><strong>Liens sur les autres unités</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo ln -s /srv/hdd2g/data/BiblioCalibre $HOME/media/BiblioCalibre
sudo ln -s /srv/hdd2g/data/CalibreTechnique $HOME/media/CalibreTechnique
sudo ln -s /srv/hdd2g/data/devel $HOME/media/devel
sudo ln -s /srv/hdd2g/data/dplus $HOME/media/dplus
sudo ln -s /srv/hdd2g/data/music $HOME/media/music
sudo ln -s /srv/hdd2g $HOME/srv_hdd2g
sudo ln -s /srv/virtuel $HOME/virtuel
</code></pre></div></div>
<p>Gérer des périphériques utilisant MTP (tablettes sous android par exemple), il vous faut rajouter les deux paquets gvfs-mtp et mtpfs (<strong>facultatif</strong>) : <code class="language-plaintext highlighter-rouge">sudo pacman -S gvfs-{afc,goa,google,gphoto2,mtp,nfs,smb}</code></p>
<p><strong>Installer suite Xfce</strong> avec vlc (vidéo), pulseaudio, etc…</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S gvfs mtpfs vlc xarchiver galculator evince ffmpegthumbnailer xscreensaver pavucontrol pulseaudio pulseaudio-alsa
sudo pacman -S gedit keepassxc terminator filezilla nmap minicom zenity tmux
yay -S menulibre
</code></pre></div></div>
<blockquote>
<p>ATTENTION : NE PAS INSTALLER le paquet <strong>xfce4-screensaver</strong> , pour vérifier si présent <code class="language-plaintext highlighter-rouge">pacman -Q xfce4-screensaver</code> et <code class="language-plaintext highlighter-rouge">sudo pacman -R xfce4-screensaver</code> pour léliminer</p>
</blockquote>
<h3 id="lightdm">lightdm</h3>
<p>Installation <strong>lightdm</strong> et du gestionnaire graphique</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S lightdm-gtk-greeter-settings # Installation de lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings
</code></pre></div></div>
<p>Pour avoir le bon agencement clavier dès la saisie du premier caractère du mot de passe, il faut entrer la commande suivant avant de lancer pour la première fois lightdm :</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo localectl set-x11-keymap fr
</code></pre></div></div>
<p>Pour lancer Xfce, il faut entrer dans un premier temps :</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo systemctl start lightdm # A saisir sur l'ordinateur ,pas sur la console SSH
</code></pre></div></div>
<p>Sélectionner lutilisateur et saisir son mot de passe, et si tout se passe bien, on peut valider :</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo systemctl enable lightdm
</code></pre></div></div>
<p>Dans le cas dune configuration multi écran, il faut sélectionnner un écran sur lequel saffichera la fenêtre de “login”<br />
Ouvrir le fichier <code class="language-plaintext highlighter-rouge">/etc/lightdm/lightdm-gtk-greeter.conf</code> et ajouter <code class="language-plaintext highlighter-rouge">active-monitor=0</code> sous <code class="language-plaintext highlighter-rouge">[greeter]</code></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[greeter]
active-monitor=0
</code></pre></div></div>
<h3 id="personnaliser-xfce">Personnaliser XFCE</h3>
<p>Au choix :</p>
<ul>
<li>Icônes “faenza” et thème “numix” : <code class="language-plaintext highlighter-rouge">sudo pacman -S faenza-icon-theme numix-gtk-theme</code></li>
<li>Icônes et thème “numix” : <code class="language-plaintext highlighter-rouge">yay -S numix-gtk-theme-git numix-circle-icon-theme-git zuki-themes</code></li>
<li>Icônes et thème “matcha” : <code class="language-plaintext highlighter-rouge">yay -S matcha-gtk-theme</code></li>
</ul>
<p>Modification du <strong>tableau de bord</strong> , clic-droit → Tableau de bord → Préférences de tableau de bord<br />
Tableau de bord 1</p>
<ul>
<li>Onglet <em>Eléments</em>
<ul>
<li>Ajouter des éléments (+) &gt; <strong>Menu whisker</strong> (icône <em>yannick-green.png</em>) ,<strong>Mise à jour météo</strong> ,<strong>Greffon PulseAudio</strong> ,<strong>Afficher le bureau</strong>, <strong>Captures décran</strong></li>
<li>Supprimer Menu des applications</li>
<li><strong>Horloge</strong> Affichage date et heure, <em>format personnalisé</em> : %e %b %Y %R</li>
<li><strong>Changeur despace de travail</strong> ,<em>Paramètres des espaces de travail</em> à 2 , décocher <em>Changer despace…</em></li>
<li><strong>Boutons daction</strong> idem dans apparence , actions <code class="language-plaintext highlighter-rouge">Déconnexion</code></li>
</ul>
</li>
<li>Onglet <em>Affichage</em>
<ul>
<li>Verrouiller tableau de bord</li>
<li>Masquer automatiquement le tableau de bord <strong>Jamais</strong></li>
<li>Taille dune ligne (pixels) <strong>25</strong></li>
</ul>
</li>
</ul>
<p>Choix <em>Icônes et thème “numix”</em></p>
<p><a href="https://github.com/NicoHood/NicoHood.github.io/wiki/Xfce4-Desktop-Environment-Customization">Xfce4 Desktop Environment Customization</a></p>
<p>Menu → Paramètres → Gestionnaire dalimentation</p>
<p><img src="/images/ga1.png" alt="image" width="300px" /> <img src="/images/ga2.png" alt="image" width="300px" /></p>
<p><img src="/images/ga3.png" alt="image" width="300px" /></p>
<p>Menu → Paramètres → Affichage , Double écran , Sharp à gauche de Essential</p>
<p><img src="/images/double-ecran.png" alt="image" width="300px" /></p>
<p>Menu → Paramètres → Apparence</p>
<p><img src="/images/xfce-apparence1.png" alt="" width="300px" /><br />
<img src="/images/xfce-apparence2.png" alt="" width="300px" /><br />
<img src="/images/xfce-apparence3.png" alt="" width="300px" /></p>
<p>Menu Paramètres → Gestionnaire de fenêtres</p>
<p><img src="/images/xfce-fenetres1.png" alt="" width="300px" /></p>
<p>Après validation tableau de bord, clic droit sur icône capture écran puis Propriétés -&gt; Zone à capturer : Sélectionner une zone</p>
<p><img src="/images/xfce-tableau-bord1.png" alt="image" width="300px" /></p>
<p>Tableau de bord 2<br />
Pour le déplacer le <em>Tableau de bord 2</em> vers écran Essential <strong>1.___72</strong> , décocher <em>Verrouiller tableau de bord</em></p>
<ul>
<li>Onglet <em>Affichage</em>
<ul>
<li>Verrouiller tableau de bord</li>
<li>Masquer automatiquement le tableau de bord <strong>Toujours</strong></li>
<li>Taille dune ligne (pixels) <strong>40</strong></li>
</ul>
</li>
<li>Onglet <em>Eléments</em> tableau de bord 2
<ul>
<li>Emulateur de Terminal : /usr/bin/terminator , icône <em>terminator</em></li>
</ul>
</li>
</ul>
<p><img src="/images/xfce-tableau-bord2.png" alt="image" width="300px" /></p>
<p>Menu → Paramètres → Applications favorites</p>
<ul>
<li>Utilitaires -&gt; Emulateur de terminal : <strong>/usr/bin/terminator “%s”</strong></li>
</ul>
<p>Menu Paramètres &gt; Bureau</p>
<ul>
<li>Fonds décran image <strong>/usr/share/backgrounds/</strong></li>
<li>Onglet <em>Icônes</em>
<ul>
<li>Tout décocher dans <strong>Icônes par défaut</strong></li>
</ul>
</li>
</ul>
<h3 id="son">Son</h3>
<p>Lancement</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pulseaudio --start
sudo usermod -aG audio $USER
</code></pre></div></div>
<p>Ouvrir pavucontrol<br />
Audio interne DigitalStéréo (HDMI)<br />
Port : HDMI/DisplayPort (plugged in)</p>
<p><img src="/images/pavucontrol.png" alt="image" width="300px" /> <img src="/images/pav1.png" alt="image" width="300px" /></p>
<p><img src="/images/pav2.png" alt="image" width="300px" /> <img src="/images/pav3.png" alt="image" width="300px" /></p>
<p>Commuter la sortie audio entre HDMI et analogique par un clic, chercher lexpression “sortie audio hdmi” dans le champ recherche du site</p>
<h3 id="client-nextcloud">Client Nextcloud</h3>
<p>Installation client nextcloud</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>yay -S nextcloud-client libgnome-keyring gnome-keyring
</code></pre></div></div>
<p>Démarrer le client nextcloud , après avoir renseigné lurl ,login et mot de passe pour la connexion</p>
<h3 id="alltray">AllTray</h3>
<p>Installer lutilitaire AllTray compatible avec Gnome, KDE, et Xfce (<a href="https://saravananthirumuruganathan.wordpress.com/2010/04/21/alltray-minimize-any-program-into-the-system-tray/">Voir cet excellent tutorial</a>) pour minimiser nimporte quelle application dans le systray</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S alltray
</code></pre></div></div>
<p>Ajout <strong>Thunderbird</strong> dans le systray <br />
<strong>Paramètres</strong><strong>Session et démarrage</strong> , onglet <em>Démarrage automatique dapplication</em><br />
Ajout ,clic sur le +<br />
<img src="/images/alltray-thunderbird.png" alt="" width="400" /></p>
<h3 id="applications">Applications</h3>
<h4 id="retext">Retext</h4>
<p><strong><a href="https://github.com/retext-project/retext">Retext</a> , éditeur markdown</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S retext qt5-webkit
</code></pre></div></div>
<h4 id="keepassxc">keepassxc</h4>
<p>Créer le dossier <code class="language-plaintext highlighter-rouge">mkdir -p $HOME/{.keepassx}</code> , Home/.keepassx &gt; ~/.keepassx<br />
Ouvrir menu xfce et lancer <strong>KeePassXC</strong><br />
Base ~/.keepassx/yannick_xc.kdbx<br />
Clé ~/.ssh/yannick_keepassxc.key</p>
<h4 id="calibre">Calibre</h4>
<p><em>Calibre facilite la gestion de votre bibliothèque de livres électroniques. Ce programme intuitif et complet vous permet de visionner vos ebooks, de les trier selon différents critères, de les convertir (individuellement ou par lot), déditer leurs méta-données et de récupérer des informations à partir dInternet.</em></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S calibre
</code></pre></div></div>
<p>Premier lancement ,bibliothèques sous <strong>~/media/BiblioCalibre</strong> et <strong>~/media/CalibreTechnique</strong></p>
<h4 id="flameshot">Flameshot</h4>
<p><strong>Copie écran (flameshot)</strong><br />
<strong><a href="https://github.com/lupoDharkael/flameshot">Flameshot</a></strong> cest un peu THE TOOL pour faire des captures décrans</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S flameshot
</code></pre></div></div>
<p>Paramétrage “tableau de bord”<br />
<img src="/images/flameshot.png" alt="Texte alternatif" width="600" /></p>
<h4 id="flatpak">Flatpak</h4>
<p><img src="/images/Flatpak_logo.png" alt="Texte alternatif" />
Par Matthias Clasen — <a rel="nofollow" class="external free" href="https://github.com/flatpak/flatpak/blob/master/flatpak.png">https://github.com/flatpak/flatpak/blob/master/flatpak.png</a>, <a href="https://creativecommons.org/licenses/by-sa/4.0" title="Creative Commons Attribution-Share Alike 4.0">CC BY-SA 4.0</a>, <a href="https://commons.wikimedia.org/w/index.php?curid=49741329">Lien</a><br />
<em>Flatpak (anciennement xdg-app) est un système de virtualisation dapplication pour les distributions GNU/Linux de bureau.</em></p>
<p><a href="https://wiki.archlinux.org/index.php/Flatpak">Flatpak (archlinux)</a><br />
Installation</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S flatpak
</code></pre></div></div>
<p>Ajout du dépôt officiel, <a href="https://flathub.org/">Flathub repository</a></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
</code></pre></div></div>
<p>Liste des dépôts</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>flatpak remotes
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Name Options
flathub system
</code></pre></div></div>
<p>Pour effacer un dépôt : <code class="language-plaintext highlighter-rouge">flatpak remote-delete name</code></p>
<p>Recherche</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>flatpak update # mise à jour dépôt
flatpak search signal
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Name Description Application ID Version Branch Remotes
Signal Desktop Private messenger org.signal.Signal 1.38.2 stable flathub
</code></pre></div></div>
<p>Installer un runtime ou une application : <code class="language-plaintext highlighter-rouge">flatpak install remote name</code><br />
<em>remote</em> est le nom du dépôt distant, et <em>name</em> est le nom de lapplication ou du runtime à installer.</p>
<p>Installer signal</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>flatpak install flathub signal
</code></pre></div></div>
<p>Le fichier <code class="language-plaintext highlighter-rouge">~/.local/share/applications/signal-desktop.desktop</code></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[Desktop Entry]
Type=Application
Name=Signal
Comment=Signal Private Messenger for Linux
Icon=signal-desktop
Exec=/usr/bin/flatpak run signal
Terminal=false
Categories=Network;InstantMessaging;
StartupWMClass=Signal
</code></pre></div></div>
<h4 id="tmuxssd">tmuxssd</h4>
<p>Configuration par défaut de tmux <code class="language-plaintext highlighter-rouge">$HOME/.tmux.conf</code></p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#Configuration de tmux</span>
<span class="c">#Origine : http://denisrosenkranz.com</span>
<span class="c">#Yannick juin 2017</span>
<span class="c"># Copier/Coller par la souris se fait avec la touche "Shift" appuyée</span>
<span class="c">##################################</span>
<span class="c">#Changements des raccourcis claviers</span>
<span class="c">##################################</span>
<span class="c">#On change Control +b par Control +x</span>
<span class="c">#set -g prefix C-x</span>
<span class="c">#unbind C-b</span>
<span class="c">#bind C-x send-prefix</span>
<span class="c">#On utilise control + flèches pour naviguer entre les terminaux</span>
bind-key <span class="nt">-n</span> C-right next
bind-key <span class="nt">-n</span> C-left prev
<span class="c">#on utilise alt + flèches our naviguer entre les panels</span>
bind-key <span class="nt">-n</span> M-left <span class="k">select</span><span class="nt">-pane</span> <span class="nt">-L</span>
bind-key <span class="nt">-n</span> M-right <span class="k">select</span><span class="nt">-pane</span> <span class="nt">-R</span>
bind-key <span class="nt">-n</span> M-up <span class="k">select</span><span class="nt">-pane</span> <span class="nt">-U</span>
bind-key <span class="nt">-n</span> M-down <span class="k">select</span><span class="nt">-pane</span> <span class="nt">-D</span>
<span class="c">#On change les raccourcis pour faire du split vertical et horizontal</span>
<span class="c">#On utilise la touche "|" (pipe) pour faire un split vertical</span>
<span class="nb">bind</span> | split-window <span class="nt">-h</span>
<span class="c">#Et la touche "-" pour faire un split horizontal</span>
<span class="nb">bind</span> - split-window <span class="nt">-v</span>
<span class="c">##################################</span>
<span class="c">#Changements pratiques</span>
<span class="c">##################################</span>
<span class="c">#On permet l'utilisation de la souris pour changer de terminal et de panel</span>
<span class="nb">set</span> <span class="nt">-g</span> mouse on
<span class="c"># Sélection zone par clic gauche souris (texte sélectionné sur fond jaune)</span>
<span class="c"># Après relachement du clic , le texte sélectionné est copié dans le presse-papier </span>
<span class="c"># Le fond jaune disparaît</span>
set-option <span class="nt">-s</span> set-clipboard off
<span class="c"># For emacs copy mode bindings</span>
<span class="c"># Il faut installer l'utilitaire 'xclip' (sudo pacman -S xclip)</span>
bind-key <span class="nt">-T</span> copy-mode MouseDragEnd1Pane send-keys <span class="nt">-X</span> copy-pipe-and-cancel <span class="s2">"xclip -selection clipboard -i"</span>
<span class="c">#Les fenêtres commencent par 1 et non par 0</span>
<span class="nb">set</span> <span class="nt">-g</span> base-index 1
<span class="c">##################################</span>
<span class="c">#Changements visuels</span>
<span class="c">##################################</span>
<span class="c">#On met les panneaux non actif en gris</span>
<span class="c">#set -g pane-border-fg colour244</span>
<span class="c">#set -g pane-border-bg default</span>
<span class="c">#On met le panneau actif en rouge</span>
<span class="c">#set -g pane-active-border-fg colour124</span>
<span class="c">#set -g pane-active-border-bg default</span>
<span class="c">#On met la barre de status en gris</span>
<span class="nb">set</span> <span class="nt">-g</span> status-fg colour235
<span class="nb">set</span> <span class="nt">-g</span> status-bg colour250
<span class="c">#set -g status-attr dim</span>
<span class="c"># On surligne les fenêtres actives dans la barre de status en gris foncés</span>
<span class="c">#set-window-option -g window-status-current-fg colour15</span>
<span class="c">#set-window-option -g window-status-current-bg colour0</span>
</code></pre></div></div>
<p>Visualisation en terminal des VPS avec terminator et tmux<br />
Le script : <code class="language-plaintext highlighter-rouge">/home/yann/scripts/tmux-ssd.sh</code>
Le .desktop : <code class="language-plaintext highlighter-rouge">/home/yann/.local/share/applications/menulibre-tmuxssd.desktop</code></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[Desktop Entry]
Version=1.1
Type=Application
Name=Serveurs VPS
Comment=multi fenêtres
Icon=utilities-terminal-symbolic
Exec=terminator --geometry=1900x900+20+100 -e '/home/yann/scripts/tmux-ssd.sh'
Actions=
Categories=Utility;
</code></pre></div></div>
<p><img src="/images/tmuxssd.png" alt="" /></p>
<h4 id="tmuxvdb">tmuxvdb</h4>
<p>Surveillance construction site statique et synchronisation avec le serveur xoyaz sur la machine virtuelle debian</p>
<p>Le bash <code class="language-plaintext highlighter-rouge">/home/yann/scripts/tmux-vdb.sh</code></p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#!/bin/bash </span>
<span class="c"># COLUMNSxROWS+X+Y -&gt; xterm -geometry 400x200+100+350</span>
<span class="c"># xterm -geometry 100x30+100+350 -T yannstatic -e '/home/yannick/scripts/tmux-lxc.sh'</span>
<span class="c"># On supprime la session "vdbSess" si existante </span>
<span class="k">if</span> <span class="o">[[</span> <span class="sb">`</span>tmux list-sessions | <span class="nb">grep</span> <span class="s1">'vdbSess'</span> | <span class="nb">wc</span> <span class="nt">-l</span><span class="sb">`</span> <span class="o">!=</span> 0 <span class="o">]]</span>
<span class="k">then</span>
<span class="c"># On ferme la session active</span>
tmux kill-session <span class="nt">-t</span> vdbSess
<span class="k">fi</span>
<span class="c"># Créer une bannière dans /etc/motd sur chaque serveur</span>
<span class="c"># Nom du domaine en ascii voir lien http://patorjk.com/software/taag/#p=display&amp;h=1&amp;f=Small</span>
<span class="nb">echo</span> <span class="s2">"fin fi"</span>
<span class="c"># Créer session + terminal </span>
tmux new <span class="nt">-d</span> <span class="nt">-s</span> vdbSess <span class="nt">-n</span> vdbTerm
<span class="c"># Séparation horizontale en 2 du terminal</span>
tmux split-window <span class="nt">-v</span> <span class="nt">-p</span> 50
<span class="c"># | 0 |</span>
<span class="c"># | |</span>
<span class="c"># |-----------|</span>
<span class="c"># | 1 |</span>
<span class="c"># | |</span>
<span class="c"># Sélection terminal HAUT</span>
tmux selectp <span class="nt">-t</span> 0
<span class="c"># </span>
tmux send-keys <span class="nt">-t</span> vdbSess <span class="s1">'static'</span> C-m
<span class="c"># Sélection terminal BAS</span>
tmux selectp <span class="nt">-t</span> 1
<span class="c"># </span>
tmux send-keys <span class="nt">-t</span> vdbSess <span class="s2">"synchro"</span> C-m
<span class="c"># Afficher la session </span>
tmux a <span class="nt">-t</span> vdbSess
<span class="c">#</span>
<span class="c"># Tuer la session</span>
<span class="c"># tmux kill-session -t vdbSess</span>
</code></pre></div></div>
<p>Le desktop</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[Desktop Entry]
Version=1.1
Type=Application
Name=Static-synchro
Comment=multi fenêtres
Icon=final-term
Exec=xterm -geometry 100x30+100+350 -T yannstatic -e '/home/yann/scripts/tmux-vdb.sh'
Actions=
Categories=Utility;
Path=
Terminal=false
StartupNotify=false
</code></pre></div></div>
<h4 id="applications-via-dépôts-aur">Applications via dépôts AUR</h4>
<p><strong>Applications…</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>yay -S scrcpy-git radiotray-python3-git tutanota-desktop-bin menulibre yay-bin
sudo pacman -S android-tools
</code></pre></div></div>
<p><strong>scrcpy</strong> <a href="https://github.com/Genymobile/scrcpy/">https://github.com/Genymobile/scrcpy/</a><br />
Bureau <code class="language-plaintext highlighter-rouge">/home/yann/.local/share/applications/menulibre-scrcpy-(android).desktop</code></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[Desktop Entry]
Version=1.1
Type=Application
Name=ScrCpy (Android)
Comment=Votre smartphone sur le bureau
Icon=smartphone-connected
Exec=/usr/bin/scrcpy
Path=/home/yann
Actions=
Categories=Utility;X-XFCE;X-Xfce-Toplevel;
</code></pre></div></div>
<p><strong>firefox-nightly-fr</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>wget https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central-l10n/firefox-85.0a1.fr.linux-x86_64.tar.bz2
sudo tar -xvf firefox-85.0a1.fr.linux-x86_64.tar.bz2
sudo mv firefox /opt/firefox-nightly
rm firefox-85.0a1.fr.linux-x86_64.tar.bz2
</code></pre></div></div>
<p>Desktop /home/yann/.local/share/applications/firefox-nightly.desktop</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[Desktop Entry]
Version=1.0
Name=Firefox Nightly
GenericName=Web Browser
GenericName[fr]=Navigateur web
Comment=Browse the Web
Comment[fr]=Naviguer sur le Web
Exec=/opt/firefox-nightly/firefox %u
Icon=firefox-nightly
Terminal=false
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
StartupNotify=true
StartupWMClass=Nightly
Categories=Network;WebBrowser;
Keywords=web;browser;internet;
Actions=new-window;new-private-window;
[Desktop Action new-window]
Name=New Window
Name[fr]=Nouvelle fenêtre
Exec=/opt/firefox-nightly/firefox --new-window %u
[Desktop Action new-private-window]
Name=New Private Window
Name[fr]=Nouvelle fenêtre de navigation privée
Exec=/opt/firefox-nightly/firefox --private-window %u
</code></pre></div></div>
<h3 id="images-alias--liens">Images, alias , liens</h3>
<p><strong>Images fond décran + logo ym</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo cp /srv/hdd2g/data/dplus/images/yannick/plouzane-nb.jpg /usr/share/backgrounds/ # écran 2
sudo cp /srv/hdd2g/data/dplus/images/yannick/Linux-Arch-1920x1080.jpg /usr/share/backgrounds/xfce/ # écran 1
sudo cp /srv/hdd2g/data/dplus/images/yannick/yannick-green.png /usr/share/pixmaps/
</code></pre></div></div>
<p><strong>Alias fichier .bashrc</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>nano ~/.bashrc
</code></pre></div></div>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#</span>
<span class="c"># ~/.bashrc</span>
<span class="c">#</span>
<span class="c"># If not running interactively, don't do anything</span>
<span class="o">[[</span> <span class="nv">$-</span> <span class="o">!=</span> <span class="k">*</span>i<span class="k">*</span> <span class="o">]]</span> <span class="o">&amp;&amp;</span> <span class="k">return
</span><span class="nb">alias ls</span><span class="o">=</span><span class="s1">'ls --color=auto'</span>
<span class="nv">PS1</span><span class="o">=</span><span class="s1">'[\u@\h \W]\$ '</span>
<span class="nb">alias </span><span class="nv">youtube</span><span class="o">=</span><span class="s1">'youtube-dl -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" --output "~/Vidéos/%(title)s.%(ext)s" --ignore-errors'</span>
<span class="nb">alias </span><span class="nv">audio</span><span class="o">=</span><span class="s1">'youtube-dl --extract-audio --audio-format m4a --audio-quality 0 --output "~/Musique/%(title)s.%(ext)s"'</span>
<span class="nb">alias </span><span class="nv">audiomp3</span><span class="o">=</span><span class="s1">'youtube-dl --extract-audio --audio-format mp3 --audio-quality 0 --output "~/Musique/%(title)s.%(ext)s"'</span>
<span class="nb">alias </span>cryfs-autostart<span class="o">=</span><span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/scripts/cryfs-autostart"</span>
<span class="nb">alias </span><span class="nv">dnsleak</span><span class="o">=</span><span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/scripts/dnsleaktest.sh"</span>
<span class="nb">alias </span><span class="nv">nmapl</span><span class="o">=</span><span class="s2">"sudo nmap -T4 -sP 192.168.0.0/24"</span>
<span class="nb">alias </span><span class="nv">odt2html</span><span class="o">=</span><span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/Documents/odt2html+index/_odt2html+index"</span>
<span class="nb">alias </span><span class="nv">otp</span><span class="o">=</span><span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/scripts/generer-code-2fa-vers-presse-papier-toutes-les-30s.sh"</span>
<span class="nb">alias </span><span class="nv">posturl</span><span class="o">=</span><span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/scripts/posturl"</span>
<span class="nb">alias </span><span class="nv">rename</span><span class="o">=</span><span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/scripts/remplacer-les-espaces-accents-dans-une-expression.sh"</span>
<span class="nb">alias </span><span class="nv">sshm</span><span class="o">=</span><span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/scripts/ssh-manager.sh"</span>
<span class="nb">alias </span><span class="nv">sshsyn</span><span class="o">=</span><span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/scripts/synchro-ssh-xoyize.xyz.sh"</span>
<span class="nb">alias </span><span class="nv">sslxc</span><span class="o">=</span><span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/scripts/sslxc"</span>
<span class="nb">alias </span><span class="nv">ssvbox</span><span class="o">=</span><span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/scripts/ssvbox"</span>
<span class="nb">alias </span><span class="nv">synchro</span><span class="o">=</span><span class="s2">"sshm lxcdeb exe 'sudo journalctl -f -u synchro_site.service'"</span>
<span class="nb">alias </span><span class="nv">static</span><span class="o">=</span><span class="s2">"sshm lxcdeb exe 'sudo journalctl -f -u yannstatic.service'"</span>
<span class="nb">alias </span><span class="nv">tmuxssh</span><span class="o">=</span><span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/scripts/tmux-ssd.sh"</span>
<span class="nb">alias </span><span class="nv">vnc</span><span class="o">=</span><span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/scripts/sshvnc.sh"</span>
<span class="nb">alias </span><span class="nv">traduc</span><span class="o">=</span><span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/scripts/traduction-page-internet"</span>
<span class="nb">alias </span><span class="nv">wgkey</span><span class="o">=</span><span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/scripts/generer_jeu_cle_wireguard.sh"</span>
</code></pre></div></div>
<p><strong>Liens scripts (/usr/local/bin)</strong></p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># NE PAS CREER LES LIENS !!!!!!!!!!!!!!!!</span>
<span class="c"># ----------------------------------------</span>
<span class="c">#Créer des liens sur /usr/local/bin pour les scripts </span>
<span class="nv">$HOME</span>/scripts/compress /usr/local/bin/pdfdim
<span class="nv">$HOME</span>/scripts/all-synchro.sh /usr/local/bin/allsync
<span class="nv">$HOME</span>/scripts/borglist /usr/local/bin/borglist
/opt/Postman/Postman /usr/local/bin/postman
<span class="nb">sudo ln</span> <span class="nt">-s</span> <span class="nv">$HOME</span>/scripts/tmux-ssd.sh /usr/local/bin/tmuxssh
<span class="nb">sudo ln</span> <span class="nt">-s</span> <span class="nv">$HOME</span>/scripts/generer-code-2fa-vers-presse-papier-toutes-les-30s.sh /usr/local/bin/otp
<span class="c">#sudo ln -s $HOME/scripts/virtuel /usr/local/bin/virtuel</span>
<span class="c">#droits en exécution</span>
<span class="c">#chmod +x $HOME/scripts/{ssh-manager.sh,savlog.sh,tmux-ssd.sh,virtuel}</span>
</code></pre></div></div>
<p><strong>Liens “statique”</strong><br />
les liens pour la rédaction des posts</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo ln -s /home/yann/media/statique/images /images
sudo ln -s /home/yann/media/statique/files /files
</code></pre></div></div>
<h3 id="partages-sshfs-vps">Partages SSHFS (vps)</h3>
<p>sshfs ,FUSE client based on the SSH File Transfer Protocol</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S sshfs
</code></pre></div></div>
<p>Création des partages utilisés par sshfs</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mkdir -p ~/vps/{cx21,cx11,xoyaz.xyz,autre,lxc,xoyize.xyz}
</code></pre></div></div>
<h3 id="veille-écran">Veille écran</h3>
<p>Installer par défaut sur archlinux (xscreensaver)</p>
<p>Création dun script pour <strong>Activer/Désactiver</strong> le programme de mise en veille <strong>xscreensaver</strong><br />
Prérequis : <strong>zenity</strong> <br />
Le script <strong>~/scripts/veille.sh</strong></p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#!/bin/bash</span>
<span class="c"># veille.sh</span>
<span class="c"># Détecter si xscreensaver est actif</span>
<span class="k">if</span> <span class="o">[</span> <span class="s2">"</span><span class="si">$(</span>pidof <span class="nt">-s</span> xscreensaver<span class="si">)</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then
</span><span class="nv">arret</span><span class="o">=</span><span class="nb">false
</span>zenity <span class="nt">--question</span> <span class="nt">--title</span> <span class="s2">"veille"</span> <span class="nt">--ok-label</span><span class="o">=</span><span class="s2">"Oui"</span> <span class="nt">--cancel-label</span><span class="o">=</span><span class="s2">"Non"</span> <span class="nt">--text</span> <span class="s2">"Economiseur Ecran ACTIF</span><span class="se">\n\n</span><span class="s2"> DESACTIVER ?"</span>
<span class="k">if</span> <span class="o">[</span> <span class="nv">$?</span> <span class="o">=</span> 0 <span class="o">]</span>
<span class="k">then
</span><span class="nb">echo</span> <span class="s2">"ARRET daemon xscreensaver ..."</span>
xscreensaver-command <span class="nt">-exit</span>
<span class="nb">sleep </span>3
<span class="k">fi
else
</span><span class="nv">arret</span><span class="o">=</span><span class="nb">true
</span>zenity <span class="nt">--question</span> <span class="nt">--title</span> <span class="s2">"veille"</span> <span class="nt">--ok-label</span><span class="o">=</span><span class="s2">"Oui"</span> <span class="nt">--cancel-label</span><span class="o">=</span><span class="s2">"Non"</span> <span class="nt">--text</span> <span class="s2">"Economiseur Ecran NON ACTIF</span><span class="se">\n\n</span><span class="s2"> ACTIVER ?"</span>
<span class="k">if</span> <span class="o">[</span> <span class="nv">$?</span> <span class="o">=</span> 0 <span class="o">]</span>
<span class="k">then
</span><span class="nb">echo</span> <span class="s2">"DEPART daemon xscreensaver ..."</span>
xscreensaver <span class="nt">-nosplash</span> &amp;
<span class="nb">sleep </span>3
<span class="k">fi
fi</span>
</code></pre></div></div>
<p>Création lanceur XFCE en utilisant <strong>Editeur de menus</strong> (si “menulibre” installé ou manuellement :</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">mkdir</span> <span class="nt">-p</span> ~/.local/share/applications/ <span class="c">#création dossier **applications** si inexistant</span>
nano ~/.local/share/applications/menulibre-veille-ecran.desktop
</code></pre></div></div>
<p>Contenu :</p>
<div class="language-ini highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nn">[Desktop Entry]</span>
<span class="py">Version</span><span class="p">=</span><span class="s">1.0</span>
<span class="py">Type</span><span class="p">=</span><span class="s">Application</span>
<span class="py">Name</span><span class="p">=</span><span class="s">Activer/Désactiver veille écran</span>
<span class="py">Comment</span><span class="p">=</span><span class="s">Veille active ou pas par simple clic</span>
<span class="py">Icon</span><span class="p">=</span><span class="s">preferences-desktop-screensaver</span>
<span class="py">Exec</span><span class="p">=</span><span class="s">sh /home/yann/scripts/veille.sh</span>
<span class="py">Path</span><span class="p">=</span><span class="s">/home/yann/scripts</span>
<span class="py">NoDisplay</span><span class="p">=</span><span class="s">false</span>
<span class="py">Categories</span><span class="p">=</span><span class="s">Utility;X-XFCE;X-Xfce-Toplevel;</span>
<span class="py">StartupNotify</span><span class="p">=</span><span class="s">false</span>
<span class="py">Terminal</span><span class="p">=</span><span class="s">false</span>
</code></pre></div></div>
<blockquote>
<p>Les icônes sont situés sous /usr/share/icons , il suffit de mettre le nom de licône choisi sans extension ni chemin pour le paramètre <strong>Icon</strong></p>
</blockquote>
<h3 id="paramétrer-minicom">Paramétrer minicom</h3>
<p>Paramétrage de lapplication terminale</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> sudo minicom -s
</code></pre></div></div>
<blockquote>
<p>Seul les paramètres à modifier sont cités</p>
</blockquote>
<p>Configuration du port série<br />
A - Port série : <strong>/dev/ttyUSB0</strong> <br />
F - Contrôle de flux matériel : <strong>Non</strong><br />
Echap<br />
Enregistrer config. sous dfl<br />
Sortir de Minicom</p>
<h3 id="nano-comme-éditeur-par-défaut">Nano comme éditeur par défaut</h3>
<p>Attribution immédiate</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>export EDITOR=/usr/bin/nano
</code></pre></div></div>
<p>Attribution permanente</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>echo "export EDITOR=/usr/bin/nano" &gt;&gt; ~/.bashrc
</code></pre></div></div>
<h3 id="impression">Impression</h3>
<p>Prérequis , paquets cups, system-config-printer, et hplip installés (Pilotes HP pour DeskJet, OfficeJet, Photosmart, Business Inkjet et quelques modèles de LaserJet aussi bien quun certain nombre dimprimantes Brother)…</p>
<p>On démarre le service cups</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo systemctl start cups.service # lancement cups
sudo systemctl enable cups.service # activation cups
</code></pre></div></div>
<p>Vérifier le fonctionnement du service : http://localhost:631/</p>
<p>Installation du scanner<br />
Coté logiciel il vous faudra <strong>sane</strong> et son interface graphique <strong>xsane</strong>, ainsi quéventuellement xsane-gimp le plugin pour gimp.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>yay -S xsane xsane-gimp
</code></pre></div></div>
<p>Paramétrage imprimante HP (su)
Lancer “HP Device Manager” : <code class="language-plaintext highlighter-rouge">hp-setup</code></p>
<p><img src="/images/hp1.png" alt="image" width="400px" /></p>
<p><img src="/images/hp2.png" alt="image" width="400px" /></p>
<p><img src="/images/hp3.png" alt="image" width="400px" /></p>
<p><img src="/images/hp4.png" alt="image" width="400px" /></p>
<p>Vérifier si le scaner est reconnu : <code class="language-plaintext highlighter-rouge">sudo scanimage -L</code></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>device `hpaio:/net/OfficeJet_7510_series?ip=192.168.0.39' is a Hewlett-Packard OfficeJet_7510_series all-in-one
</code></pre></div></div>
<p>Test</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>scanimage --device hpaio:/net/OfficeJet_7510_series?ip=192.168.0.39 --format=png &gt; test.png
</code></pre></div></div>
<h3 id="journalctl">Journalctl</h3>
<p>Ajout utilisateur courant au groupe systemd-journal et adm</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo gpasswd -a $USER systemd-journal
sudo gpasswd -a $USER adm
</code></pre></div></div>
<p>Lignes non tronquées ,ajouter au fichier <strong>~/.bashrc</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>echo "export SYSTEMD_LESS=FRXMK journalctl" &gt;&gt; /home/$USER/.bashrc
</code></pre></div></div>
<p>Prise en compte après déconnexion/reconnexion</p>
<p><strong>Rendre persistant journalctl</strong><br />
Par défaut <code class="language-plaintext highlighter-rouge">journalctl</code> affiche les logs du dernier boot. En cas de freeze de votre serveur, il peut être intéressant de comprendre ce qui sest passé juste avant le plantage…Du coup nous allons rendre journalctl persistant.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo nano /etc/systemd/journald.conf
</code></pre></div></div>
<p>Oter le commentaire (#) à la ligne Storage=auto et remplacer <em>auto</em> par <em>persistent</em></p>
<p>Réinitialiser le journal</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo mkdir /var/log/journal
sudo systemd-tmpfiles --create --prefix /var/log/journal
sudo systemctl restart systemd-journald
</code></pre></div></div>
<p>Maintenant vous pouvez voir les différents boots</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo journalctl --list-boots
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> 0 518f818d328145f692098062be9056cb Thu 2019-08-29 11:07:55 CEST—Thu 2019-08-29 12:03:50 CEST
</code></pre></div></div>
<h3 id="openjdk---jre">Openjdk - jre</h3>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S jre-openjdk
</code></pre></div></div>
<h3 id="images-fond-écranconnexion-et-grub">Images (fond écran,connexion et grub)</h3>
<p>les images de fond décran <strong>/usr/share/backgrounds/xfce</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo cp ~/media/dplus/images/Fonds/Linux-Arch-1920x1080.jpg /usr/share/backgrounds/xfce/
sudo cp ~/media/dplus/images/yannick/yannick-green.png /usr/share/pixmaps/
</code></pre></div></div>
<p>Ecran et logo pour lightdm de la page de connexion</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo cp ~/media/dplus/images/Fonds/archlinux-lightdm.png /usr/share/backgrounds/
sudo cp ~/media/dplus/images/yannick/yannick53x64.png /usr/share/pixmaps/
</code></pre></div></div>
<h3 id="ecran-connexion-lightdm">Ecran connexion (lightDM)</h3>
<p>Ecran et logo pour <strong>lightdm</strong> de la page de connexion <br />
Accès aux paramètres lightDM en mode graphique (mot de passe root)</p>
<ul>
<li>Menu &gt; Paramètres &gt; LightDM GTK+ Paramètres dApparence</li>
</ul>
<p><img src="/images/lightdm1.png" alt="image" width="300px" /></p>
<h3 id="ecran-de-boot-grub">Ecran de boot (grub)</h3>
<p>Ecran de la page de démarrage <strong>grub</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo cp ~/media/dplus/images/Fonds/wp2618243.jpg /usr/share/backgrounds/xfce/
sudo nano /etc/default/grub
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>GRUB_BACKGROUND="/usr/share/backgrounds/xfce/wp2618243.jpg"
</code></pre></div></div>
<p>Reconfigurer grub pour la prise en charge de limage</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo grub-mkconfig -o /boot/grub/grub.cfg
</code></pre></div></div>
<h3 id="instantané-paramétrage-xfce">Instantané Paramétrage XFCE</h3>
<p><img src="/images/2019-12-14_11-09.png" alt="" width="400" /> <img src="/images/2019-12-14_11-09_1.png" alt="" width="400" /><br />
<img src="/images/2019-12-14_11-10.png" alt="" width="400" /> <img src="/images/2019-12-14_11-10_1.png" alt="" width="400" /><br />
<img src="/images/2019-12-14_11-10_2.png" alt="" width="400" /> <img src="/images/2019-12-14_11-10_3.png" alt="" width="400" /><br />
<img src="/images/2019-12-14_11-11.png" alt="" width="400" /> <img src="/images/2019-12-14_11-11_1.png" alt="" width="400" /><br />
<img src="/images/2019-12-14_11-11_2.png" alt="" width="400" /> <img src="/images/2019-12-14_11-12.png" alt="" width="400" /><br />
<img src="/images/2019-12-14_11-12_1.png" alt="" width="400" /> <img src="/images/2019-12-14_11-12_2.png" alt="" width="400" /><br />
<img src="/images/2019-12-14_11-13.png" alt="" width="400" /> <img src="/images/2019-12-14_11-13_1.png" alt="" width="400" /><br />
<img src="/images/2019-12-14_11-14.png" alt="" width="400" /> <img src="/images/2019-12-14_11-14_1.png" alt="" width="400" /><br />
<img src="/images/2019-12-14_11-15.png" alt="" width="400" /> <img src="/images/2019-12-14_11-16.png" alt="" width="400" /><br />
<img src="/images/2019-12-14_11-16_1.png" alt="" width="400" /> <img src="/images/2019-12-14_11-16_2.png" alt="" width="400" /></p>
<h3 id="les-applications-supplémentaires">Les applications supplémentaires</h3>
<h4 id="wing-personal-python-ide">Wing Personal Python IDE</h4>
<p><strong><a href="https://wingware.com/downloads/wing-personal">Wing Personal Python IDE</a></strong> <br />
1- Télécharger la version linux (ex wing-personal-7.2.7.0-linux-x64.tar.bz2 au 24/11/2020)<br />
2- décompresser <code class="language-plaintext highlighter-rouge">tar -zxvf wingpro-7.2.7.0-linux-x64.tar.gz</code><br />
3- En mode su , <code class="language-plaintext highlighter-rouge">cd wing-personal-7.1.2.0-linux-x64</code> , <code class="language-plaintext highlighter-rouge">./wing-install.py --winghome /opt/wing-personal --bin-dir /usr/local/bin</code></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Done installing. Make sure that /usr/local/bin is in your path and type
"wing-personal7.2" to start Wing Personal.
</code></pre></div></div>
<h4 id="xournal">Xournal</h4>
<p><strong>Xournal</strong> https://github.com/xournalpp/xournalpp : <code class="language-plaintext highlighter-rouge">yay -S xournal</code><br />
<em>Xournal++ est un logiciel de prise de notes manuscrites, surtout destiné à prendre des notes sur des documents PDF et à les annoter</em></p>
<p><strong><a href="/2019/02/17/QR-Code-barres-definition-encodage-decodage.html">QR Code (code-barres) définition, encodage et décodage</a> (NON INSTALLE)</strong><br />
<em>La première chose à faire va être dinstaller deux petites applications, à savoir QRencode pour la partie création, et ZBar pour la partie scan/lecture</em><br />
Sur Archlinux</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S qrencode zbar
</code></pre></div></div>
<h4 id="kicad-non-installe">KiCad (NON INSTALLE)</h4>
<p><strong>KiCad (NON INSTALLE)</strong> est une suite logicielle libre de conception pour lélectronique pour le dessin de schémas électroniques et la conception de circuits imprimés. KiCad est publié sous licence GNU GPL: <code class="language-plaintext highlighter-rouge">sudo pacman -S kicad</code></p>
<h4 id="qbittorent-non-installe">qbittorent (NON INSTALLE)</h4>
<p><strong>qbittorent (NON INSTALLE)</strong> <code class="language-plaintext highlighter-rouge">sudo pacman -S qbittorrent</code></p>
<h4 id="wireguard">Wireguard</h4>
<p>Installation</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S wireguard-tools openresolv
</code></pre></div></div>
<p>Dossier /etc /wireguard <br />
Configuration serveur wireguard wg.ouestline.xyz (cx11)<br />
Lancement configuration</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo -s
cd /etc/wireguard
</code></pre></div></div>
<p>Pour démarrer un tunnel avec un fichier de configuration</p>
<p><strong>wg-quick</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># wg-quick up &lt;nom de l'interface&gt;
wg-quick up wg0 # lancement
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -6 address add fd18:2941:ae9:7d96::3/128 dev wg0
[#] ip -4 address add 10.14.94.3/32 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] resolvconf -a wg0 -m 0 -x
[#] wg set wg0 fwmark 51820
[#] ip -6 route add ::/0 dev wg0 table 51820
[#] ip -6 rule add not fwmark 51820 table 51820
[#] ip -6 rule add table main suppress_prefixlength 0
[#] ip6tables-restore -n
[#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
[#] iptables-restore -n
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>wg-quick down wg0 # arrêt
</code></pre></div></div>
<p><strong>service systemd</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>#wg-quick@interfacename.service
systemctl start wg-quick@wg0.service
systemctl status wg-quick@wg0.service
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>● wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0
Loaded: loaded (/usr/lib/systemd/system/wg-quick@.service; disabled; vendor preset: disabled)
Active: active (exited) since Tue 2020-11-24 20:54:09 CET; 8s ago
Docs: man:wg-quick(8)
man:wg(8)
https://www.wireguard.com/
https://www.wireguard.com/quickstart/
https://git.zx2c4.com/wireguard-tools/about/src/man/wg-quick.8
https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8
Process: 36391 ExecStart=/usr/bin/wg-quick up wg0 (code=exited, status=0/SUCCESS)
Main PID: 36391 (code=exited, status=0/SUCCESS)
nov. 24 20:54:09 archyan wg-quick[36391]: [#] ip -6 route add ::/0 dev wg0 table 51820
nov. 24 20:54:09 archyan wg-quick[36391]: [#] ip -6 rule add not fwmark 51820 table 51820
nov. 24 20:54:09 archyan wg-quick[36391]: [#] ip -6 rule add table main suppress_prefixlength 0
nov. 24 20:54:09 archyan wg-quick[36483]: [#] ip6tables-restore -n
nov. 24 20:54:09 archyan wg-quick[36391]: [#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
nov. 24 20:54:09 archyan wg-quick[36391]: [#] ip -4 rule add not fwmark 51820 table 51820
nov. 24 20:54:09 archyan wg-quick[36391]: [#] ip -4 rule add table main suppress_prefixlength 0
nov. 24 20:54:09 archyan wg-quick[36391]: [#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
nov. 24 20:54:09 archyan wg-quick[36493]: [#] iptables-restore -n
nov. 24 20:54:09 archyan systemd[1]: Finished WireGuard via wg-quick(8) for wg0.
</code></pre></div></div>
<p>Pour démarrer le tunnel au démarrage, activer lunité.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>systemctl enable wg-quick@wg0.service
</code></pre></div></div>
<p>Vérification</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ip a
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s31f6: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 38:d5:47:7c:a0:6c brd ff:ff:ff:ff:ff:ff
inet 192.168.0.37/24 brd 192.168.0.255 scope global dynamic noprefixroute enp0s31f6
valid_lft 27798sec preferred_lft 22398sec
inet6 2a01:e34:eebf:df0:b968:86b6:a0a9:79f7/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 86183sec preferred_lft 86183sec
inet6 fe80::8ece:7e8c:f571:b48b/64 scope link
valid_lft forever preferred_lft forever
4: wg0: &lt;POINTOPOINT,NOARP,UP,LOWER_UP&gt; mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
link/none
inet 10.14.94.3/32 scope global wg0
valid_lft forever preferred_lft forever
inet6 fd18:2941:ae9:7d96::3/128 scope global
valid_lft forever preferred_lft forever
</code></pre></div></div>
<p><strong>GtkWg</strong></p>
<p>Dossier /usr/local/share/gtkwg<br />
Les configurations mullvad <code class="language-plaintext highlighter-rouge">/usr/local/share/gtkwg/mullvad_config_linux_all/</code></p>
<p>Ajout configuration wireguard serveur <strong>cx11</strong> (wg.ouestline.xyz)</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo cp wg0-archlinux-pc1.conf /usr/local/share/gtkwg/mullvad_config_linux_all/mullvad-frcx11.conf
</code></pre></div></div>
<p>Le fichier <strong>menulibre.desktop</strong> dans <code class="language-plaintext highlighter-rouge">~/.local/share/applications/</code></p>
<p><strong>Désactiver wireguard</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo systemctl stop wg-quick@wg0
sudo systemctl disable wg-quick@wg0
</code></pre></div></div>
<p>xfce: “Menu -&gt; Paramètres -&gt; Session et démarrage”, Démarrage automatique dapplications<br />
<img src="/images/sup-wireguard.png" alt="" width="400" /></p>
<h2 id="réseau">Réseau</h2>
<h3 id="bascule-dhcpd-vers-networkmanager">Bascule dhcpd vers NetworkManager</h3>
<p>Passer de <strong>dhcpcd</strong> à <strong>NetworkManager</strong></p>
<p>Arrêter et désactiver dhcpcd</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo systemctl stop dhcpcd &amp;&amp; sudo systemctl disable dhcpcd
</code></pre></div></div>
<p>Installer, lancer et activer networkmanager</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S networkmanager
sudo systemctl start NetworkManager
sudo systemctl enable NetworkManager
</code></pre></div></div>
<h3 id="pont-bridge">Pont (Bridge)</h3>
<p>Pour un réseau en pont (bridge - adresse IP container dans le même réseau que lhôte) : <a href="/2020/11/26/Archlinux-KVM_QEMU-VMM.html">Archlinux KVM/QEMU - Virtual Machine Manager - Réseau (network)</a></p>
<h2 id="borg">Borg</h2>
<p>Créer utilisateur borg avec id 1001 et “home” /srv/hdd2g/data/borg-backups</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo useradd -m -d /srv/hdd2g/data/borg-backups -u 1001 borg
</code></pre></div></div>
<p>Créer le dossier .ssh utilisateur “borg”</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo -u borg mkdir /srv/data/borg-backups/.ssh
</code></pre></div></div>
<p>Créer le fichier authorized_keys</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo -u borg touch /srv/data/borg-backups/.ssh/authorized_keys
</code></pre></div></div>
<p>Autoriser utilisateur <strong>borg</strong> à exécuter <em>/usr/bin/borg</em> uniquement</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo -s
echo "borg ALL=NOPASSWD: /usr/bin/borg" &gt;&gt; /etc/sudoers
</code></pre></div></div>
<h3 id="borg-sauvegarde-home-pc1">Borg sauvegarde home PC1</h3>
<p><img src="/images/borg-logo.png" alt="" /></p>
<ul>
<li><a href="https://wiki.archlinux.fr/Sauvegarde_des_donn%C3%A9es_avec_BORG">Archlinux : Sauvegarde des données avec BORG</a></li>
</ul>
<p>Installation normale<br />
Le paquet <strong>borg</strong> étant dans les dépôts Community + options recommandées : <strong>fuse</strong> et <strong>python-llfuse</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S borg fuse python-llfuse
</code></pre></div></div>
<p><strong>Sauvegarde PC1 “local” sur unité “sav”</strong></p>
<ul>
<li><em>La sauvegarde sera exécutée avec lutilisateur borg sous root pour les dossiers et fichiers systèmes</em></li>
<li><strong>/root/.borg</strong> : dossier des fichiers (script, passphrase et exclusions)</li>
<li><strong>/srv/hdd2g/data/borg-backups</strong> : dépôts de sauvegarde</li>
</ul>
<p>Créer le dossier</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo mkdir -p /root/.borg
</code></pre></div></div>
<p>Création dun fichier <strong>passphrase</strong> ( ex: qui contient 6 mots aléatoires séparés par un espace) qui servira à automatiser la procédure de sauvegarde sauvegarde (<strong>/root/.borg/passphrase</strong>)</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo nano /root/.borg/passphrase # contient la "phrase de passe"
</code></pre></div></div>
<p>Création dun fichier <strong>exclusions</strong> qui contient toutes les exclusions de dossiers et fichiers , une exclusion par ligne (<strong>/root/.borg/exclusions</strong>)</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo nano /root/.borg/exclusions
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/home/yann/Desktop
/home/yann/Téléchargements
/home/yann/temp
/home/yann/vps
/home/yann/sav
/home/yann/srv_hdd2g
/home/yann/virtuel
/home/yann/media/BiblioCalibre -&gt; /srv/hdd2g/data/BiblioCalibre
/home/yann/media/CalibreTechnique -&gt; /srv/hdd2g/data/CalibreTechnique
/home/yann/media/devel -&gt; /srv/hdd2g/data/devel
/home/yann/media/dplus -&gt; /srv/hdd2g/data/dplus
/home/yann/media/music -&gt; /srv/hdd2g/data/music
</code></pre></div></div>
<p><strong>Initialisation dépôt</strong> “archyan” de sauvegarde chiffré avec “phrase de passe”</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo</span> <span class="nt">-s</span>
<span class="nb">export </span><span class="nv">BORG_PASSPHRASE</span><span class="o">=</span><span class="s2">"</span><span class="sb">`</span><span class="nb">cat</span> /root/.borg/passphrase<span class="sb">`</span><span class="s2">"</span>
<span class="nv">BORG_REPOSITORY</span><span class="o">=</span>/srv/hdd2g/data/borg-backups/archyan
borg init <span class="nt">--encryption</span><span class="o">=</span>repokey-blake2 /srv/hdd2g/data/borg-backups/archyan
</code></pre></div></div>
<p><strong>Création du script borg-backup</strong></p>
<p><em>Borg a la déduplication, le contrôle de cohérence, le cryptage, est configurable par des variables denvironnement, la récupération des fichiers avec FUSE pour le montage des dépôts. En utilisant borg prune, on peut avoir une haute fréquence de sauvegardes avec une gestion du cycle des repo : 6 heures, 7 jours, 4 semaines, et 6 mois.</em></p>
<p>Le fichier script <strong>/root/.borg/borg-backup</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo nano /root/.borg/borg-backup
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>#!/bin/bash
set -e
# Vérifier si utilisateur est root
if [ $(id -u) != "0" ]; then
echo "Erreur : Vous devez être root pour exécuter ce script !"
exit 1
fi
BORG_REPOSITORY=/srv/hdd2g/data/borg-backups/archyan
BACKUP_DATE=`date +%Y-%m-%d-%Hh%M`
echo "Exécution borg-backup archyan $BACKUP_DATE"
export BORG_RELOCATED_REPO_ACCESS_IS_OK=yes
export BORG_PASSPHRASE="`cat /root/.borg/passphrase`"
BORG_ARCHIVE=${BORG_REPOSITORY}::${BACKUP_DATE}
# Sauvegarde de tout /home à l'exception de quelques répertoires et fichiers exclus
borg create \
-v --stats --compression lzma,9 \
--exclude-from /root/.borg/exclusions --exclude-caches \
$BORG_ARCHIVE \
/home/yann
# En cas d'erreur de sauvegarde, réinitialiser le mot de passe et quitter.
if [ "$?" = "1" ] ; then
export BORG_PASSPHRASE=""
exit 1
fi
# Prune la repo de sauvegardes supplémentaires
borg prune \
-v --list --stats --keep-daily=7 --keep-weekly=4 --keep-monthly=6 \
$BORG_REPOSITORY
# Inclure espace occupé dans le journal.
# echo 'Espace occupé : ' $(df -h |egrep '/dev/mapper/vg--nas--one-sav' |awk '{print $5}')
borg list $BORG_ARCHIVE
# réinitialiser le mot de passe
export BORG_PASSPHRASE=""
echo "Fin exécution borg-backup"
exit 0
</code></pre></div></div>
<p>Droits en exécution</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo chmod +x /root/.borg/borg-backup
</code></pre></div></div>
<h2 id="erreurs">Erreurs</h2>
<p><strong>terminator</strong> <em>No module named validate</em></p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pacman <span class="nt">-S</span> devtools git <span class="c">#install devtools used to build in a clean chroot and git needed to obtain source</span>
git clone git://git.archlinux.org/svntogit/community.git <span class="nt">--single-branch</span> <span class="nt">--branch</span> <span class="s2">"packages/python-configobj"</span> <span class="c">#clone package source</span>
<span class="nb">chmod </span>777 <span class="nt">-R</span> community/trunk
<span class="nb">cd </span>community/trunk
curl <span class="nt">-o</span> PKGBUILD.diff http://ix.io/2J4c <span class="c">#download patch</span>
git apply PKGBUILD.diff
extra-x86_64-build <span class="c">#build package in a clean chroot</span>
pacman <span class="nt">-U</span> python-configobj-5.0.6-10-any.pkg.tar.zst <span class="c">#install built package</span>
<span class="nb">cd</span> ../..
<span class="nb">rm</span> <span class="nt">-r</span> community/
</code></pre></div></div>
<p><strong>Firefox - OCSP</strong><br />
<em>HTTPS connection fails with “MOZILLA_PKIX_ERROR_REQUIRED_TLS_FEATURE_MISSING”</em></p>
<p>Impossible de charger un site, message derreur semble signifier quil y a un problème avec la réponse OCSP du serveur : <em>*L“agrafage” OCSP - inclusion de la vérification de la non-révocation du certificat du serveur - est requis mais non fourni.</em></p>
<p>(1) Dans un nouvel onglet, tapez ou collez <code class="language-plaintext highlighter-rouge">about:config</code> dans la barre dadresse et appuyez sur <strong>Entrée/Retour</strong>. <br />
<em>Cliquez sur le bouton en promettant dêtre prudent.</em></p>
<p>(2) Dans la boîte de recherche située au-dessus de la liste, tapez ou collez <strong>ocsp</strong> pour filtrer</p>
<p>(3) Double-cliquez sur la préférence <strong>security.ssl.enable_ocsp_must_staple</strong> pour faire passer la valeur de <strong>true</strong> à <strong>false</strong></p>
<p>Essayez ensuite à nouveau le site, en contournant le cache (par exemple, Ctrl+Maj+r lorsque vous rechargez)</p>
<h2 id="nfs---client">NFS - Client</h2>
<p><a href="https://doc.fedora-fr.org/wiki/Partage_de_disques_en_r%C3%A9seau_avec_NFS">Partage de disques en réseau avec NFS</a></p>
<p>Installer nfs-utils avec la commande</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S nfs-utils # archlinux
sudo apt install nfs-common # debian
</code></pre></div></div>
<p>Créer un point de montage NFS</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo mkdir -p /mnt/xoyipart
</code></pre></div></div>
<p>Le partage NFS (<code class="language-plaintext highlighter-rouge">/etc/hosts</code> contient la définition du serveur : <code class="language-plaintext highlighter-rouge">192.168.0.46 xoyize.xyz</code>)</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo showmount -e xoyize.xyz
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Export list for xoyize.xyz:
/xoyipart 192.168.0.0/24
</code></pre></div></div>
<p>Montage automatique à la demande avec timeout via fstab et x-systemd</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo nano /etc/fstab
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>xoyize.xyz:/xoyipart /mnt/xoyipart/ nfs4 x-systemd.automount,x-systemd.idle-timeout=300,async 0 0
</code></pre></div></div>
<p>Montage manuel</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo mount -a
</code></pre></div></div>
<p>Le répertoire est «setgidé»<br />
<em>Quand un répertoire est «setgidé », le comportement observé change. On ne parle alors plus de droits dexécution mais dappartenance. En effet, tous les fichiers ou sous-répertoires qui seraient créés dans un tel répertoire, appartiendraient automatiquement au groupe auquel appartient le dossier. Si plusieurs utilisateurs peuvent et/ou doivent travailler dans un même répertoire par exemple, on peut positionner le droit SETGID sur ce répertoire afin que tous les utilisateurs puissent accéder à son contenu sans restrictions liées au propriétaire qui a créé le fichier ou le sous-répertoire.</em></p>
<p>Exécuter <code class="language-plaintext highlighter-rouge">groupadd</code> sur le client et ajouter un (ou plusieurs) utilisateur à ce groupe.</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>groupadd <span class="nt">-g</span> 9999 <span class="nb">local</span>
<span class="c"># ajout utilisateur au groupe</span>
<span class="nb">sudo </span>usermod <span class="nt">-a</span> <span class="nt">-G</span> <span class="nb">local</span> <span class="nv">$USER</span>
</code></pre></div></div>
<p>Vérification</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>touch /mnt/xoyipart/test
ls -la /mnt/xoyipart/
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>total 8
drwxrwsr-x 2 root local 4096 27 déc. 12:16 .
drwxr-xr-x 4 root root 4096 27 déc. 11:45 ..
-rw-rwxr-- 1 yann local 0 27 déc. 11:57 test
</code></pre></div></div>
<h2 id="container-et-machines-virtuelles">Container et Machines virtuelles</h2>
<ul>
<li><a href="/2020/12/24/Archlinux_conteneur_LXC_debian_10_(buster).html">Archlinux conteneur LXC debian 10 (buster) + Jekyll</a></li>
<li><a href="/2020/12/15/ArchLinux-KVM_QEMU-VM-debian10-vdb-statique.html">PC1 ArchLinux - VM Debian 10 vdb (jekyll-statique)</a></li>
<li>Autres liens
<ul>
<li><a href="/2020/11/26/Archlinux-KVM_QEMU-VMM.html">Archlinux KVM/QEMU - Virtual Machine Manager - Réseau (network)</a></li>
<li><a href="/2020/09/24/KVM-QEMU-virtualisation-linux-Virtual-Machine-Manager-VMM-virsh-montage-disque-VDI.html">KVM/QEMU , installation sur Archlinux et Debian - Virtual Machine Manager (VMM) et virsh</a></li>
<li><a href="/2020/12/20/MX19-Installer_image_virtuelle_QEMU_KVM.html">MX19 - Installer une image virtuelle KVM sur un poste archlinux</a></li>
</ul>
</li>
</ul>
<h2 id="rsync-serveur-backup-xoyazxyz">Rsync serveur backup xoyaz.xyz</h2>
<p><em>Des dossiers et sous-dossiers sont partagés par sshfs sur le serveur backup xoyaz.xyz</em></p>
<p>Les dossiers partagés par xoyaz.xyz</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/home/usernl/backup
├── BiblioCalibre
├── CalibreTechnique
├── musique
├── static
└── www
├── diceware
└── osm-new
</code></pre></div></div>
<p>Synchro des dossiers suivants avec le serveur backup</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/srv/hdd2g/data/
├── BiblioCalibre
├── CalibreTechnique
├── diceware
├── music
├── osm-new
</code></pre></div></div>
<p>Le fichier <code class="language-plaintext highlighter-rouge">~/scripts/synchro-PC1-Backup.sh</code></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># Synchro CalibreTechnique avec Backup - CalibreTechnique_backup.sh
rsync -avz --progress --stats --human-readable --delete --rsync-path="sudo rsync" -e "ssh -p 55036 -i /home/yann/.ssh/OVZ-STORAGE-128 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" /srv/hdd2g/data/CalibreTechnique/* usernl@xoyaz.xyz:/home/usernl/backup/CalibreTechnique/
# Synchro BiblioCalibre avec Backup - BiblioCalibre_backup.sh
rsync -avz --progress --stats --human-readable --delete --rsync-path="sudo rsync" -e "ssh -p 55036 -i /home/yann/.ssh/OVZ-STORAGE-128 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" /srv/hdd2g/data/BiblioCalibre/* usernl@xoyaz.xyz:/home/usernl/backup/BiblioCalibre/
# Synchro osm-new avec Backup - osm-new_backup.sh
rsync -avz --progress --stats --human-readable --delete --rsync-path="sudo rsync" -e "ssh -p 55036 -i /home/yann/.ssh/OVZ-STORAGE-128 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" /srv/hdd2g/data/osm-new/* usernl@xoyaz.xyz:/home/usernl/backup/www/osm-new/
# Synchro osm-new avec Backup - osm-new_backup.sh
rsync -avz --progress --stats --human-readable --delete --rsync-path="sudo rsync" -e "ssh -p 55036 -i /home/yann/.ssh/OVZ-STORAGE-128 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" /srv/hdd2g/data/diceware/* usernl@xoyaz.xyz:/home/usernl/backup/www/diceware/
# Synchro music avec Backup - music_backup.sh
#rsync -avz --progress --stats --human-readable --delete --rsync-path="sudo rsync" -e "ssh -p 55036 -i /home/yann/.ssh/OVZ-STORAGE-128 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" /srv/hdd2g/data/music/* usernl@xoyaz.xyz:/home/usernl/backup/musique/
</code></pre></div></div>
<h2 id="synthèse">Synthèse</h2>
<p><strong>LVM (pvs vgs et lvs)</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[root@archyan yann]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 ct120bx lvm2 a-- &lt;111,01g &lt;71,01g
/dev/sdb1 ssd-512 lvm2 a-- &lt;476,94g 0
/dev/sdc3 vg-nas-one lvm2 a-- &lt;3,64t 1,05t
[root@archyan yann]# vgs
VG #PV #LV #SN Attr VSize VFree
ct120bx 1 1 0 wz--n- &lt;111,01g &lt;71,01g
ssd-512 1 1 0 wz--n- &lt;476,94g 0
vg-nas-one 1 3 0 wz--n- &lt;3,64t 1,05t
[root@archyan yann]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
roota ct120bx -wi-ao---- 40,00g
virtuel ssd-512 -wi-ao---- &lt;476,94g
hdd2g vg-nas-one -wi-ao---- 2,00t
home vg-nas-one -wi-ao---- 100,00g
sav vg-nas-one -wi-ao---- 500,00g
</code></pre></div></div>
<p><strong>/etc/fstab, fdisk , lsblk</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[root@archyan yann]# cat /etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.
# &lt;file system&gt; &lt;dir&gt; &lt;type&gt; &lt;options&gt; &lt;dump&gt; &lt;pass&gt;
# /dev/mapper/ct120bx-roota
UUID=61386735-88b3-4914-a187-9788f586ec9d / ext4 rw,relatime 0 1
# /dev/mapper/vg--nas--one-home
UUID=93bf5c7d-9771-4813-83af-07b0ec6481ce /home ext4 rw,relatime 0 2
# /dev/sda2
UUID=acc31be7-0f49-4ac9-9780-832f099ed89a /boot ext4 rw,relatime,stripe=4 0 2
# /dev/sda1
UUID=6A27-3B90 /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/mapper/ssd--512-virtuel
UUID=84bc1aa9-23ac-4530-b861-bc33171b7b42 /srv/virtuel ext4 defaults 0 2
# /dev/mapper/vg--nas--one-sav
UUID=c5b9eefc-1daa-4a0d-8a72-6169b3c8c91f /srv/sav ext4 defaults 0 2
# /dev/mapper/hdd--2g-lvhdd - Montage disque mobile hdd 2G
# UUID=1fa41668-dfd3-476b-8bf9-387d172c7db5 /srv/hdd2g ext4 defaults 0 2
# /dev/vg-nas-one/hdd2g - Volume logique hdd2g du disque 4To
UUID=14e98a75-5b75-4d5b-8874-edd7fdea4aff /srv/hdd2g ext4 defaults 0 2
# dossiers _posts ,images et files
/home/yann/media/statique /var/lib/lxc/lxcbuster/rootfs/home/lxcdeb/statique none bind 0 0
# partage NFS sur xoyize.xyz
192.168.0.46:/xoyipart /mnt/xoyipart/ nfs4 x-systemd.automount,x-systemd.idle-timeout=300,async 0 0
</code></pre></div></div>
<p><strong>fdisk</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[root@archyan yann]# fdisk -l |grep "Disque /dev"
Disque /dev/sda : 111,79 GiB, 120034123776 octets, 234441648 secteurs
Disque /dev/sdb : 476,94 GiB, 512110190592 octets, 1000215216 secteurs
Disque /dev/sdc : 3,64 TiB, 4000787030016 octets, 7814037168 secteurs
Disque /dev/mapper/ct120bx-roota : 40 GiB, 42949672960 octets, 83886080 secteurs
Disque /dev/mapper/ssd--512-virtuel : 476,94 GiB, 512107741184 octets, 1000210432 secteurs
Disque /dev/mapper/vg--nas--one-sav : 500 GiB, 536870912000 octets, 1048576000 secteurs
Disque /dev/mapper/vg--nas--one-home : 100 GiB, 107374182400 octets, 209715200 secteurs
Disque /dev/mapper/vg--nas--one-hdd2g : 2 TiB, 2199023255552 octets, 4294967296 secteurs
</code></pre></div></div>
<p><strong>df</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[root@archyan yann]# df -h
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
dev 7,8G 0 7,8G 0% /dev
run 7,8G 1,3M 7,8G 1% /run
/dev/mapper/ct120bx-roota 40G 20G 18G 54% /
tmpfs 7,8G 1,2M 7,8G 1% /dev/shm
tmpfs 4,0M 0 4,0M 0% /sys/fs/cgroup
tmpfs 7,8G 28K 7,8G 1% /tmp
/dev/sda2 270M 77M 176M 31% /boot
/dev/sda1 511M 144K 511M 1% /boot/efi
/dev/mapper/ssd--512-virtuel 469G 177G 269G 40% /srv/virtuel
/dev/mapper/vg--nas--one-hdd2g 2,0T 351G 1,6T 19% /srv/hdd2g
/dev/mapper/vg--nas--one-home 98G 26G 68G 28% /home
/dev/mapper/vg--nas--one-sav 492G 223G 244G 48% /srv/sav
tmpfs 1,6G 60K 1,6G 1% /run/user/1000
</code></pre></div></div>
<p><strong>lsblk</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[root@archyan yann]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 111,8G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
├─sda2 8:2 0 287M 0 part /boot
└─sda3 8:3 0 111G 0 part
└─ct120bx-roota 254:0 0 40G 0 lvm /
sdb 8:16 0 476,9G 0 disk
└─sdb1 8:17 0 476,9G 0 part
└─ssd--512-virtuel 254:1 0 476,9G 0 lvm /srv/virtuel
sdc 8:32 0 3,6T 0 disk
├─sdc1 8:33 0 50M 0 part
└─sdc3 8:35 0 3,6T 0 part
├─vg--nas--one-sav 254:2 0 500G 0 lvm /srv/sav
├─vg--nas--one-home 254:3 0 100G 0 lvm /home
└─vg--nas--one-hdd2g 254:4 0 2T 0 lvm /srv/hdd2g
</code></pre></div></div>
<p><strong>Alias</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[yann@archyan ~]$ alias
alias audio='youtube-dl --extract-audio --audio-format m4a --audio-quality 0 --output "~/Musique/%(title)s.%(ext)s"'
alias audiomp3='youtube-dl --extract-audio --audio-format mp3 --audio-quality 0 --output "~/Musique/%(title)s.%(ext)s"'
alias cryfs-autostart='/home/yann/scripts/cryfs-autostart'
alias dnsleak='/home/yann/scripts/dnsleaktest.sh'
alias ls='ls --color=auto'
alias nmapl='sudo nmap -T4 -sP 192.168.0.0/24'
alias odt2html='/home/yann/Documents/odt2html+index/_odt2html+index'
alias off2htm='/home/yann/scripts/office2html.sh'
alias otp='/home/yann/scripts/generer-code-2fa-vers-presse-papier-toutes-les-30s.sh'
alias posturl='/home/yann/scripts/posturl'
alias rename='/home/yann/scripts/remplacer-les-espaces-accents-dans-une-expression.sh'
alias service='systemctl --type=service'
alias sshm='/home/yann/scripts/ssh-manager.sh'
alias sshsyn='/home/yann/scripts/synchro-ssh-xoyize.xyz.sh'
alias sslxc='/home/yann/scripts/sslxc'
alias ssvbox='/home/yann/scripts/ssvbox'
alias static='sshm vdb exe '\''sudo systemctl restart yannstatic.service'\'''
alias tmuxlxc='xterm -rv -geometry 100x30+100+350 -T yannstatic -e '\''/home/yann/scripts/tmux-lxc.sh'\'''
alias tmuxssh='/home/yann/scripts/tmux-ssd.sh'
alias tmuxvdb='xterm -geometry 100x30+100+350 -T yannstatic -e '\''/home/yann/scripts/tmux-vdb.sh'\'''
alias traduc='/home/yann/scripts/traduction-page-internet'
alias vnc='/home/yann/scripts/sshvnc.sh'
alias wgkey='/home/yann/scripts/generer_jeu_cle_wireguard.sh'
alias youtube='youtube-dl -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" --output "~/Vidéos/%(title)s.%(ext)s" --ignore-errors'
</code></pre></div></div>
<p><strong>Liste des liens</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[root@archyan yann]# ls -l / |grep '^l' | awk '{print $9, " ", $10, $11;}'
bin -&gt; usr/bin
files -&gt; /home/yann/media/statique/files
images -&gt; /home/yann/media/statique/images
lib -&gt; usr/lib
lib64 -&gt; usr/lib
sbin -&gt; usr/bin
[root@archyan yann]# ls -l /usr/local/bin/ |grep '^l' | awk '{print $9, " ", $10, $11;}'
borglist -&gt; /home/yann/scripts/borglist
wing-personal7.2 -&gt; ../../../opt/wing-personal/wing-personal
[root@archyan yann]# ls -l /home/yann |grep '^l' | awk '{print $9, " ", $10, $11;}'
sav -&gt; /srv/sav
srv_hdd2g -&gt; /srv/hdd2g
virtuel -&gt; /srv/virtuel
[root@archyan yann]# ls -l /home/yann/media |grep '^l' | awk '{print $9, " ", $10, $11;}'
BiblioCalibre -&gt; /srv/hdd2g/data/BiblioCalibre
CalibreTechnique -&gt; /srv/hdd2g/data/CalibreTechnique
devel -&gt; /srv/hdd2g/data/devel
dplus -&gt; /srv/hdd2g/data/dplus
music -&gt; /srv/hdd2g/data/music
</code></pre></div></div>
</div>
<div class="d-print-none"><footer class="article__footer"><meta itemprop="dateModified" content="2020-11-25T00:00:00+01:00"><!-- start custom article footer snippet -->
<!-- end custom article footer snippet -->
<!--
<div align="right"><a type="application/rss+xml" href="/feed.xml" title="S'abonner"><i class="fa fa-rss fa-2x"></i></a>
&emsp;</div>
-->
</footer>
<div class="article__section-navigator clearfix"><div class="previous"><span>PRÉCÉDENT</span><a href="/2020/11/22/VPS-Hetzner-CX21-4GoRam-40GoSSD_debian_10.html">HETZNER VPS CX21 4Go RAM 40Go SSD debian 10 yunohost (yanfi.space,yanfi.net et cinay.eu)</a></div><div class="next"><span>SUIVANT</span><a href="/2020/11/29/Linux-Systemd-cheatsheet.html">Linux - Systemd cheatsheet</a></div></div></div>
</div>
<script>(function() {
var SOURCES = window.TEXT_VARIABLES.sources;
window.Lazyload.js(SOURCES.jquery, function() {
$(function() {
var $this ,$scroll;
var $articleContent = $('.js-article-content');
var hasSidebar = $('.js-page-root').hasClass('layout--page--sidebar');
var scroll = hasSidebar ? '.js-page-main' : 'html, body';
$scroll = $(scroll);
$articleContent.find('.highlight').each(function() {
$this = $(this);
$this.attr('data-lang', $this.find('code').attr('data-lang'));
});
$articleContent.find('h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]').each(function() {
$this = $(this);
$this.append($('<a class="anchor d-print-none" aria-hidden="true"></a>').html('<i class="fas fa-anchor"></i>'));
});
$articleContent.on('click', '.anchor', function() {
$scroll.scrollToAnchor('#' + $(this).parent().attr('id'), 400);
});
});
});
})();
</script>
</div><section class="page__comments d-print-none"></section></article><!-- start custom main bottom snippet -->
<!-- end custom main bottom snippet -->
</div>
</div></div></div></div>
</div><script>(function() {
var SOURCES = window.TEXT_VARIABLES.sources;
window.Lazyload.js(SOURCES.jquery, function() {
var $body = $('body'), $window = $(window);
var $pageRoot = $('.js-page-root'), $pageMain = $('.js-page-main');
var activeCount = 0;
function modal(options) {
var $root = this, visible, onChange, hideWhenWindowScroll = false;
var scrollTop;
function setOptions(options) {
var _options = options || {};
visible = _options.initialVisible === undefined ? false : show;
onChange = _options.onChange;
hideWhenWindowScroll = _options.hideWhenWindowScroll;
}
function init() {
setState(visible);
}
function setState(isShow) {
if (isShow === visible) {
return;
}
visible = isShow;
if (visible) {
activeCount++;
scrollTop = $(window).scrollTop() || $pageMain.scrollTop();
$root.addClass('modal--show');
$pageMain.scrollTop(scrollTop);
activeCount === 1 && ($pageRoot.addClass('show-modal'), $body.addClass('of-hidden'));
hideWhenWindowScroll && window.hasEvent('touchstart') && $window.on('scroll', hide);
$window.on('keyup', handleKeyup);
} else {
activeCount > 0 && activeCount--;
$root.removeClass('modal--show');
$window.scrollTop(scrollTop);
activeCount === 0 && ($pageRoot.removeClass('show-modal'), $body.removeClass('of-hidden'));
hideWhenWindowScroll && window.hasEvent('touchstart') && $window.off('scroll', hide);
$window.off('keyup', handleKeyup);
}
onChange && onChange(visible);
}
function show() {
setState(true);
}
function hide() {
setState(false);
}
function handleKeyup(e) {
// Char Code: 27 ESC
if (e.which === 27) {
hide();
}
}
setOptions(options);
init();
return {
show: show,
hide: hide,
$el: $root
};
}
$.fn.modal = modal;
});
})();
</script><div class="modal modal--overflow page__search-modal d-print-none js-page-search-modal"><script>
(function () {
var SOURCES = window.TEXT_VARIABLES.sources;
window.Lazyload.js(SOURCES.jquery, function() {
// search panel
var search = (window.search || (window.search = {}));
var useDefaultSearchBox = window.useDefaultSearchBox === undefined ?
true : window.useDefaultSearchBox ;
var $searchModal = $('.js-page-search-modal');
var $searchToggle = $('.js-search-toggle');
var searchModal = $searchModal.modal({ onChange: handleModalChange, hideWhenWindowScroll: true });
var modalVisible = false;
search.searchModal = searchModal;
var $searchBox = null;
var $searchInput = null;
var $searchClear = null;
function getModalVisible() {
return modalVisible;
}
search.getModalVisible = getModalVisible;
function handleModalChange(visible) {
modalVisible = visible;
if (visible) {
search.onShow && search.onShow();
useDefaultSearchBox && $searchInput[0] && $searchInput[0].focus();
} else {
search.onShow && search.onHide();
useDefaultSearchBox && $searchInput[0] && $searchInput[0].blur();
setTimeout(function() {
useDefaultSearchBox && ($searchInput.val(''), $searchBox.removeClass('not-empty'));
search.clear && search.clear();
window.pageAsideAffix && window.pageAsideAffix.refresh();
}, 400);
}
}
$searchToggle.on('click', function() {
modalVisible ? searchModal.hide() : searchModal.show();
});
// Char Code: 83 S, 191 /
$(window).on('keyup', function(e) {
if (!modalVisible && !window.isFormElement(e.target || e.srcElement) && (e.which === 83 || e.which === 191)) {
modalVisible || searchModal.show();
}
});
if (useDefaultSearchBox) {
$searchBox = $('.js-search-box');
$searchInput = $searchBox.children('input');
$searchClear = $searchBox.children('.js-icon-clear');
search.getSearchInput = function() {
return $searchInput.get(0);
};
search.getVal = function() {
return $searchInput.val();
};
search.setVal = function(val) {
$searchInput.val(val);
};
$searchInput.on('focus', function() {
$(this).addClass('focus');
});
$searchInput.on('blur', function() {
$(this).removeClass('focus');
});
$searchInput.on('input', window.throttle(function() {
var val = $(this).val();
if (val === '' || typeof val !== 'string') {
search.clear && search.clear();
} else {
$searchBox.addClass('not-empty');
search.onInputNotEmpty && search.onInputNotEmpty(val);
}
}, 400));
$searchClear.on('click', function() {
$searchInput.val(''); $searchBox.removeClass('not-empty');
search.clear && search.clear();
});
}
});
})();
</script><div class="search search--dark">
<div class="main">
<div class="search__header">Recherche</div>
<div class="search-bar">
<div class="search-box js-search-box">
<div class="search-box__icon-search"><i class="fas fa-search"></i></div>
<input id="search-input" type="text" />
<div class="search-box__icon-clear js-icon-clear">
<a><i class="fas fa-times"></i></a>
</div>
</div>
<button class="button button--theme-dark button--pill search__cancel js-search-toggle">
Annuler</button>
</div>
<div id="results-container" class="search-result js-search-result"></div>
</div>
</div>
<!-- Script pointing to search-script.js -->
<script>/*!
* Simple-Jekyll-Search
* Copyright 2015-2020, Christian Fei
* Licensed under the MIT License.
*/
(function(){
'use strict'
var _$Templater_7 = {
compile: compile,
setOptions: setOptions
}
const options = {}
options.pattern = /\{(.*?)\}/g
options.template = ''
options.middleware = function () {}
function setOptions (_options) {
options.pattern = _options.pattern || options.pattern
options.template = _options.template || options.template
if (typeof _options.middleware === 'function') {
options.middleware = _options.middleware
}
}
function compile (data) {
return options.template.replace(options.pattern, function (match, prop) {
const value = options.middleware(prop, data[prop], options.template)
if (typeof value !== 'undefined') {
return value
}
return data[prop] || match
})
}
'use strict';
function fuzzysearch (needle, haystack) {
var tlen = haystack.length;
var qlen = needle.length;
if (qlen > tlen) {
return false;
}
if (qlen === tlen) {
return needle === haystack;
}
outer: for (var i = 0, j = 0; i < qlen; i++) {
var nch = needle.charCodeAt(i);
while (j < tlen) {
if (haystack.charCodeAt(j++) === nch) {
continue outer;
}
}
return false;
}
return true;
}
var _$fuzzysearch_1 = fuzzysearch;
'use strict'
/* removed: const _$fuzzysearch_1 = require('fuzzysearch') */;
var _$FuzzySearchStrategy_5 = new FuzzySearchStrategy()
function FuzzySearchStrategy () {
this.matches = function (string, crit) {
return _$fuzzysearch_1(crit.toLowerCase(), string.toLowerCase())
}
}
'use strict'
var _$LiteralSearchStrategy_6 = new LiteralSearchStrategy()
function LiteralSearchStrategy () {
this.matches = function (str, crit) {
if (!str) return false
str = str.trim().toLowerCase()
crit = crit.trim().toLowerCase()
return crit.split(' ').filter(function (word) {
return str.indexOf(word) >= 0
}).length === crit.split(' ').length
}
}
'use strict'
var _$Repository_4 = {
put: put,
clear: clear,
search: search,
setOptions: __setOptions_4
}
/* removed: const _$FuzzySearchStrategy_5 = require('./SearchStrategies/FuzzySearchStrategy') */;
/* removed: const _$LiteralSearchStrategy_6 = require('./SearchStrategies/LiteralSearchStrategy') */;
function NoSort () {
return 0
}
const data = []
let opt = {}
opt.fuzzy = false
opt.limit = 10
opt.searchStrategy = opt.fuzzy ? _$FuzzySearchStrategy_5 : _$LiteralSearchStrategy_6
opt.sort = NoSort
opt.exclude = []
function put (data) {
if (isObject(data)) {
return addObject(data)
}
if (isArray(data)) {
return addArray(data)
}
return undefined
}
function clear () {
data.length = 0
return data
}
function isObject (obj) {
return Boolean(obj) && Object.prototype.toString.call(obj) === '[object Object]'
}
function isArray (obj) {
return Boolean(obj) && Object.prototype.toString.call(obj) === '[object Array]'
}
function addObject (_data) {
data.push(_data)
return data
}
function addArray (_data) {
const added = []
clear()
for (let i = 0, len = _data.length; i < len; i++) {
if (isObject(_data[i])) {
added.push(addObject(_data[i]))
}
}
return added
}
function search (crit) {
if (!crit) {
return []
}
return findMatches(data, crit, opt.searchStrategy, opt).sort(opt.sort)
}
function __setOptions_4 (_opt) {
opt = _opt || {}
opt.fuzzy = _opt.fuzzy || false
opt.limit = _opt.limit || 10
opt.searchStrategy = _opt.fuzzy ? _$FuzzySearchStrategy_5 : _$LiteralSearchStrategy_6
opt.sort = _opt.sort || NoSort
opt.exclude = _opt.exclude || []
}
function findMatches (data, crit, strategy, opt) {
const matches = []
for (let i = 0; i < data.length && matches.length < opt.limit; i++) {
const match = findMatchesInObject(data[i], crit, strategy, opt)
if (match) {
matches.push(match)
}
}
return matches
}
function findMatchesInObject (obj, crit, strategy, opt) {
for (const key in obj) {
if (!isExcluded(obj[key], opt.exclude) && strategy.matches(obj[key], crit)) {
return obj
}
}
}
function isExcluded (term, excludedTerms) {
for (let i = 0, len = excludedTerms.length; i < len; i++) {
const excludedTerm = excludedTerms[i]
if (new RegExp(excludedTerm).test(term)) {
return true
}
}
return false
}
/* globals ActiveXObject:false */
'use strict'
var _$JSONLoader_2 = {
load: load
}
function load (location, callback) {
const xhr = getXHR()
xhr.open('GET', location, true)
xhr.onreadystatechange = createStateChangeListener(xhr, callback)
xhr.send()
}
function createStateChangeListener (xhr, callback) {
return function () {
if (xhr.readyState === 4 && xhr.status === 200) {
try {
callback(null, JSON.parse(xhr.responseText))
} catch (err) {
callback(err, null)
}
}
}
}
function getXHR () {
return window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP')
}
'use strict'
var _$OptionsValidator_3 = function OptionsValidator (params) {
if (!validateParams(params)) {
throw new Error('-- OptionsValidator: required options missing')
}
if (!(this instanceof OptionsValidator)) {
return new OptionsValidator(params)
}
const requiredOptions = params.required
this.getRequiredOptions = function () {
return requiredOptions
}
this.validate = function (parameters) {
const errors = []
requiredOptions.forEach(function (requiredOptionName) {
if (typeof parameters[requiredOptionName] === 'undefined') {
errors.push(requiredOptionName)
}
})
return errors
}
function validateParams (params) {
if (!params) {
return false
}
return typeof params.required !== 'undefined' && params.required instanceof Array
}
}
'use strict'
var _$utils_9 = {
merge: merge,
isJSON: isJSON
}
function merge (defaultParams, mergeParams) {
const mergedOptions = {}
for (const option in defaultParams) {
mergedOptions[option] = defaultParams[option]
if (typeof mergeParams[option] !== 'undefined') {
mergedOptions[option] = mergeParams[option]
}
}
return mergedOptions
}
function isJSON (json) {
try {
if (json instanceof Object && JSON.parse(JSON.stringify(json))) {
return true
}
return false
} catch (err) {
return false
}
}
var _$src_8 = {};
(function (window) {
'use strict'
let options = {
searchInput: null,
resultsContainer: null,
json: [],
success: Function.prototype,
searchResultTemplate: '<li><a href="{url}" title="{desc}">{title}</a></li>',
templateMiddleware: Function.prototype,
sortMiddleware: function () {
return 0
},
noResultsText: 'No results found',
limit: 10,
fuzzy: false,
debounceTime: null,
exclude: []
}
let debounceTimerHandle
const debounce = function (func, delayMillis) {
if (delayMillis) {
clearTimeout(debounceTimerHandle)
debounceTimerHandle = setTimeout(func, delayMillis)
} else {
func.call()
}
}
const requiredOptions = ['searchInput', 'resultsContainer', 'json']
/* removed: const _$Templater_7 = require('./Templater') */;
/* removed: const _$Repository_4 = require('./Repository') */;
/* removed: const _$JSONLoader_2 = require('./JSONLoader') */;
const optionsValidator = _$OptionsValidator_3({
required: requiredOptions
})
/* removed: const _$utils_9 = require('./utils') */;
window.SimpleJekyllSearch = function (_options) {
const errors = optionsValidator.validate(_options)
if (errors.length > 0) {
throwError('You must specify the following required options: ' + requiredOptions)
}
options = _$utils_9.merge(options, _options)
_$Templater_7.setOptions({
template: options.searchResultTemplate,
middleware: options.templateMiddleware
})
_$Repository_4.setOptions({
fuzzy: options.fuzzy,
limit: options.limit,
sort: options.sortMiddleware,
exclude: options.exclude
})
if (_$utils_9.isJSON(options.json)) {
initWithJSON(options.json)
} else {
initWithURL(options.json)
}
const rv = {
search: search
}
typeof options.success === 'function' && options.success.call(rv)
return rv
}
function initWithJSON (json) {
_$Repository_4.put(json)
registerInput()
}
function initWithURL (url) {
_$JSONLoader_2.load(url, function (err, json) {
if (err) {
throwError('failed to get JSON (' + url + ')')
}
initWithJSON(json)
})
}
function emptyResultsContainer () {
options.resultsContainer.innerHTML = ''
}
function appendToResultsContainer (text) {
options.resultsContainer.innerHTML += text
}
function registerInput () {
options.searchInput.addEventListener('input', function (e) {
if (isWhitelistedKey(e.which)) {
emptyResultsContainer()
debounce(function () { search(e.target.value) }, options.debounceTime)
}
})
}
function search (query) {
if (isValidQuery(query)) {
emptyResultsContainer()
render(_$Repository_4.search(query), query)
}
}
function render (results, query) {
const len = results.length
if (len === 0) {
return appendToResultsContainer(options.noResultsText)
}
for (let i = 0; i < len; i++) {
results[i].query = query
appendToResultsContainer(_$Templater_7.compile(results[i]))
}
}
function isValidQuery (query) {
return query && query.length > 0
}
function isWhitelistedKey (key) {
return [13, 16, 20, 37, 38, 39, 40, 91].indexOf(key) === -1
}
function throwError (message) {
throw new Error('SimpleJekyllSearch --- ' + message)
}
})(window)
}());
</script>
<!-- Configuration -->
<script>
SimpleJekyllSearch({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
noResultsText: '<p>Aucun résultat!</p>',
json: '/search.json',
searchResultTemplate: '<li><a href="{url}">{date}&nbsp;{title}</a>&nbsp;(Création {create})</li>'
})
</script>
</div></div>
<script>(function() {
var SOURCES = window.TEXT_VARIABLES.sources;
window.Lazyload.js(SOURCES.jquery, function() {
function scrollToAnchor(anchor, duration, callback) {
var $root = this;
$root.animate({ scrollTop: $(anchor).position().top }, duration, function() {
window.history.replaceState(null, '', window.location.href.split('#')[0] + anchor);
callback && callback();
});
}
$.fn.scrollToAnchor = scrollToAnchor;
});
})();
(function() {
var SOURCES = window.TEXT_VARIABLES.sources;
window.Lazyload.js(SOURCES.jquery, function() {
function affix(options) {
var $root = this, $window = $(window), $scrollTarget, $scroll,
offsetBottom = 0, scrollTarget = window, scroll = window.document, disabled = false, isOverallScroller = true,
rootTop, rootLeft, rootHeight, scrollBottom, rootBottomTop,
hasInit = false, curState;
function setOptions(options) {
var _options = options || {};
_options.offsetBottom && (offsetBottom = _options.offsetBottom);
_options.scrollTarget && (scrollTarget = _options.scrollTarget);
_options.scroll && (scroll = _options.scroll);
_options.disabled !== undefined && (disabled = _options.disabled);
$scrollTarget = $(scrollTarget);
isOverallScroller = window.isOverallScroller($scrollTarget[0]);
$scroll = $(scroll);
}
function preCalc() {
top();
rootHeight = $root.outerHeight();
rootTop = $root.offset().top + (isOverallScroller ? 0 : $scrollTarget.scrollTop());
rootLeft = $root.offset().left;
}
function calc(needPreCalc) {
needPreCalc && preCalc();
scrollBottom = $scroll.outerHeight() - offsetBottom - rootHeight;
rootBottomTop = scrollBottom - rootTop;
}
function top() {
if (curState !== 'top') {
$root.removeClass('fixed').css({
left: 0,
top: 0
});
curState = 'top';
}
}
function fixed() {
if (curState !== 'fixed') {
$root.addClass('fixed').css({
left: rootLeft + 'px',
top: 0
});
curState = 'fixed';
}
}
function bottom() {
if (curState !== 'bottom') {
$root.removeClass('fixed').css({
left: 0,
top: rootBottomTop + 'px'
});
curState = 'bottom';
}
}
function setState() {
var scrollTop = $scrollTarget.scrollTop();
if (scrollTop >= rootTop && scrollTop <= scrollBottom) {
fixed();
} else if (scrollTop < rootTop) {
top();
} else {
bottom();
}
}
function init() {
if(!hasInit) {
var interval, timeout;
calc(true); setState();
// run calc every 100 millisecond
interval = setInterval(function() {
calc();
}, 100);
timeout = setTimeout(function() {
clearInterval(interval);
}, 45000);
window.pageLoad.then(function() {
setTimeout(function() {
clearInterval(interval);
clearTimeout(timeout);
}, 3000);
});
$scrollTarget.on('scroll', function() {
disabled || setState();
});
$window.on('resize', function() {
disabled || (calc(true), setState());
});
hasInit = true;
}
}
setOptions(options);
if (!disabled) {
init();
}
$window.on('resize', window.throttle(function() {
init();
}, 200));
return {
setOptions: setOptions,
refresh: function() {
calc(true, { animation: false }); setState();
}
};
}
$.fn.affix = affix;
});
})();
(function() {
var SOURCES = window.TEXT_VARIABLES.sources;
window.Lazyload.js(SOURCES.jquery, function() {
function toc(options) {
var $root = this, $window = $(window), $scrollTarget, $scroller, $tocUl = $('<ul class="toc toc--ellipsis"></ul>'), $tocLi, $headings, $activeLast, $activeCur,
selectors = 'h1,h2,h3', container = 'body', scrollTarget = window, scroller = 'html, body', disabled = false,
headingsPos, scrolling = false, hasRendered = false, hasInit = false;
function setOptions(options) {
var _options = options || {};
_options.selectors && (selectors = _options.selectors);
_options.container && (container = _options.container);
_options.scrollTarget && (scrollTarget = _options.scrollTarget);
_options.scroller && (scroller = _options.scroller);
_options.disabled !== undefined && (disabled = _options.disabled);
$headings = $(container).find(selectors).filter('[id]');
$scrollTarget = $(scrollTarget);
$scroller = $(scroller);
}
function calc() {
headingsPos = [];
$headings.each(function() {
headingsPos.push(Math.floor($(this).position().top));
});
}
function setState(element, disabled) {
var scrollTop = $scrollTarget.scrollTop(), i;
if (disabled || !headingsPos || headingsPos.length < 1) { return; }
if (element) {
$activeCur = element;
} else {
for (i = 0; i < headingsPos.length; i++) {
if (scrollTop >= headingsPos[i]) {
$activeCur = $tocLi.eq(i);
} else {
$activeCur || ($activeCur = $tocLi.eq(i));
break;
}
}
}
$activeLast && $activeLast.removeClass('active');
($activeLast = $activeCur).addClass('active');
}
function render() {
if(!hasRendered) {
$root.append($tocUl);
$headings.each(function() {
var $this = $(this);
$tocUl.append($('<li></li>').addClass('toc-' + $this.prop('tagName').toLowerCase())
.append($('<a></a>').text($this.text()).attr('href', '#' + $this.prop('id'))));
});
$tocLi = $tocUl.children('li');
$tocUl.on('click', 'a', function(e) {
e.preventDefault();
var $this = $(this);
scrolling = true;
setState($this.parent());
$scroller.scrollToAnchor($this.attr('href'), 400, function() {
scrolling = false;
});
});
}
hasRendered = true;
}
function init() {
var interval, timeout;
if(!hasInit) {
render(); calc(); setState(null, scrolling);
// run calc every 100 millisecond
interval = setInterval(function() {
calc();
}, 100);
timeout = setTimeout(function() {
clearInterval(interval);
}, 45000);
window.pageLoad.then(function() {
setTimeout(function() {
clearInterval(interval);
clearTimeout(timeout);
}, 3000);
});
$scrollTarget.on('scroll', function() {
disabled || setState(null, scrolling);
});
$window.on('resize', window.throttle(function() {
if (!disabled) {
render(); calc(); setState(null, scrolling);
}
}, 100));
}
hasInit = true;
}
setOptions(options);
if (!disabled) {
init();
}
$window.on('resize', window.throttle(function() {
init();
}, 200));
return {
setOptions: setOptions
};
}
$.fn.toc = toc;
});
})();
/*(function () {
})();*/
</script><script>
/* toc must before affix, since affix need to konw toc' height. */(function() {
var SOURCES = window.TEXT_VARIABLES.sources;
var TOC_SELECTOR = window.TEXT_VARIABLES.site.toc.selectors;
window.Lazyload.js(SOURCES.jquery, function() {
var $window = $(window);
var $articleContent = $('.js-article-content');
var $tocRoot = $('.js-toc-root'), $col2 = $('.js-col-aside');
var toc;
var tocDisabled = false;
var hasSidebar = $('.js-page-root').hasClass('layout--page--sidebar');
var hasToc = $articleContent.find(TOC_SELECTOR).length > 0;
function disabled() {
return $col2.css('display') === 'none' || !hasToc;
}
tocDisabled = disabled();
toc = $tocRoot.toc({
selectors: TOC_SELECTOR,
container: $articleContent,
scrollTarget: hasSidebar ? '.js-page-main' : null,
scroller: hasSidebar ? '.js-page-main' : null,
disabled: tocDisabled
});
$window.on('resize', window.throttle(function() {
tocDisabled = disabled();
toc && toc.setOptions({
disabled: tocDisabled
});
}, 100));
});
})();
(function() {
var SOURCES = window.TEXT_VARIABLES.sources;
window.Lazyload.js(SOURCES.jquery, function() {
var $window = $(window), $pageFooter = $('.js-page-footer');
var $pageAside = $('.js-page-aside');
var affix;
var tocDisabled = false;
var hasSidebar = $('.js-page-root').hasClass('layout--page--sidebar');
affix = $pageAside.affix({
offsetBottom: $pageFooter.outerHeight(),
scrollTarget: hasSidebar ? '.js-page-main' : null,
scroller: hasSidebar ? '.js-page-main' : null,
scroll: hasSidebar ? $('.js-page-main').children() : null,
disabled: tocDisabled
});
$window.on('resize', window.throttle(function() {
affix && affix.setOptions({
disabled: tocDisabled
});
}, 100));
window.pageAsideAffix = affix;
});
})();
</script><!---->
</div>
<script>(function () {
var $root = document.getElementsByClassName('root')[0];
if (window.hasEvent('touchstart')) {
$root.dataset.isTouch = true;
document.addEventListener('touchstart', function(){}, false);
}
})();
</script>
</body>
</html>