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 - YannStatic< / title >
< meta name = "description" content = "Ordinateur PC1" >
< link rel = "canonical" href = "https://static.rnmkcy.eu/2020/09/13/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 > ( f u n c t i o n ( ) {
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} {title}< / a > < / li > '
searchResultTemplate: '< li > < a href = "{url}" > {date} {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< / h1 > < / header > < / div > < meta itemprop = "headline" content = "PC1 Ordinateur Bureau ArchLinux xfce" > < 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 > < span title = "Création" style = "color:#FF00FF" > 13 sept. 2020< / span >
< span title = "Modification" style = "color:#00FF7F" > 17 nov. 2020< / span > < / li > < / ul > < / div > < meta itemprop = "datePublished" content = "2020-11-17T00: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" > ⇧ < / 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 & 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 > User’ s 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 > 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 > < 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 >
< h3 id = "processeur-mémoire-et-alimentation" > Processeur, Mémoire et 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 >
< h3 id = "bios-asus-h110m-am2" > BIOS ASUS H110M-A/M.2< / h3 >
< p > < strong > Mise à jour du bios< / strong > < / 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 > < strong > Intel Virtualization Technology (BIOS)< / strong > < / p >
< 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 > jusqu’ au 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 & reset< / strong > < / li >
< / ol >
< h2 id = "archlinux" > ArchLinux< / h2 >
< p > < img src = "/images/48px-Archlinux_logo.svg.png" alt = "" / > < / p >
< p > Boot sur clé USB 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 reste 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 > On lance fdisk< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > fdisk /dev/sda
< / code > < / pre > < / div > < / div >
< p > o créer une table de partition DOS< br / >
n ajouter une partition< br / >
Tout le disque est utilisé< br / >
Type LVM (8e)< / p >
< h3 id = "lvm" > LVM< / h3 >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > # Volume Physique (Physical Volume)
pvcreate /dev/sda1
# Groupe de Volume (Volume Group)
vgcreate ssd-vga /dev/sda1
# Volume Logiques (logical Volume)
lvcreate -L 60G -n root ssd-vga
< / code > < / pre > < / div > < / div >
< p > On utilise le volume physique ssd-512 pour le home < br / >
Reste du lvm pour homeb< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > lvcreate -l 81136 -n homeb ssd-512
< / code > < / pre > < / div > < / div >
< 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.ext4 /dev/ssd-vga/root
mkfs.ext4 /dev/ssd-512/homeb
< / 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/ssd-vga/root /mnt
< span class = "nb" > mkdir< / span > /mnt/home
mount /dev/ssd-512/homeb /mnt/home
< / code > < / pre > < / div > < / div >
< p > create: 2020-09-13
modifier le fichier < strong > /etc/pacman.d/mirrorlist< / strong > pour ne garder qu’ un 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
< / code > < / pre > < / div > < / div >
< p > NOTE : Il est possible de se connecter en ssh pour la suite de l’ installation:< / p >
< ul >
< li > Modifier le mot de passe root : < code class = "language-plaintext highlighter-rouge" > passwd< / code > < / li >
< li > Relever l’ adresse 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 > Paquets supplémentaires< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > pacstrap /mnt zip unzip p7zip alsa-utils lsb-release mc mtools dosfstools ntfs-3g exfat-utils bash-completion
< / code > < / pre > < / div > < / div >
< ul >
< li > exfat-utils pour la prise en charge des cartes SD de grande capacité< / li >
< li > ntfs-3g pour les disques formatés en ntfs< / li >
< li > mc ,explorateur de fichiers en ligne de commande< / 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 > > /mnt/etc/fstab
< / code > < / pre > < / div > < / div >
< p > chargeur de démarrage Grub2/Bios . Le paquet os-prober est indispensable pour un double démarrage.< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > pacstrap /mnt grub os-prober
< / 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 > 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 > nano /etc/vconsole.conf
< / code > < / pre > < / div > < / div >
< p > Ajouter< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > KEYMAP=fr-latin9
FONT=eurlatgr
< / 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 > fuseau horaire de Paris< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime
< / code > < / pre > < / div > < / div >
< p > on a une machine en mono-démarrage sur Archlinux, et on peut demander à ce que l’ heure 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-09-13
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 > générer le fichier de configuration grub< / 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 >
< blockquote >
< p > < em > si vous avez une « hurlante » contenant « /run/lvm/lvmetad.socket: connect failed » ou quelque chose d’ approchant, ce n’ est pas un bug. C’ est une alerte sans conséquence< / em > < / p >
< / blockquote >
< p > Installation grub en mode bios< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > grub-install --no-floppy --recheck /dev/sda
< / 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 "yannick-pc" > /etc/hostname
< / 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 > Réseau networkmanager (pour ensuite installer un environnement graphique xfce,gnome,kde,etc…)< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > pacman -Syy networkmanager
systemctl enable NetworkManager
< / code > < / pre > < / div > < / div >
< p > Créer un utilisateur ‘ yannick’ avec la commande suivante< / p >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > useradd < span class = "nt" > -m< / span > < span class = "nt" > -g< / span > < span class = "nb" > users< / span > < span class = "nt" > -c< / span > < span class = "s1" > 'yannick archlinux'< / span > < span class = "nt" > -s< / span > /bin/bash yannick
passwd yannick
< / code > < / pre > < / div > < / div >
< p > Créer un groupe ‘ yannick’ < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > groupadd yannick
< / code > < / pre > < / div > < / div >
< p > Modifier sudoers pour accès sudo sans mot de passe à l’ utilisateur< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > echo "yannick ALL=(ALL) NOPASSWD: ALL" > > /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 d’ un autre poste< / p >
< 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 > Lancer < code class = "language-plaintext highlighter-rouge" > alsamixer< / code > avec la commande du même nom, pour configurer le niveau sonore et < code class = "language-plaintext highlighter-rouge" > alsactl store< / code > pour la sauvegarde< / p >
< p > Pour l’ exécution de la ligne suivante, il est demandé de choisir un support pour OpenGL. Pour le moment, on choisit < strong > MesaGL< / strong > . La modification correspondant à votre matériel sera faite lors de l’ installation de Xorg. Ainsi que la version « libx264 » proposé en premier choix.< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo pacman -S gst-plugins-{base,good,bad,ugly} gst-libav # gst-libav prend en charge tout ce qui est x264 et apparenté.
< / code > < / pre > < / div > < / div >
< p > Installation de Xorg. Le paquet xf86-input-evdev est obsolète depuis début janvier 2017, à cause du passage à xorg-server 1.19.< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo pacman -S xorg-{server,xinit,apps} xf86-input-libinput xdg-user-dirs
< / code > < / pre > < / div > < / div >
< p > Pilote carte graphique intel< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo pacman -S xf86-video-intel
< / code > < / pre > < / div > < / div >
< p > Installation des polices.< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo pacman -S ttf-{bitstream-vera,liberation,freefont,dejavu} freetype2
< / code > < / pre > < / div > < / div >
< h3 id = "outils-et-applications" > Outils et applications< / h3 >
< p > On commence par tout ce qui est graphique : gimp, cups (gestion de l’ imprimante) et hplip (si vous avez une imprimante scanner Hewlett Packard). Le paquet python-pyqt5 est indispensable pour l’ interface graphique de HPLIP. Webkigtk2 étant indispensable pour la lecture de l’ aide 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 gimp gimp-help-fr hplip python-pyqt5 rsync firefox-i18n-fr git libreoffice-fresh-fr thunderbird-i18n-fr gptfdisk wget usbutils
sudo pacman -S qt5-webkit retext
< / 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 ne supprime pas la dépendance Go (très long en téléchargement !!!)< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > vérification des dépendances…
Paquets (1) go-2:1.11-1
Taille totale supprimée : 415,51 MiB
:: Voulez-vous désinstaller ces paquets ? [O/n] n
< / code > < / pre > < / div > < / div >
< p > Yaourt :< / p >
< p > il permet de modifier avant installation le PKGBUILD et install< br / >
Prérequis : < strong > base-devel< / strong > er < strong > git< / strong > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > git clone https://aur.archlinux.org/package-query.git
cd package-query
makepkg -si
cd ..
git clone https://aur.archlinux.org/yaourt.git
cd yaourt
makepkg -si
cd ..
< / code > < / pre > < / div > < / div >
< p > Autre alternative, Trizen (écrit en perl)< / p >
< p > Trizen :< / p >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > git clone https://aur.archlinux.org/trizen
< span class = "nb" > cd < / span > trizen
makepkg < span class = "nt" > -sri< / span >
< span class = "nb" > cd< / span > ..
< span class = "nb" > sudo rm< / span > < span class = "nt" > -r< / span > trizen
< / code > < / pre > < / div > < / div >
< p > Yay (Utiliser la version précompilée, il faut au minimun < strong > yaourt< / strong > déjà installé) :< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > yaourt -S yay-bin
< / code > < / pre > < / div > < / div >
< p > Cette version précompilée de yay est beaucoup plus rapide à installer et à maintenir…< / p >
< h4 id = "applications-supplémentaires" > Applications supplémentaires< / h4 >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > yay -S youtube-dl calibre bluefish viking android-tools bind-tools
< / code > < / pre > < / div > < / div >
< blockquote >
< p > < strong > Applications facultatives< / strong > < em > makemkv mkvtoolnix-gui sound-juicer wireshark-gtk tigervnc radiotray< / em > < br / >
et la série des paquets foomatic qui permet d’ avoir le maximum de pilotes pour l’ imprimante< br / >
< code class = "language-plaintext highlighter-rouge" > sudo pacman -S foomatic-{db,db-ppds,db-gutenprint-ppds,db-nonfree,db-nonfree-ppds} gutenprint< / code > < / p >
< / blockquote >
< h4 id = "tmux" > tmux< / h4 >
< p > Fichier des paramètres < strong > tmux< / strong > < strong > $HOME/.tmux.conf< / strong > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > #Configuration de tmux
#Origine : http://denisrosenkranz.com
#Yannick juin 2017
# Copier/Coller par la souris se fait avec la touche "Shift" appuyée
##################################
#Changements des raccourcis claviers
##################################
#On change Control +b par Control +x
#set -g prefix C-x
#unbind C-b
#bind C-x send-prefix
#On utilise control + flèches pour naviguer entre les terminaux
bind-key -n C-right next
bind-key -n C-left prev
#on utilise alt + flèches our naviguer entre les panels
bind-key -n M-left select-pane -L
bind-key -n M-right select-pane -R
bind-key -n M-up select-pane -U
bind-key -n M-down select-pane -D
#On change les raccourcis pour faire du split vertical et horizontal
#On utilise la touche "|" (pipe) pour faire un split vertical
bind | split-window -h
#Et la touche "-" pour faire un split horizontal
bind - split-window -v
##################################
#Changements pratiques
##################################
#On permet l'utilisation de la souris pour changer de terminal et de panel
set -g mouse on
#Les fenêtres commencent par 1 et non par 0
set -g base-index 1
##################################
#Changements visuels
##################################
#On met les panneaux non actif en gris
set -g pane-border-fg colour244
set -g pane-border-bg default
#On met le panneau actif en rouge
set -g pane-active-border-fg colour124
set -g pane-active-border-bg default
#On met la barre de status en gris
set -g status-fg colour235
set -g status-bg colour250
set -g status-attr dim
# On surligne les fenêtres actives dans la barre de status en gris foncés
set-window-option -g window-status-current-fg colour15
set-window-option -g window-status-current-bg colour0
< / code > < / pre > < / div > < / div >
< h4 id = "udisks" > udisks< / h4 >
< p > < em > udisks fournit un démon udisksd, qui implémente les interfaces D-Bus utilisées pour interroger et manipuler les périphériques de stockage, et un outil en ligne de commande < strong > udisksctl< / strong > , utilisé pour interroger et utiliser le démon< / em > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > udisksctl status
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > MODEL REVISION SERIAL DEVICE
--------------------------------------------------------------------------
CT120BX300SSD1 M2CR010 1745E1065D62 sda
Crucial_CT512MX100SSD1 MU01 15100EE439E5 sdb
WDC WD40EFRX-68WT0N0 82.00A82 WD-WCC4E4RXRNAV sdc
LITEONIT LCT-128M3S VQDC TW0K11MF5508528S3714 sdd
ST2000LM007-1R8174 SBK2 WDZGGVZA sdf
< / code > < / pre > < / div > < / div >
< p > Créer le dossier< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo mkdir /media
< / code > < / pre > < / div > < / div >
< p > Par défaut, udisks2 monte les disques amovibles (sde dans la liste) sous le répertoire contrôlé par ACL /run/media/$USER/. Si vous souhaitez monter sur /media à la place, utilisez cette règle :< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo nano /etc/udev/rules.d/99-udisks2.rules
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > # UDISKS_FILESYSTEM_SHARED
# ==1: mount filesystem to a shared directory (/media/VolumeName)
# ==0: mount filesystem to a private directory (/run/media/$USER/VolumeName)
# See udisks(8)
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{UDISKS_FILESYSTEM_SHARED}="1"
< / code > < / pre > < / div > < / div >
< p > Puisque /media, contrairement à /run, n’ est pas monté par défaut en tmpfs, vous pouvez également créer un extrait de tmpfiles.d pour nettoyer les points de montage obsolètes à chaque démarrage :< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo nano /etc/tmpfiles.d/media.conf
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > D /media 0755 root root 0 -
< / code > < / pre > < / div > < / div >
< h4 id = "exfat" > exFAT< / h4 >
< p > < em > L’ exFAT (ou FAT64) est le dernier système de fichier de Microsoft (donc propriétaire) pour les mémoires flash.
Il a surtout permis de dépasser la limite de 4 Gio par fichier du FAT32< / em > < / p >
< p > Pour la portabilité d’ une unité de stockage amovible la plus universelle possible , il faut choisir le bon système de fichiers< / p >
< table >
< thead >
< tr >
< th > Système de fichiers< / th >
< th > Windows XP< / th >
< th > Windows 7/8/10< / th >
< th > macOS (10.6.4 et antérieures)< / th >
< th > macOS (10.6.5 et ultérieures)< / th >
< th > Linux< / th >
< th > Playstation 4< / th >
< th > Xbox 360/One< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > NTFS< / td >
< td > Oui< / td >
< td > Oui< / td >
< td > Lecture Seul< / td >
< td > Lecture Seul< / td >
< td > Oui< / td >
< td > Non< / td >
< td > Non/Oui< / td >
< / tr >
< tr >
< td > FAT32< / td >
< td > Oui< / td >
< td > Oui< / td >
< td > Oui< / td >
< td > Oui< / td >
< td > Oui< / td >
< td > Oui< / td >
< td > Oui/Oui< / td >
< / tr >
< tr >
< td > exFAT< / td >
< td > Oui< / td >
< td > Oui< / td >
< td > Non< / td >
< td > Oui< / td >
< td > Oui (avec paquet ExFAT)< / td >
< td > Oui (avec MBR, pas GUID)< / td >
< td > Non/Oui< / td >
< / tr >
< tr >
< td > HFS+< / td >
< td > Non< / td >
< td > (Lecture Seul avec Boot Camp)< / td >
< td > Oui< / td >
< td > Oui< / td >
< td > Oui< / td >
< td > Non< / td >
< td > Oui< / td >
< / tr >
< tr >
< td > APFS< / td >
< td > Non< / td >
< td > Non< / td >
< td > Non< / td >
< td > Oui (macOS 10.13 ou sup)< / td >
< td > Non< / td >
< td > Non< / td >
< td > Non< / td >
< / tr >
< tr >
< td > EXT 2, 3, 4< / td >
< td > Non< / td >
< td > Oui (avec logiciel tierce)< / td >
< td > Non< / td >
< td > Non< / td >
< td > Oui< / td >
< td > Non< / td >
< td > Oui< / td >
< / tr >
< / tbody >
< / table >
< p > L’ unité externe présente , disque USB3/2 To système de fichiers extFAT< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > yay -S exfat-utils
< / code > < / pre > < / div > < / div >
< h4 id = "cryfs-facultatif" > CryFS (Facultatif)< / h4 >
< p > Chiffrer les dossiers avant dépôt sur Nextcloud< / p >
< ul >
< li > < a href = "/2019/09/15/CryFS-Chiffrement.html" > Chiffrement CryFs< / a > < / li >
< / ul >
< p > Installer CryFS< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > yay -S cryfs
< / code > < / pre > < / div > < / div >
< p > Créer un dossier < strong > cryfs-chiffre< / strong > qui sera chiffré et accessible dans Nextcloud< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > mkdir -p ~/media/dplus/statique/cryfs-chiffre
< / code > < / pre > < / div > < / div >
< p > Créer le dossier “mount” < strong > .chiffre< / strong > avec le contenu de < strong > cryfs-chiffre< / strong > après déchiffrage< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > mkdir -p ~/.chiffre
< / code > < / pre > < / div > < / div >
< p > Montage et démontage manuel< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > cryfs ~/media/dplus/statique/cryfs-chiffre ~/.chiffre # montage : saisir le mot de passe
cryfs-unmount "~/.chiffre" # démontage
< / code > < / pre > < / div > < / div >
< p > Montage automatique à l’ ouverture d’ une session utilisateur, créer un bash “~/scripts/cryfs-autostart”< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > nano ~/scripts/cryfs-autostart
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > #!/bin/bash
export CRYFS_FRONTEND=noninteractive
export CRYFS_NO_UPDATE_CHECK=noninteractive
BASE_DIR="${HOME}/media/dplus/statique/cryfs-chiffre"
MOUNT_DIR="${HOME}/.chiffre"
PASSWORD="Mot-de-Passe"
if [ ! -d "$MOUNT_DIR" ]; then
mkdir $MOUNT_DIR
fi
echo $PASSWORD | cryfs $BASE_DIR $MOUNT_DIR & > /dev/null
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > chmod +x ${HOME}/scripts/cryfs-autostart
sudo ln -s ${HOME}/scripts/cryfs-autostart /usr/local/bin/cryfs-autostart
< / code > < / pre > < / div > < / div >
< p > On place l’ unit propre à un utilisateur dans le dossier < strong > ~/.config/systemd/user< / strong > , créer le dossier< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > mkdir -p ~/.config/systemd/user
< / code > < / pre > < / div > < / div >
< p > Le fichier unit < strong > cryfs-autostart.service< / strong > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > nano ~/.config/systemd/user/cryfs-autostart.service
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > [Unit]
Description=CryFS mount.
[Service]
ExecStart=/usr/local/bin/cryfs-autostart
ExecStop=cryfs-unmount "${HOME}/.chiffre"
Type=forking
Restart=always
[Install]
WantedBy=default.target
< / code > < / pre > < / div > < / div >
< p > Une fois ce fichier placé au bon endroit, il suffit de reloader systemd pour ensuite démarrer le service:< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > systemctl --user daemon-reload
systemctl start --user cryfs-autostart.service
systemctl enable --user cryfs-autostart.service
systemctl status --user cryfs-autostart.service
< / code > < / pre > < / div > < / div >
< h3 id = "timedatectl-synchro-serveur-de-temps" > timedatectl (synchro serveur de temps)< / h3 >
< ul >
< li > < a href = "https://wiki.archlinux.org/index.php/Systemd-timesyncd" > systemd-timesyncd< / a > < / li >
< / ul >
< p > Avant synchronisation< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > timedatectl
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > Local time: jeu. 2018-09-27 08:13:11 CEST
Universal time: jeu. 2018-09-27 06:13:11 UTC
RTC time: jeu. 2018-09-27 06:13:12
Time zone: Europe/Paris (CEST, +0200)
System clock synchronized: no
NTP service: inactive
RTC in local TZ: no
< / code > < / pre > < / div > < / div >
< p > Editer du fichier de configuration timesyncd.conf :< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo nano /etc/systemd/timesyncd.conf
< / code > < / pre > < / div > < / div >
< p > Définir les serveurs de temps :< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > [Time]
NTP=
FallbackNTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
RootDistanceMaxSec=5
PollIntervalMinSec=32
PollIntervalMaxSec=2048
< / code > < / pre > < / div > < / div >
< p > Activer et lancer la synchronisation< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl enable systemd-timesyncd
sudo systemctl start systemd-timesyncd
< / code > < / pre > < / div > < / div >
< p > Après synchronisation (attendre 1 minute avant d’ exécuter la commande suivante)< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > timedatectl
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > Local time: jeu. 2018-09-27 08:18:23 CEST
Universal time: jeu. 2018-09-27 06:18:23 UTC
RTC time: jeu. 2018-09-27 06:18:23
Time zone: Europe/Paris (CEST, +0200)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
< / code > < / pre > < / div > < / div >
< h3 id = "services-à-activer" > Services à activer< / h3 >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > #systemctl enable syslog-ng@default # gestion des fichiers d’ enregistrement d'activité
#systemctl enable cronie # pour les tâches récurrentes
#systemctl enable bluetooth # uniquement si on a du matériel bluetooth
sudo systemctl enable avahi-daemon # dépendance de Cups
sudo systemctl enable avahi-dnsconfd # autre dépendance de Cups
sudo systemctl enable org.cups.cupsd # cups pour les imprimantes
< / code > < / pre > < / div > < / div >
< h3 id = "historique-ligne-de-commande" > Historique ligne de commande< / h3 >
< p > Ajoutez la recherche d’ historique 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 l’ historique 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 >
< h2 id = "xfce" > XFCE< / h2 >
< p > < img src = "/images/Xfce_logo.png" alt = "" width = "100" / > < / p >
< h3 id = "bureau-xfce--applications" > Bureau XFCE + applications< / h3 >
< 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 > Installer Xfce avec vlc (vidéo), pulseaudio, etc…< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo pacman -S xfce4 xfce4-goodies gvfs vlc xarchiver galculator evince ffmpegthumbnailer xscreensaver system-config-printer python2-pyinotify pavucontrol pulseaudio pulseaudio-alsa # pulseaudio-bluetooth
< / code > < / pre > < / div > < / div >
< p > < strong > network-manager-applet< / strong > pour la gestion des connexions réseau ,< strong > keepassxc< / strong > pour la gestion des mots de passe< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo pacman -S gedit keepassxc terminator filezilla nmap minicom iw network-manager-applet zenity tmux #cheese menulibre
< / code > < / pre > < / div > < / div >
< 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 l’ utilisateur 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 >
< h4 id = "lvm-1" > LVM< / h4 >
< p > < em > Logical Volume Manager, ou gestionnaire de volumes logiques en français< / em > < / p >
< p > < strong > Volumes physiques< / strong > < br / >
< em > Un volume physique ou « PV » pour « physical volume » est tout simplement un disque ou une partition< / em > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > PV VG Fmt Attr PSize PFree
/dev/sda1 ssd-vga lvm2 a-- < 111,79g < 51,79g
/dev/sdb1 ssd-512 lvm2 a-- < 476,94g 0
/dev/sdc3 vg-nas-one lvm2 a-- < 3,64t 2,00t
< / code > < / pre > < / div > < / div >
< p > < strong > Groupes de volumes< / strong > < br / >
< em > Un groupe de volumes ou « VG » pour « volume group » est, comme son nom l’ indique, un ensemble de volumes physiques< / em > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > VG #PV #LV #SN Attr VSize VFree
ssd-512 1 2 0 wz--n- < 476,94g 0
ssd-vga 1 1 0 wz--n- < 111,79g < 51,79g
vg-nas-one 1 2 0 wz--n- < 3,64t 2,00t
< / code > < / pre > < / div > < / div >
< p > < strong > Volumes logiques< / strong > < br / >
< em > Un volume logique ou « LV » pour « logical volume » est ce que nous allons utiliser au final< / em > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
homea ssd-512 -wi-ao---- 160,00g
homeb ssd-512 -wi-ao---- < 316,94g
root ssd-vga -wi-ao---- 60,00g
virtuel vg-nas-one -wi-ao---- 1,15t
yanplus vg-nas-one -wi-ao---- 500,00g
< / code > < / pre > < / div > < / div >
< h4 id = "dossiers-de-partage-fstab-et-liens" > Dossiers de partage, fstab et liens< / h4 >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo chown $USER.users -R /mnt
sudo mkdir -p /srv/{video,serie,savlocal,virtuel}
sudo chown $USER.users -R /srv/{video,serie,savlocal,virtuel}
< / code > < / pre > < / div > < / div >
< p > Modification /etc/fstab< / 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 > # /dev/mapper/ssd--vga-root
UUID=a6f5dd58-3970-4209-8412-6bfbf1356a03 / ext4 rw,relatime 0 1
# /dev/mapper/ssd--512-homeb
UUID=a3271162-298f-45d9-82f2-e30478991079 /home ext4 rw,relatime 0 2
#
#UUID=c6ab468e-ed7b-491e-b7c3-010a70816d0c
/dev/mapper/vg--nas--one-yanplus /home/yannick/media ext4 defaults 0 2
#
#UUID=bfb64d50-9590-49e5-b3ef-afb8c9baba90
/dev/mapper/vg--nas--one-virtuel /srv/virtuel ext4 defaults 0 2
#
< / code > < / pre > < / div > < / div >
< p > Montage< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo mount -a
< / code > < / pre > < / div > < / div >
< p > Créer les liens media → /mnt , Sauvegarde-Locale → /srv/savlocal , virtuel → /srv/virtuel< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo ln -s /mnt /home/$USER/media
sudo ln -s /srv/savlocal $HOME/Sauvegarde-Locale
sudo ln -s /srv/virtuel $HOME/virtuel
< / code > < / pre > < / div > < / div >
< h4 id = "personnaliser-xfce" > Personnaliser XFCE< / h4 >
< 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 #numix-gtk-theme< / code > < / li >
< li > Icônes et thème “matcha” : < code class = "language-plaintext highlighter-rouge" > yay -S matcha-gtk-theme< / code > < / 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 d’ alimentation< / 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 > 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 (+) – > < 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 d’ espace de travail< / strong > ,< em > Paramètres des espaces de travail< / em > à 2 , décocher < em > Changer d’ espace…< / em > < / li >
< li > < strong > Boutons d’ action< / 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 d’ une ligne (pixels) < strong > 25< / strong > < / li >
< / ul >
< / li >
< / ul >
< p > Après validation tableau de bord, clic droit sur icône capture écran puis Propriétés -> 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 d’ une 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 -> Emulateur de terminal : < strong > /usr/bin/terminator “%s”< / strong > < / li >
< / ul >
< p > Menu Paramètres – > 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 >
< p > Gestionnaire de fichier < strong > Thunar< / strong > < / p >
< ul >
< li > Edition – > Préférence ,ongle < strong > Comportement< / strong > < em > Ouvrir le dossier dans un nouvel onglet< / em > < / li >
< / ul >
< p > < img src = "/images/thunar-prefer1.png" alt = "image" width = "300px" / > < / p >
< p > Fonction recherche ,installer les logiciels< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo pacman -S catfish mlocate
< / code > < / pre > < / div > < / div >
< ul >
< li > Edition – > Configurer les actions personnalisées ,ajouter (+)< / li >
< / ul >
< p > < img src = "/images/thunar-prefer2.png" alt = "image" width = "300px" / > < img src = "/images/thunar-prefer3.png" alt = "image" width = "300px" / > < / p >
< h4 id = "client-nextcloud" > Client Nextcloud< / h4 >
< p > Installation client nextcloud< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > yay -S nextcloud-client # opération compilation "longue" en durée , patienter!!!
sudo pacman -S gnome-keyring libgnome-keyring
< / code > < / pre > < / div > < / div >
< p > Démarrer le client owncloud , après avoir renseigné l’ url ,login et mot de passe pour la connexion< br / >
Il faut renseigner “le mot de passe du nouveau trousseau de clés” , mettre le même mot de passe que celui de l’ ouverture de session.< / p >
< p > Les dossiers synchronisés < a href = "https://cinay.xyz/nextcloud" > https://cinay.xyz/nextcloud< / a > :< / p >
< ul >
< li > Créer le dossier < code class = "language-plaintext highlighter-rouge" > mkdir -p $HOME/{.keepassx}< / code > , Home/.keepassx – > ~/.keepassx< / li >
< / ul >
< h4 id = "keepassxc" > keepassxc< / h4 >
< p > Ouvrir menu xfce et lancer < strong > KeePassXC< / strong > < br / >
Base ~/.keepassx/yannick_xc.kdbx< br / >
Clé ~/.ssh/yannick_keepassxc.key< / p >
< h4 id = "liens-scripts-usrlocalbin" > Liens scripts (/usr/local/bin)< / h4 >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "c" > #Créer des liens sur /usr/local/bin pour les scripts < / span >
< span class = "nb" > sudo ln< / span > < span class = "nt" > -s< / span > < span class = "nv" > $HOME< / span > /scripts/ssh-manager.sh /usr/local/bin/sshm
< span class = "nb" > sudo ln< / span > < span class = "nt" > -s< / span > < span class = "nv" > $HOME< / span > /scripts/savlog.sh /usr/local/bin/savlog
< 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 > /home/yannick/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 >
< h4 id = "dossier-private--ecryptfs" > Dossier Private (ecryptfs)< / h4 >
< p > < img src = "/images/logo-ecryptfs.png" alt = "" width = "100" / > < br / >
< em > Ecryptfs est un outil pour créer un dossier privé (~/Private), chiffré et inaccessible aux autres utilisateurs, il est destiné à contenir tous les fichiers “sensibles”< / em > < / p >
< p > Installer le paquet ecryptfs-utils.< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo pacman -S ecryptfs-utils
< / code > < / pre > < / div > < / div >
< p > Copier les dossiers < em > .Private Private et .ecryptfs< / em > du répertoire de sauvegarde vers $HOME< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo cp -a /srv/savlocal/yannick-pc/{.Private,Private,.ecryptfs} $HOME
< / code > < / pre > < / div > < / div >
< p > Une fois ces paquets installés, vous devez charger le module ecryptfs (archlinux/manjaro)< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo modprobe ecryptfs
< / code > < / pre > < / div > < / div >
< p > Configuration PAM< / p >
< p > Vérifier ou créer (touch) les fichiers < strong > ~/.ecryptfs/auto-mount, ~/.ecryptfs/auto-umount et ~/.ecryptfs/wrapped-passphrase< / strong > (créer avec utilitaire ecryptfs-setup-private).< br / >
Ajouter ecryptfs au pam exactement comme ce qui suit pour que la login passphrase ne soit plus demandée :< br / >
Ouvrir /etc/pam.d/system-auth< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo nano /etc/pam.d/system-auth
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > #%PAM-1.0
auth required pam_unix.so try_first_pass nullok
auth required pam_ecryptfs.so unwrap
auth optional pam_permit.so
auth required pam_env.so
account required pam_unix.so
account optional pam_permit.so
account required pam_time.so
password optional pam_ecryptfs.so
password required pam_unix.so try_first_pass nullok sha512 shadow
password optional pam_permit.so
session required pam_limits.so
session required pam_unix.so
session optional pam_ecryptfs.so
session optional pam_permit.so
< / code > < / pre > < / div > < / div >
< blockquote >
< p > Les lignes ajoutées sont celles qui contiennent < strong > pam_ecryptfs< / strong > < / p >
< / blockquote >
< p > Sauvegarde , déconnexion ,reconnexion et vérifier la sortie du < code class = "language-plaintext highlighter-rouge" > mount< / code > qui doit contenir une ligne du type < strong > /home/yannick/.Private on /home/yannick/Private type ecryptfs (rw,nosuid…< / strong > < / p >
< h4 id = "sshfs" > SSHFS< / h4 >
< 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-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "nb" > sudo mkdir< / span > < span class = "nt" > -p< / span > /media/< span class = "o" > {< / span > cinay.pw,cinay.xyz,yanfi.net< span class = "o" > }< / span >
< span class = "nb" > sudo chown< / span > < span class = "nv" > $USER< / span > .users /media/< span class = "o" > {< / span > cinay.pw,cinay.xyz,yanfi.net< span class = "o" > }< / span >
< / code > < / pre > < / div > < / div >
< h4 id = "veille-écran" > Veille écran< / h4 >
< p > Installer par défaut sur archlinux (xscreensaver)< / p >
< p > Création d’ un script pour < strong > Activer/Désactiver< / strong > le programme de mise en veille < strong > xscreensaver< / strong > < br / >
Prérequis : < strong > zenity< / strong > ,installé par défaut sous Manjaro< 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 > &
< 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/yannick/scripts/veille.sh< / span >
< span class = "py" > Path< / span > < span class = "p" > =< / span > < span class = "s" > /home/yannick/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 l’ icône choisi sans extension ni chemin pour le paramètre < strong > Icon< / strong > < / p >
< / blockquote >
< h4 id = "son" > Son< / h4 >
< 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 l’ expression “sortie audio hdmi” dans le champ recherche du site< / p >
< h4 id = "impression" > Impression< / h4 >
< p > Si l’ imprimante est connectée directement à votre système ou si vous avez accès à une imprimante réseau IPP, un serveur CUPS local est utilisé.
Vérifier que les 3 services suivants sont < strong > enabled< / strong > et < strong > active (running)< / strong > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > systemctl status {avahi-daemon,avahi-dnsconfd,org.cups.cupsd}
< / code > < / pre > < / div > < / div >
< p > Sinon< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl enable avahi-daemon # dépendance de Cups
sudo systemctl enable avahi-dnsconfd # autre dépendance de Cups
sudo systemctl enable org.cups.cupsd # cups pour les imprimantes
sudo systemctl start avahi-daemon # dépendance de Cups
sudo systemctl start avahi-dnsconfd # autre dépendance de Cups
sudo systemctl start org.cups.cupsd # cups pour les imprimantes
< / code > < / pre > < / div > < / div >
< 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 sane xsane xsane-gimp
< / code > < / pre > < / div > < / div >
< p > Imprimante réseau HP< / p >
< p > Lancer “HP Device Manager”< / 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 > < img src = "/images/hp5.png" alt = "image" width = "300px" / > < / p >
< h4 id = "journalctl" > Journalctl< / h4 >
< 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" > > /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 s’ est 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 >
< h4 id = "virtualbox-facultatif" > VirtualBox (Facultatif)< / h4 >
< ul >
< li > < a href = "/2019/08/16/VirtualBox.html" > VirtualBox< / a > < / li >
< / ul >
< p > Installation< / p >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "nb" > sudo < / span > pacman < span class = "nt" > -S< / span > linux-headers < span class = "c" > # utiliser par DKMS< / span >
< span class = "nb" > sudo < / span > pacman < span class = "nt" > -S< / span > virtualbox
< / code > < / pre > < / div > < / div >
< p > Sélectionner < strong > 1< / strong > : < strong > virtualbox-host-dkms< / strong > < br / >
Après installation, entrez la commande suivante pour ajouter le module Virtualbox au noyau :< / p >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "nb" > sudo < / span > modprobe vboxdrv
< / code > < / pre > < / div > < / div >
< p > ajouter le compte utilisateur personnel au groupe d’ utilisateurs vbox :< / p >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "nb" > sudo < / span > gpasswd < span class = "nt" > -a< / span > < span class = "nv" > $USER< / span > vboxusers
< / code > < / pre > < / div > < / div >
< p > Création du dossier Partage< / p >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "nb" > mkdir< / span > < span class = "nt" > -p< / span > ~/Partage
< / code > < / pre > < / div > < / div >
< blockquote >
< p > < strong > Impératif, vous devez maintenant redémarrer votre système pour que les modifications prennent effet.< / strong > < / p >
< / blockquote >
< h4 id = "images-fond-écranconnexion-et-grub" > Images (fond écran,connexion et grub)< / h4 >
< 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* /usr/share/backgrounds/xfce/ # fond écran sharp
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 >
< h4 id = "ecran-connexion-lightdm" > Ecran connexion (lightDM)< / h4 >
< 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 – > Paramètres – > LightDM GTK+ Paramètres d’ Apparence< / li >
< / ul >
< p > < img src = "/images/lightdm1.png" alt = "image" width = "300px" / > < / p >
< h4 id = "ecran-de-boot-grub" > Ecran de boot (grub)< / h4 >
< 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/archlinux1024x600.png /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/archlinux1024x600.png"
< / code > < / pre > < / div > < / div >
< p > Reconfigurer grub pour la prise en charge de l’ image< / 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 = "les-applications-supplémentaires" > Les applications supplémentaires< / h3 >
< ul >
< li > < strong > Menulibre< / strong > pour éditer les .desktop xfce : < code class = "language-plaintext highlighter-rouge" > yay -S menulibre< / code > < / li >
< li > < strong > Nmap< / strong > : < code class = "language-plaintext highlighter-rouge" > yay -S nmap< / code > < / li >
< li > Gestionnaire de fichiers à 2 fenêtres < code class = "language-plaintext highlighter-rouge" > yay -S doublecmd-gtk2< / code > < / li >
< li > < strong > Edition, développement, conversion< / strong >
< ul >
< li > < a href = "https://wingware.com/downloads/wing-personal" > Wing Personal Python IDE< / a >
< ul >
< li > Télécharger et décompresser la version linux (ex wing-personal-7.1.2.0-linux-x64.tar.bz2)< / li >
< li > 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 > < / li >
< / ul >
< / li >
< li > < strong > KiCad< / 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 > < / li >
< / ul >
< / li >
< li > < strong > Torrent< / strong >
< ul >
< li > < strong > qbittorent< / strong > < code class = "language-plaintext highlighter-rouge" > sudo pacman -S qbittorrent< / code > < / li >
< / ul >
< / li >
< / ul >
< h4 id = "copie-décran-flameshot" > Copie d’ écran (Flameshot)< / h4 >
< p > < strong > < a href = "https://github.com/lupoDharkael/flameshot" > Flameshot< / a > < / strong > c’ est 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 = "qr-code" > QR code< / h4 >
< ul >
< li > < a href = "/2019/02/17/QR-Code-barres-definition-encodage-decodage.html" > QR Code (code-barres) définition, encodage et décodage< / a > < / li >
< / ul >
< p > < em > La première chose à faire va être d’ installer 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 >
< h3 id = "trucs-et-astuces" > Trucs et astuces< / h3 >
< 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 d’ Internet.< / em > < / p >
< p > Premier lancement ,bibliothèque sous < strong > ~/media/BiblioCalibre< / strong > < / p >
< h4 id = "paramétrer-minicom" > Paramétrer minicom< / h4 >
< p > Paramétrage de l’ application 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 >
< h4 id = "pacman" > Pacman< / h4 >
< ul >
< li > Ignorer la mise à jour d’ un paquet sous archlinux ,mettre le paquet dans < em > IgnorePkg< / em > du < strong > /etc/pacman.conf< / strong > < / li >
< / ul >
< h4 id = "nano-comme-éditeur-par-défaut" > Nano comme éditeur par défaut< / h4 >
< 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" > > ~/.bashrc
< / code > < / pre > < / div > < / div >
< h2 id = "borg-sauvegarde-home-pc1" > Borg sauvegarde home PC1< / h2 >
< 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 borg étant dans les dépôts Community il suffit de:< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo pacman -S borg
< / code > < / pre > < / div > < / div >
< p > Optionnels recommandés :< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo pacman -S 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 l’ utilisateur 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/sav/borg-backups< / strong > (lien ~/media/sav/borg-backups) : dossier des dépôts< / li >
< / ul >
< p > Créer les dossiers< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo mkdir -p /srv/sav/borg-backups /root/.borg
sudo chown $USER.$USER -R /srv/sav/borg-backups
< / code > < / pre > < / div > < / div >
< p > Création d’ un 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 d’ un 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/yannick/Bureau
/home/yannick/Modèles
/home/yannick/Partage
/home/yannick/Public
/home/yannick/Téléchargements
/home/yannick/Vidéos
/home/yannick/temp
/home/yannick/vps
/home/yannick/media
/home/yannick/VirtualBox\ VMs
< / code > < / pre > < / div > < / div >
< p > < strong > Initialisation dépôt< / strong > “yannick-pc” de sauvegarde chiffré, la “phrase de passe” sera demandée< / 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/sav/borg-backups/yannick-pc
borg init < span class = "nt" > --encryption< / span > < span class = "o" > =< / span > repokey-blake2 /srv/sav/borg-backups/yannick-pc
< / 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 d’ environnement, 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=/mnt/lacie/data/borg-backups/yannick-pc
BACKUP_DATE=`date +%Y-%m-%d-%Hh%M`
echo "Exécution borg-backup yannick-pc $BACKUP_DATE"
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/yannick
# 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 >
< p > < strong > Utiliser Borg avec SystemD service + timer< / strong > < br / >
Pour une automatisation en utilisant systemd :< / p >
< ul >
< li > vous devez créer un fichier < strong > borg-backup.service< / strong > et le mettre dans le dossier < em > /etc/systemd/system/system/< / em > < / li >
< li > Pour une exécution régulière (parce que ce n’ est pas un processus “daemon”), un fichier < strong > borg-backup.timer< / strong > , dans le même dossier que < strong > borg-backup.service< / strong > < / li >
< li > Le nom de fichier avant le suffixe “.service” et “.timer” doit correspondre pour que systemd reconnaisse ce qu’ il doit faire.< / li >
< / ul >
< p > < strong > Service : /etc/systemd/system/borg-backup.service< / strong > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > [Unit]
Description=Borg Backup Service
After=network-online.target
[Service]
Type=simple
ExecStart=/bin/bash /root/.borg/borg-backup
StandardError=journal
# TimeoutStartSec= configure le délai d'attente pour attendre le démarrage du service.
TimeoutStartSec=600
[Install]
# niveau d'exécution multi utilisateur
WantedBy=multi-user.target
< / code > < / pre > < / div > < / div >
< p > Adapter User= et Group= dans le fichier borg-backup.service pour un utilisateur qui a les droits sur la sauvegarde. Exécuter le service par défaut mettrait la propriété root:root sur la sauvegarde.< / p >
< p > Il est possible de tester le service avec un simple< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl daemon-reload # on vient de créer un nouveau service
sudo systemctl start borg-backup.service
< / code > < / pre > < / div > < / div >
< p > l’ état de votre système de sauvegarde< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > systemctl status borg-backup
< / code > < / pre > < / div > < / div >
< p > Le journal< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > journalctl -u borg-backup
< / code > < / pre > < / div > < / div >
< p > Valider le service < em > borg-backup.service< / em > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl enable borg-backup
< / code > < / pre > < / div > < / div >
< p > < strong > Timer : /etc/systemd/system/borg-backup.timer< / strong > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > [Unit]
Description=Borg Backup Timer
[Timer]
#
OnBootSec=15min
OnUnitActiveSec=1d
Unit=borg-backup.service
[Install]
WantedBy=timers.target
< / code > < / pre > < / div > < / div >
< ul >
< li > < strong > Install< / strong > va créer la dépendance pour que votre “timer” soit bien exécuté et pris en compte par systemd.< / li >
< li > < strong > OnActiveSec=< / strong > définit une minuterie par rapport au moment où la minuterie elle-même est activée.< / li >
< li > < strong > OnBootSec=< / strong > définit une temporisation relative au démarrage de la machine.< / li >
< li > < strong > OnStartupSec=< / strong > définit une minuterie relative à la date du premier démarrage de systemd.< / li >
< li > < strong > OnUnitActiveSec=< / strong > définit une minuterie relative à l’ unité dans laquelle la minuterie est utilisée.a été activée pour la dernière fois.< / li >
< li > < strong > OnUnitInactiveSec=< / strong > définit une temporisation relative à lorsque l’ unité que la minuterie est en train d’ activer a été désactivée pour la dernière fois.< / li >
< / ul >
< blockquote >
< p > Plusieurs directives peuvent être combinées du même type et de types différents. Pour par exemple, en combinant OnBootSec= et OnUnitActiveSec=, il est possible de définir une minuterie qui s’ écoule à intervalles réguliers et active un service spécifique à chaque fois du temps.< / p >
< / blockquote >
< p > Les arguments des directives sont des intervalles de temps configurés en secondes. < br / >
Exemple : “OnBootSec=50” signifie 50 s après le démarrage. L’ argument peut aussi inclure le temps unités. < br / >
Exemple : “OnBootSec=5h 30min” signifie 5 heures et 30 minutes après que boot-up.< / p >
< p > < strong > Activation et démarrage du timer< / strong > < / p >
< p > Ensuite, pour qu’ il soit actif, il faut prévenir systemd< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl enable borg-backup.timer
sudo systemctl start borg-backup.timer
< / code > < / pre > < / div > < / div >
< p > Vous pouvez vérifier quand votre prochaine sauvegarde se déclenchera à l’ aide des minuteries< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > systemctl list-timers
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > NEXT LEFT LAST PASSED UNIT AC>
Wed 2019-12-11 13:15:52 CET 23h left Tue 2019-12-10 13:15:52 CET 8s ago borg-backup.timer bo>
< / code > < / pre > < / div > < / div >
< p > < strong > Débloquer un dépôt BORG verrouillé< / strong > < / p >
< p > Exemple , déblocage du dépôt < strong > yannick-pc< / strong > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > export BORG_PASSPHRASE="`cat ~root/.borg/passphrase`"
export BORG_RSH='ssh -i /root/.ssh/yannick-pc_ed25519'
BORG_REPOSITORY=ssh://borg@xoyaz.xyz:55036/srv/data/borg-backups/yannick-pc
borg break-lock $BORG_REPOSITORY
< / code > < / pre > < / div > < / div >
< h2 id = "nfs" > NFS< / h2 >
< h4 id = "autofspc1-nfs" > AutoFS/PC1 (NFS)< / h4 >
< p > < em > AutoFS contrôle les opérations des démons d’ automount. Les démons d’ automount montent automatiquement des systèmes de fichiers quand ils sont employés et les démontent après une période d’ inactivité.< / em > < / p >
< p > Vérifier ou installer nfs-utils< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo pacman -S nfs-utils
< / code > < / pre > < / div > < / div >
< p > Installer AutoFS< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo pacman -S autofs
< / code > < / pre > < / div > < / div >
< p > Reconnaissance auto des montages NFS< br / >
Modifier < strong > /etc/hosts< / strong > pour ajouter une ligne avec IP serveur NFS et un nom “dns” ,< strong > xoyize< / strong > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > 192.168.0.46 xoyize
< / code > < / pre > < / div > < / div >
< p > < strong > AutoFS< / strong > utilise des fichiers de modèles pour la configuration qui sont situés dans < em > /etc/autofs< / em > Le modèle principal est appelé < strong > auto.master< / strong > , qui peut pointer vers un ou plusieurs autres modèles pour des types de médias spécifiques.< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo nano /etc/autofs/auto.master
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > # This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
## /misc /etc/autofs/auto.misc
#
# NOTE: mounts done from a hosts map will be mounted with the
# "nosuid" and "nodev" options unless the "suid" and "dev"
# options are explicitly given.
#
/net -hosts
< / code > < / pre > < / div > < / div >
< blockquote >
< p > NOTE: “– timeout=60” est facultatif< / p >
< / blockquote >
< p > Démarrer le service autofs< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl start autofs
< / code > < / pre > < / div > < / div >
< p > Vérifier la reconnaissance des montages NFS qui correspond au showmount< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > ls -l /net/xoyize/data/
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > total 16
drwx------ 2 yannick yannick 16384 11 août 16:56 lost+found
< / code > < / pre > < / div > < / div >
< p > Activer le service autofs< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl enable autofs
< / code > < / pre > < / div > < / div >
< h4 id = "dossiers-partagés-par-pc1" > Dossiers partagés par PC1< / h4 >
< p > Dossiers partagés NFS serveur/PC1 (yannick-pc : 192.168.0.28)< / p >
< p > Pour configurer archlinux en serveur NFS , il faut activer le service et le lancer< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl enable nfs-server.service
sudo systemctl start nfs-server.service
< / code > < / pre > < / div > < / div >
< p > Créer des partages NFS sur archlinux< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo nano /etc/exports
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > # Use `exportfs -arv` to reload.
/home/yannick/Partage 192.168.0.0/24(rw,sync,no_subtree_check,no_root_squash)
/mnt/lacie/data/borg-backups 192.168.0.0/24(rw,sync,no_subtree_check,no_root_squash)
/mnt/lacie/data/devel 192.168.0.0/24(rw,sync,no_subtree_check,no_root_squash)
< / code > < / pre > < / div > < / div >
< p > Puis recharger< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo exportfs -arv
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > exporting 192.168.0.0/24:/home/yannick/Partage
< / code > < / pre > < / div > < / div >
< p > Visualiser< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > showmount -e
< / code > < / pre > < / div > < / div >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > Export list < span class = "k" > for < / span > yannick-pc:
/mnt/lacie/data/devel 192.168.0.0/24
/mnt/lacie/data/borg-backups 192.168.0.0/24
/home/yannick/Partage 192.168.0.0/24
< / code > < / pre > < / div > < / div >
< p > Relancer le serveur si erreur < code class = "language-plaintext highlighter-rouge" > clnt_create: RPC: Program not registered< / code > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl restart nfs-server.service
< / code > < / pre > < / div > < / div >
< h2 id = "xfce---client-nextcloud" > XFCE - Client Nextcloud< / h2 >
< h4 id = "démarrage-automatique-nextcloud-client-avec-gnome-keyring" > Démarrage automatique nextcloud-client avec gnome-keyring< / h4 >
< p > Installez le paquet < strong > gnome-keyring< / strong > et < strong > libsecret< / strong > pour permettre aux applications d’ utiliser vos trousseaux de clés< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo pacman -S gnome-keyring libsecret
< / code > < / pre > < / div > < / div >
< p > Aussitôt l’ installation terminée, une fenêtre s’ ouvre< / p >
< p > < img src = "/images/2019-12-11_14-01.png" alt = "" width = "400" / > < / p >
< blockquote >
< p > Remarque:< br / >
Pour utiliser le déverrouillage automatique, le < u > même mot de passe pour le compte d'utilisateur et le trousseau de clés< / u > doivent être définis.< / p >
< / blockquote >
< p > Lorsque vous utilisez un gestionnaire d’ affichage, le trousseau de clés fonctionne immédiatement pour la plupart des cas. Les gestionnaires d’ affichage suivants déverrouillent automatiquement le trousseau de clés une fois connecté:< / p >
< ul >
< li > GDM< / li >
< li > LightDM< / li >
< li > LXDM< / li >
< li > SDDM< / li >
< / ul >
< blockquote >
< p > Pour GDM et LightDM, notez que le trousseau de clés doit être nommé < strong > login< / strong > pour être automatiquement déverrouillé.< / p >
< / blockquote >
< p > Vérifier ou ajouter les lignes qui contiennent < em > pam_gnome_keyring.so< / em > dans le fichier < strong > /etc/pam.d/lightdm< / strong > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > #%PAM-1.0
auth include system-login
-auth optional pam_gnome_keyring.so
account include system-login
password include system-login
session include system-login
-session optional pam_gnome_keyring.so auto_start
< / code > < / pre > < / div > < / div >
< p > < strong > A la prochaine ouverture de session , il faudra saisir le mot de passe du trousseau de clés et cocher la case pour ne plus le resaisir.< / strong > < / p >
< p > < img src = "/images/bug.png" alt = "" width = "40" / > < br / >
< a href = "https://bugs.archlinux.org/task/62140" > FS#62140 - [lightdm] gkr-pam: unable to locate daemon control file < / a > < / p >
< h4 id = "bug-répétition-messages-dans-le-journal-spam" > BUG Répétition messages dans le journal (SPAM)< / h4 >
< p > Le journal système est “pollué” sans interruption par des messages< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > déc. 17 15:29:17 yannick-pc gnome-keyring-daemon[733]: asked to register item /org/freedesktop/secrets/collection/Trousseau_5fde_5fcl_c3_a9s_5fpar_5fd_c3_a9faut/1, but it's already registered
déc. 17 15:29:17 yannick-pc gnome-keyring-daemon[733]: asked to register item /org/freedesktop/secrets/collection/Trousseau_5fde_5fcl_c3_a9s_5fpar_5fd_c3_a9faut/1, but it's already registered
< / code > < / pre > < / div > < / div >
< h4 id = "correctif-messages-dans-le-journal-spam" > Correctif messages dans le journal (SPAM)< / h4 >
< p > Apparemment, les clients construits avec la version v0.9.1 (dernière version décembre 2019) de la bibliothèque Qtkeychain ont tendance à s’ appuyer sur < strong > libgnome-keyring< / strong > même si nous les avons construits avec < strong > libsecret< / strong > . Le passage au maître semble résoudre le problème en raison des récentes corrections apportées à Qtkeychain.< / p >
< p > J’ ai donc créé une nouvelle version quotidienne d’ AppImage du Client, contenant également la correction #1646, construite avec la branche maître de Qtkeychain au lieu de v0.9.1 et l’ ai testée avec succès sur Fedora 30 et 31.< / p >
< p > Veuillez suivre les étapes suivantes pour vérifier si cela fonctionne aussi pour vous :< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > Téléchargez et exécutez la nouvelle AppImage :
https://download.nextcloud.com/desktop/daily/Linux/Nextcloud-2.7.0.20191130-daily-x86_64.AppImage
Le Client ne doit vous demander le mot de passe qu'une seule fois, en vous reconnectant.
Redémarrez le système et vérifiez le résultat
< / code > < / pre > < / div > < / div >
< ol >
< li > Télécharger l’ image “nextcloud-client” → < a href = "https://download.nextcloud.com/desktop/daily/Linux/Nextcloud-2.7.0.20191130-daily-x86_64.AppImage" > https://download.nextcloud.com/desktop/daily/Linux/Nextcloud-2.7.0.20191130-daily-x86_64.AppImage< / a > < / li >
< li > Copier le .appimage dans /usr/local/bin < br / >
< code class = "language-plaintext highlighter-rouge" > sudo cp Nextcloud-2.7.0.20191130-daily-x86_64.AppImage /usr/local/bin/Nextcloud-client.AppImage< / code > < / li >
< li > Le rendre exécutable < br / >
< code class = "language-plaintext highlighter-rouge" > sudo chmod +x /usr/local/bin/Nextcloud-client.AppImage< / code > < / li >
< li >
< p > Créer un nextcloud-client.desktop dans < strong > ~/.local/share/applications/< / strong > < / p >
< p > nano ~/.local/share/applications/nextcloud-client.desktop< / p >
< / li >
< / ol >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > [Desktop Entry]
Categories=Utility;
Type=Application
Exec=/usr/local/bin/Nextcloud-client.AppImage
Name=Nextcloud appimage sync client
Comment=Nextcloud appimage synchronization client
Icon=Nextcloud
# Translations
Comment[fr]=Synchronisation avec un serveur Nextcloud
GenericName[fr]=Synchronisation de dossier
Name[fr]=Client de synchronisation Nextcloud
Icon[fr]=Nextcloud
< / code > < / pre > < / div > < / div >
< p > Ouvrir le nextcloud-client.desktop< br / >
Paraméter pour un lancement du client nextcloud au démarrage de session< br / >
Ajouter les dossiers à synchroniser< br / >
Si tout est OK< / p >
< blockquote >
< p > Désinstaller nextcloud-client AUR si nécessaire : < code class = "language-plaintext highlighter-rouge" > yay -R nextcloud-client< / code > < / p >
< / blockquote >
< h4 id = "test-nextcloud-client-janvier-2020" > Test nextcloud-client (janvier 2020)< / h4 >
< p > On installe (libcloudproviders-0.3.0-4 qtkeychain-0.10.0-1 nextcloud-client-2.6.2-1)< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > yay -S nextcloud-client
< / code > < / pre > < / div > < / div >
< p > Arrêt de la version en cours (appimage)< / p >
< h2 id = "economiseur-écran---xscreensaver" > Economiseur écran - xscreensaver< / h2 >
< p > < em > Remplacer économiseur écran xfce4-screensaver par xscreensaver< / em > < / p >
< p > Désinstaller< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo pacman -R xfce4-screensaver
< / code > < / pre > < / div > < / div >
< p > Installer< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > yay -S xscreensaver
< / code > < / pre > < / div > < / div >
< p > Dans les environnements Xfce, LXDE et LXQt, XScreenSaver démarre automatiquement s’ il est disponible - aucune autre action n’ est nécessaire.< / p >
< p > Dans le menu xfce ,ouvrir “Economiseur d’ écran”< br / >
< img src = "/images/xscr1.png" alt = "" width = "300" / > < br / >
< img src = "/images/xscr2.png" alt = "" width = "500" / > < / p >
< p > Création d’ un script pour < strong > Activer/Désactiver< / strong > le programme de mise en veille < strong > xscreensaver< / strong > < br / >
Prérequis : < strong > zenity< / strong > ,installé par défaut sous Manjaro< 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 > &
< 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/yannick/scripts/veille.sh< / span >
< span class = "py" > Path< / span > < span class = "p" > =< / span > < span class = "s" > /home/yannick/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 l’ icône choisi sans extension ni chemin pour le paramètre < strong > Icon< / strong > < / p >
< / blockquote >
< p > Lancer menu , “Activer/Désactiver veille écran”< br / >
< img src = "/images/xscr3.png" alt = "" width = "150" / > < / p >
< h2 id = "noyaux-linux-linux-lts" > Noyaux linux linux-lts< / h2 >
< h4 id = "linux-lts" > linux-lts< / h4 >
< p > En cas de problème avec les “kernel” , il faut pouvoir se rabattre sur un noyau confirmé (lts)< / p >
< p > Installation noyau lts et entêtes< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo pacman -S linux-lts linux-lts-headers
< / code > < / pre > < / div > < / div >
< h4 id = "grub" > Grub< / h4 >
< p > Il faut modifier le fichier grub pour la prise encharge des 2 noyaux (linux et linux-lts)< / p >
< p > Le fichier de configuration grub< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo nano /etc/default/grub
< / code > < / pre > < / div > < / div >
< p > Les lignes modifiées< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > GRUB_DEFAULT=saved
GRUB_TIMEOUT=10 # en secondes ,augmenter temps affichage menu
GRUB_SAVEDEFAULT="true"
< / code > < / pre > < / div > < / div >
< p > Pour éviter l’ erreur grub < strong > Disk filter writes are not supported< / strong > (se produit en présence d’ un raid ou d’ une partition LVM) < br / >
Solution temporaire à ce problème, éditer < strong > /etc/grub.d/10_linux< / strong > < br / >
Remplacer < code class = "language-plaintext highlighter-rouge" > quick_boot="1"< / code > par < code class = "language-plaintext highlighter-rouge" > quick_boot="0"< / code > < / p >
< p > Regénérer grub< / 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 >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > Found background: /usr/share/backgrounds/xfce/archlinux1024x600.png
Found linux image: /boot/vmlinuz-linux-lts
Found initrd image: /boot/initramfs-linux-lts.img
Found fallback initrd image(s) in /boot: initramfs-linux-lts-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img
done
< / code > < / pre > < / div > < / div >
< p > Regénérer la configuration< / 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 >
< p > < strong > Utilitaire graphique grub-customizer< / strong > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > yay -S grub-customizer
< / code > < / pre > < / div > < / div >
< h4 id = "grub-default-et-kernel-options-intel-core-i3-6100-37g" > Grub default et kernel options (Intel core I3-6100 3.7G)< / h4 >
< p > < strong > Modifier manuellement le choix par défaut de grub< / strong > < br / >
Le fichier < strong > /etc/grub.d/10_linux_proxy< / strong > contient la définition de tous les noyaux ou OS “bootables”< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > #!/bin/sh
#THIS IS A GRUB PROXY SCRIPT
'/etc/grub.d/proxifiedScripts/linux' | /etc/grub.d/bin/grubcfg_proxy "+*
+#text
+'Arch Linux'~f94e93cefcefc6629826bbcbaa6299f8~
+'SUBMENU' as 'Advanced options for Arch Linux'{+'Advanced options for Arch Linux'/*, +'Advanced options for Arch Linux'/'Arch Linux, with Linux linux-lts'~ac96326cd118f95b94f9e6d2002a4e52~, +'Advanced options for Arch Linux'/'Arch Linux, with Linux linux'~558934a46c603a6862d45f6123412d19~, +'Advanced options for Arch Linux'/'Arch Linux, with Linux linux-lts (fallback initramfs)'~aba62540761441f37733ce7a1148356c~, +'Advanced options for Arch Linux'/'Arch Linux, with Linux linux (fallback initramfs)'~82f47dbd51022daeaf6ae7e84ef921a1~}
< / code > < / pre > < / div > < / div >
< p > Pour modifier le “boot” par défaut de grub , éditer la ligne < strong > GRUB_DEFAULT< / strong > du fichier **/etc/default/grub ** , on veut démarrer sur le noyau linux-ts ou linux< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > # linux-lts
GRUB_DEFAULT="Advanced options for Arch Linux> Arch Linux, with Linux linux-lts"
# linux
GRUB_DEFAULT="Advanced options for Arch Linux> Arch Linux, with Linux linux"
< / code > < / pre > < / div > < / div >
< p > Pour ajouter des options au noyau kernel , éditer la ligne < strong > GRUB_CMDLINE_LINUX_DEFAULT< / strong > du fichier **/etc/default/grub ** < br / >
On ajoute < code class = "language-plaintext highlighter-rouge" > intel_idle.max_cstate=1 i915.enable_dc=0< / code > , pour éviter le < a href = "https://bbs.archlinux.org/viewtopic.php?pid=1885271#p1885271" > GPU hangs Intel skylake i915< / a > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet intel_idle.max_cstate=1 i915.enable_dc=0"
< / code > < / pre > < / div > < / div >
< p > Regénérer le grub< / 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 >
< p > < strong > 09/02/2020< / strong > , suite au blocage complet ordinateur PC1 avec erreur < code class = "language-plaintext highlighter-rouge" > [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A< / code > < a href = "https://www.dedoimedo.com/computers/intel-microcode-atomic-update.html" > Intel microcode & Atomic update failure< / a > ,modifier les options kernel dans le grub, ajouter < code class = "language-plaintext highlighter-rouge" > i915.enable_psr=0< / code > .< br / >
Editer la ligne < strong > GRUB_CMDLINE_LINUX_DEFAULT< / strong > du fichier **/etc/default/grub **< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet intel_idle.max_cstate=1 i915.enable_dc=0 i915.enable_psr=0"
< / code > < / pre > < / div > < / div >
< p > Regénérer le grub< / 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 >
< h4 id = "grub-default-et-kernel-options-intel-core-i5-7500-34-ghz" > Grub default et kernel options (Intel core I5-7500 3.4 GHz)< / h4 >
< p > Pour modifier le “boot” par défaut de grub , éditer la ligne < strong > GRUB_DEFAULT< / strong > du fichier **/etc/default/grub ** , on veut démarrer sur le noyau linux-ts ou linux< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > # linux-lts
GRUB_DEFAULT="Advanced options for Arch Linux> Arch Linux, with Linux linux-lts"
# linux
GRUB_DEFAULT="Advanced options for Arch Linux> Arch Linux, with Linux linux"
< / code > < / pre > < / div > < / div >
< p > Pour ajouter des options au noyau kernel , éditer la ligne < strong > GRUB_CMDLINE_LINUX_DEFAULT< / strong > du fichier **/etc/default/grub **< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet"
< / code > < / pre > < / div > < / div >
< p > Regénérer le grub< / 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 >
< h2 id = "virtualisation" > Virtualisation< / h2 >
< ul >
< li > < a href = "/2020/09/24/KVM-QEMU-virtualisation-linux-Virtual-Machine-Manager-VMM-virsh-montage-disque-VDI.html#archlinux" > KVM/QEMU + VMM sur archlinux XFCE< / a > < / li >
< li > < a href = "/2020/11/16/KVM-QEMU-PC1-ArchLinux-Machines-Virtuelles.html" > PC1 ArchLinux - Machines virtuelles< / a > < / li >
< / ul >
< h3 id = "réseau-network" > Réseau (Network)< / h3 >
< blockquote >
< p > Les commandes se font en mode su< / p >
< / blockquote >
< p > Après installation on liste les réseaux< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > virsh net-list --all
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > Nom État Démarrage automatique Persistent
---------------------------------------------------------
br10 actif no Oui
netv4v6 inactif no Oui
< / code > < / pre > < / div > < / div >
< p > Supprimer les configurations réseau< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > virsh net-destroy br10 # si active
virsh net-undefine br10
virsh net-undefine netv4v6
< / code > < / pre > < / div > < / div >
< p > Vérifier< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > virsh net-list --all
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > Nom État Démarrage automatique Persistent
--------------------------------------------------
< / code > < / pre > < / div > < / div >
< h3 id = "networkmanager-créer-network-bridge" > NetworkManager, créer Network Bridge< / h3 >
< p > < strong > Créer un pont réseau (Network Bridge) sur archlinux xfce avec NetworkManager cli< / strong > < / p >
< p > < a href = "/2020/11/14/KVM-QEMU-Network-Bridge-(Pont-reseau).html#avec-networkmanager" > NetworkManager - Créer un pont réseau (Network Bridge)< / a > < / p >
< p > On utilise NetworkManager en ligne de commande avec l’ outils < code class = "language-plaintext highlighter-rouge" > nmcli< / code > < / p >
< p > Création d’ un pont avec < a href = "https://en.wikipedia.org/wiki/Spanning_Tree_Protocol" > STP< / a > désactivé (pour éviter que le pont ne soit annoncé sur le réseau) :< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > nmcli connection add type bridge ifname br0 stp no
< / code > < / pre > < / div > < / div >
< p > Faire de l’ interface < strong > enp0s31f6< / strong > un esclave du pont :< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > nmcli connection add type bridge-slave ifname enp0s31f6 master br0
< / code > < / pre > < / div > < / div >
< p > En mettant la connexion existante en position basse (relever le nom de la connexion< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > nmcli connection show
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > NAME UUID TYPE DEVICE
bridge-br0 53443390-8158-41d2-b0f9-084be6e23de2 bridge br0
Connexion filaire 1 5af7fd83-74f4-3993-8203-1093967f5377 ethernet enp0s31f6
lxcbr0 7c689de1-d2a2-4af5-93d5-61edd12b67a2 bridge lxcbr0
bridge-slave-enp0s31f6 4c351d7a-3aa2-48c6-ba6a-587d7420f627 ethernet --
< / code > < / pre > < / div > < / div >
< p > Dans notre cas ‘ Connexion filaire 1’ < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > nmcli connection down 'Connexion filaire 1'
< / code > < / pre > < / div > < / div >
< p > Mise en place du nouveau pont :< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > nmcli connection up bridge-br0
< / code > < / pre > < / div > < / div >
< p > Vérifications< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > nmcli connection show
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > NAME UUID TYPE DEVICE
bridge-br0 53443390-8158-41d2-b0f9-084be6e23de2 bridge br0
lxcbr0 7c689de1-d2a2-4af5-93d5-61edd12b67a2 bridge lxcbr0
bridge-slave-enp0s31f6 4c351d7a-3aa2-48c6-ba6a-587d7420f627 ethernet enp0s31f6
Connexion filaire 1 5af7fd83-74f4-3993-8203-1093967f5377 ethernet --
< / code > < / pre > < / div > < / div >
< p > Adresses IP< / 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: < LOOPBACK,UP,LOWER_UP> 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: < BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br0 state UP group default qlen 1000
link/ether 38:d5:47:7c:a0:6c brd ff:ff:ff:ff:ff:ff
3: lxcbr0: < BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:16:3e:00:00:00 brd ff:ff:ff:ff:ff:ff
inet 10.0.3.1/24 brd 10.0.3.255 scope global lxcbr0
valid_lft forever preferred_lft forever
inet6 fe80::216:3eff:fe00:0/64 scope link
valid_lft forever preferred_lft forever
4: wg0: < POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
link/none
inet 10.67.125.215/32 scope global wg0
valid_lft forever preferred_lft forever
inet6 fc00:bbbb:bbbb:bb01::4:7dd6/128 scope global
valid_lft forever preferred_lft forever
5: veth4BXuuW@if2: < BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master lxcbr0 state UP group default qlen 1000
link/ether fe:d5:23:38:7e:46 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fe80::fcd5:23ff:fe38:7e46/64 scope link
valid_lft forever preferred_lft forever
12: br0: < BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 1a:87:ed:b7:a5:67 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.43/24 brd 192.168.0.255 scope global dynamic noprefixroute br0
valid_lft 43139sec preferred_lft 43139sec
inet6 2a01:e34:eebf:df0:d71d:1ea9:253:7bf0/64 scope global dynamic noprefixroute
valid_lft 86341sec preferred_lft 86341sec
inet6 fe80::777c:a682:5969:f15/64 scope link noprefixroute
valid_lft forever preferred_lft forever
< / code > < / pre > < / div > < / div >
< p > < strong > KVM déclarer et activer le pont réseau (Network Bridge)< / strong > < / p >
< p > Déclarer le pont (bridge) à KVM.< br / >
Créer un fichier de définition de réseau au format XML :< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > nano host-bridge.xml
< / code > < / pre > < / div > < / div >
< div class = "language-xml highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "nt" > < network> < / span >
< span class = "nt" > < name> < / span > host-bridge< span class = "nt" > < /name> < / span >
< span class = "nt" > < forward< / span > < span class = "na" > mode=< / span > < span class = "s" > "bridge"< / span > < span class = "nt" > /> < / span >
< span class = "nt" > < bridge< / span > < span class = "na" > name=< / span > < span class = "s" > "br0"< / span > < span class = "nt" > /> < / span >
< span class = "nt" > < /network> < / span >
< / code > < / pre > < / div > < / div >
< p > Appliquer la configuration :< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > virsh net-define host-bridge.xml
virsh net-start host-bridge
virsh net-autostart host-bridge
< / code > < / pre > < / div > < / div >
< p > Tout fonctionne ?< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > virsh net-list --all
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > Nom État Démarrage automatique Persistent
-----------------------------------------------------------
host-bridge actif Oui Oui
< / code > < / pre > < / div > < / div >
< h2 id = "maintenance" > MAINTENANCE< / h2 >
< h3 id = "pc1-boot-uefi-février-2020" > PC1 boot UEFI (février 2020)< / h3 >
< ul >
< li > < a href = "/files/html/Installer Arch Linux (UEFI LVM).htm" > Installer Arch Linux (UEFI LVM)-Lien HS< / a > < / li >
< / ul >
< h4 id = "boot-uefi-sur-disque-120go" > Boot UEFI sur Disque 120Go< / h4 >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > [root@yannick-pc yannick]# gdisk /dev/sda
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.
Command (? for help): p
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 >
< h4 id = "grub-uefi" > GRUB UEFI< / h4 >
< ul >
< li > < a href = "404.html" > Ordinateur Bureau PC1 démarrage UEFI (GPT)< / a > < / li >
< / ul >
< p > < strong > Rappel installation GRUB UEFI< / strong > < br / >
Créer le répertoire /boot/efi/EFI< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > mkdir -p /boot/efi/EFI
< / code > < / pre > < / div > < / div >
< p > Installez l’ application UEFI GRUB dans /boot/efi/EFI/arch_grub et ses modules dans /boot/grub/x86_64-efi à l’ aide de :< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck
< / code > < / pre > < / div > < / div >
< p > Générer le fichier de configuration principal< / 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 >
< h3 id = "problèmes-et-solutions" > Problèmes et solutions< / h3 >
< h4 id = "wireguard" > wireguard< / h4 >
< ul >
< li > < a href = "https://wiki.archlinux.org/index.php/WireGuard" > Wireguard (archwiki)< / a > < / li >
< li > < a href = "https://wiki.archlinux.org/index.php/NetworkManager" > NetworkManager (archwiki)< / a > < / li >
< li > La gestion wireguard se fait au niveau du noyau kernel , inutile d’ installer wireguard-dkms< / li >
< li > Si l’ on utilise systemd-network pour gérer le réseau , plus besoin du paquet wireguard-tools< / li >
< / ul >
< p > Par contre , il y a des problèmes avec NetworkManager< / p >
< p > < strong > NetworkManager - Les itinéraires (routes) sont périodiquement remis à zéro< / strong > < / p >
< p > Les utilisateurs de NetworkManager doivent s’ assurer qu’ il ne gère pas les interfaces WireGuard.< br / >
Créer le fichier de configuration suivant< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > /etc/NetworkManager/conf.d/unmanaged.conf
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > [keyfile]
unmanaged-devices=interface-name:wg*
< / code > < / pre > < / div > < / div >
< p > < strong > NetworkManager - Résolution DNS brisée< / strong > < / p >
< p > Lorsque l’ on fait passer tout le trafic par une interface WireGuard, la connexion peut sembler perdue au bout d’ un certain temps ou lors d’ une nouvelle connexion. < br / >
Cela peut être dû au fait qu’ un gestionnaire de réseau ou un client DHCP écrase le fichier /etc/resolv.conf.< / p >
< p > Par défaut, < strong > wg-quick< / strong > utilise < strong > resolvconf< / strong > pour enregistrer de nouvelles entrées DNS (à partir du mot-clé DNS dans le fichier de configuration).< br / >
Cela causera des problèmes avec les gestionnaires de réseau (NetworkManager,DHCP,etc…) et les clients DHCP qui n’ utilisent pas resolvconf, car ils écraseront /etc/resolv.conf, supprimant ainsi les serveurs DNS ajoutés par wg-quick.< / p >
< blockquote >
< font color = "red" > Les utilisateurs doivent savoir que **NetworkManager** n'utilise pas **resolvconf** par défaut.< / font >
< / blockquote >
< ul >
< li > Il est recommandé d’ utiliser < strong > systemd-resolvconf< / strong > < / li >
< li > Sinon installer < strong > openresolv< / strong > et configurez NetworkManager pour qu’ il l’ utilise< / li >
< / ul >
< p > < strong > NetworkManager - Utiliser le résolveur openresolv (ATTENTION DANGER !!!)< / strong > < / p >
< p > Si openresolv a un abonné pour votre résolveur DNS local (mullvad wireguard utilise < strong > openresolv< / strong > ), configurez l’ abonné et configurez NetworkManager pour utiliser < strong > openresolv< / strong > .< / p >
< p > To configure NetworkManager to use openresolv, set main.rc-manager=resolvconf with a configuration file in /etc/NetworkManager/conf.d/:
Pour configurer NetworkManager afin qu’ il utilise < strong > openresolv< / strong > , définissez < code class = "language-plaintext highlighter-rouge" > main.rc-manager=resolvconf< / code > avec un fichier de configuration dans < strong > /etc/NetworkManager/conf.d/< / strong > :< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > /etc/NetworkManager/conf.d/rc-manager.conf
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > [main]
rc-manager=resolvconf
< / code > < / pre > < / div > < / div >
< p > Redémarrer le service< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl restart NetworkManager
< / code > < / pre > < / div > < / div >
< p > Test< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > dig cinay.xyz |grep -i SERVER
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > ;; SERVER: 80.67.169.12#53(80.67.169.12)
< / code > < / pre > < / div > < / div >
< p > < strong > Failed to start WireGuard via wg-quick(8) for wg/quick@Aucune.< / strong > < / p >
< p > Dans le journal< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > mai 04 06:22:52 yannick-pc systemd[1]: Starting WireGuard via wg-quick(8) for wg/quick@Aucune...
mai 04 06:22:52 yannick-pc wg-quick[731]: wg-quick: `wg-quick@Aucune' does not exist
mai 04 06:22:52 yannick-pc systemd[1]: wg-quick@wg-quick@Aucune.service: Main process exited, code=exited, status=1/FAILURE
mai 04 06:22:52 yannick-pc systemd[1]: wg-quick@wg-quick@Aucune.service: Failed with result 'exit-code'.
mai 04 06:22:52 yannick-pc systemd[1]: Failed to start WireGuard via wg-quick(8) for wg/quick@Aucune.
< / code > < / pre > < / div > < / div >
< p > Il y a un service < code class = "language-plaintext highlighter-rouge" > wg-quick@wg-quick@Aucune.service< / code > actif (enabled) qui ne correspond à rien< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > systemctl status wg-quick@wg-quick@Aucune.service
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > ● wg-quick@wg-quick@Aucune.service - WireGuard via wg-quick(8) for wg/quick@Aucune
Loaded: loaded (/usr/lib/systemd/system/wg-quick@.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2020-05-04 06:22:52 CEST; 26min ago
Main PID: 731 (code=exited, status=1/FAILURE)
< / code > < / pre > < / div > < / div >
< p > On désactive ce service< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > systemctl disable wg-quick@wg-quick@Aucune.service
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > Removed /etc/systemd/system/multi-user.target.wants/wg-quick@wg-quick@Aucune.service.
< / code > < / pre > < / div > < / div >
< p > Vérification< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > ls /etc/systemd/system/multi-user.target.wants/
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > NetworkManager.service avahi-daemon.service borg-backup.service lxc-net.service nfs-server.service remote-fs.target wg-quick@wg0.service
autofs.service avahi-dnsconfd.service mariadb.service org.cups.cupsd.path sshd.service
< / code > < / pre > < / div > < / div >
< h4 id = "failed-to-load-plugin-tumbler-raw-thumbnailerso" > Failed to load plugin “tumbler-raw-thumbnailer.so< / h4 >
< p > journal< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > mai 04 06:23:48 yannick-pc tumblerd[1220]: Failed to load plugin "tumbler-raw-thumbnailer.so": libopenrawgnome.so.7: cannot open shared object file: No such file or directory
< / code > < / pre > < / div > < / div >
< p > Ce plugin est destiné à l’ affichage de vignettes de fichiers RAW, et vous devez avoir installé < strong > libopenraw< / strong > pour qu’ il fonctionne (ce paquet fournit le fichier manquant “libopenrawgnome.so.7”, et est listé comme une dépendance optionnelle de tumbler).< / p >
< h4 id = "gnome-keyring-daemon-unsupported-or-unknown-ssh-key-algorithm-ssh-ed25519" > gnome-keyring-daemon Unsupported or unknown SSH key algorithm ssh-ed25519< / h4 >
< p > Journal< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > mai 04 06:23:50 yannick-pc gnome-keyring-daemon[1000]: Unsupported or unknown SSH key algorithm: ssh-ed25519
mai 04 06:23:50 yannick-pc gnome-keyring-daemon[1000]: Unsupported or unknown SSH key algorithm: ssh-ed25519
mai 04 06:23:50 yannick-pc gnome-keyring-daemon[1000]: Unsupported or unknown SSH key algorithm: ssh-ed25519
mai 04 06:23:50 yannick-pc gnome-keyring-daemon[1000]: Unsupported or unknown SSH key algorithm: ssh-ed25519
< / code > < / pre > < / div > < / div >
< p > Supprimer le lancement de gnome-keyring ssh< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo rm /etc/xdg/autostart/gnome-keyring-ssh.desktop
< / code > < / pre > < / div > < / div >
< h4 id = "gnome-keyring-daemon-already-registered" > gnome-keyring-daemon already registered< / h4 >
< p > Journal< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > mai 04 06:23:50 yannick-pc gnome-keyring-daemon[1000]: asked to register item /org/freedesktop/secrets/collection/Trousseau_5fde_5fcl_c3_a9s_5fpar_5fd_c3_a9faut/1, but it's already registered
< / code > < / pre > < / div > < / div >
< p > Supprimer le lancement de gnome-keyring ssh< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo rm /etc/xdg/autostart/gnome-keyring-ssh.desktop
< / code > < / pre > < / div > < / div >
< h3 id = "systemd-path-unit-desactive" > Systemd Path Unit (DESACTIVE)< / h3 >
< p > < a href = "/2020/08/04/Systemd_Path_Unit_pour_surveiller_les_fichiers_et_les_repertoire.html" > Systemd Path Unit pour surveiller les fichiers et les répertoires< / a > < / p >
< p > Les dossiers locaux et distants à synchroniser< / p >
< table >
< thead >
< tr >
< th > Type< / th >
< th > Local PC1< / th >
< th > xoyize (paratge NFS)< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > lsync< / td >
< td > ~/media/dplus< / td >
< td > /srv/data/dplus< / td >
< / tr >
< tr >
< td > lsync< / td >
< td > ~/media/devel< / td >
< td > /srv/data/devel< / td >
< / tr >
< / tbody >
< / table >
< p > Créer un script de < code class = "language-plaintext highlighter-rouge" > /home/yannick/scripts/synchro_local_dplus_vers_srvxo.sh< / code > < / p >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "c" > #!/bin/bash< / span >
rsync < span class = "nt" > -avz< / span > < span class = "nt" > --progress< / span > < span class = "nt" > --stats< / span > < span class = "nt" > --human-readable< / span > /home/yannick/media/dplus/< span class = "k" > *< / span > /net/srvxo/srv/data/dplus/
< / code > < / pre > < / div > < / div >
< p > Créer un script de < code class = "language-plaintext highlighter-rouge" > /home/yannick/scripts/synchro_local_devel_vers_srvxo.sh< / code > < / p >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "c" > #!/bin/bash< / span >
rsync < span class = "nt" > -avz< / span > < span class = "nt" > --progress< / span > < span class = "nt" > --stats< / span > < span class = "nt" > --human-readable< / span > /home/yannick/media/devel/< span class = "k" > *< / span > /net/srvxo/srv/data/devel/
< / code > < / pre > < / div > < / div >
< p > Créer un script de < code class = "language-plaintext highlighter-rouge" > /home/yannick/scripts/synchro_statique_vers_srvxo.sh< / code > < / p >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "c" > #!/bin/bash< / span >
rsync < span class = "nt" > -avz< / span > < span class = "nt" > --progress< / span > < span class = "nt" > --stats< / span > < span class = "nt" > --human-readable< / span > /home/yannick/media/dplus/statique/< span class = "k" > *< / span > /net/srvxo/srv/data/dplus/statique/
< / code > < / pre > < / div > < / div >
< p > Rendre les script exécutables< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > chmod +x /home/yannick/scripts/synchro_local_dplus_vers_srvxo.sh
chmod +x /home/yannick/scripts/synchro_local_devel_vers_srvxo.sh
chmod +x /home/yannick/scripts/synchro_statique_vers_srvxo.sh
< / code > < / pre > < / div > < / div >
< p > Créer un fichier d’ unité de service pour exécuter le script< / p >
< p > L’ unité de service sera responsable de l’ exécution du script lorsque l’ unité de chemin observe les modifications dans le dossier local sur le fichier feed.xml< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo nano /etc/systemd/system/synchro_dplus.service
< / code > < / pre > < / div > < / div >
< div class = "language-ini highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "nn" > [Unit]< / span >
< span class = "py" > Description< / span > < span class = "p" > =< / span > < span class = "s" > "synchro dplus"< / span >
< span class = "py" > After< / span > < span class = "p" > =< / span > < span class = "s" > network.target< / span >
< span class = "nn" > [Service]< / span >
< span class = "py" > ExecStart< / span > < span class = "p" > =< / span > < span class = "s" > /home/yannick/scripts/synchro_local_dplus_vers_srvxo.sh< / span >
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo nano /etc/systemd/system/synchro_devel.service
< / code > < / pre > < / div > < / div >
< div class = "language-ini highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "nn" > [Unit]< / span >
< span class = "py" > Description< / span > < span class = "p" > =< / span > < span class = "s" > "synchro devel"< / span >
< span class = "py" > After< / span > < span class = "p" > =< / span > < span class = "s" > network.target< / span >
< span class = "nn" > [Service]< / span >
< span class = "py" > ExecStart< / span > < span class = "p" > =< / span > < span class = "s" > /home/yannick/scripts/synchro_local_devel_vers_srvxo.sh< / span >
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo nano /etc/systemd/system/synchro_statique.service
< / code > < / pre > < / div > < / div >
< div class = "language-ini highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "nn" > [Unit]< / span >
< span class = "py" > Description< / span > < span class = "p" > =< / span > < span class = "s" > "synchro dplus/statique"< / span >
< span class = "py" > After< / span > < span class = "p" > =< / span > < span class = "s" > network.target< / span >
< span class = "nn" > [Service]< / span >
< span class = "py" > ExecStart< / span > < span class = "p" > =< / span > < span class = "s" > /home/yannick/scripts/synchro_statique_vers_srvxo.sh< / span >
< / code > < / pre > < / div > < / div >
< p > Le dernier fichier nécessaire pour terminer notre configuration est le fichier d’ unité de chemin lui-même. Le fichier d’ unité doit être créé dans le même répertoire que son fichier de service correspondant, /etc/systemd/systemdans ce cas. Il doit également avoir le même nom, mais avec une extension .path.< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo nano /etc/systemd/system/synchro_dplus.path
< / code > < / pre > < / div > < / div >
< div class = "language-ini highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "nn" > [Unit]< / span >
< span class = "py" > Description< / span > < span class = "p" > =< / span > < span class = "s" > Modification dossier local dplus< / span >
< span class = "nn" > [Path]< / span >
< span class = "py" > PathModified< / span > < span class = "p" > =< / span > < span class = "s" > /home/yannick/media/dplus< / span >
< span class = "py" > Unit< / span > < span class = "p" > =< / span > < span class = "s" > synchro_dplus.service< / span >
< span class = "nn" > [Install]< / span >
< span class = "py" > WantedBy< / span > < span class = "p" > =< / span > < span class = "s" > multi-user.target< / span >
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo nano /etc/systemd/system/synchro_devel.path
< / code > < / pre > < / div > < / div >
< div class = "language-ini highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "nn" > [Unit]< / span >
< span class = "py" > Description< / span > < span class = "p" > =< / span > < span class = "s" > Modification dossier local devel< / span >
< span class = "nn" > [Path]< / span >
< span class = "py" > PathModified< / span > < span class = "p" > =< / span > < span class = "s" > /home/yannick/media/devel< / span >
< span class = "py" > Unit< / span > < span class = "p" > =< / span > < span class = "s" > synchro_devel.service< / span >
< span class = "nn" > [Install]< / span >
< span class = "py" > WantedBy< / span > < span class = "p" > =< / span > < span class = "s" > multi-user.target< / span >
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo nano /etc/systemd/system/synchro_statique.path
< / code > < / pre > < / div > < / div >
< div class = "language-ini highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "nn" > [Unit]< / span >
< span class = "py" > Description< / span > < span class = "p" > =< / span > < span class = "s" > Modification dossier local statique< / span >
< span class = "nn" > [Path]< / span >
< span class = "py" > PathModified< / span > < span class = "p" > =< / span > < span class = "s" > /home/yannick/media/dplus/statique< / span >
< span class = "py" > Unit< / span > < span class = "p" > =< / span > < span class = "s" > synchro_statique.service< / span >
< span class = "nn" > [Install]< / span >
< span class = "py" > WantedBy< / span > < span class = "p" > =< / span > < span class = "s" > multi-user.target< / span >
< / code > < / pre > < / div > < / div >
< p > les changements dans le dossier system< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl daemon-reload
< / code > < / pre > < / div > < / div >
< p > Démarrer unité de chemin systemd< / p >
< p > Le démarrer et activer avec systemctl, tout comme un service normal.< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl start synchro_dplus.path
sudo systemctl enable synchro_dplus.path
sudo systemctl start synchro_devel.path
sudo systemctl enable synchro_devel.path
sudo systemctl start synchro_statique.path
sudo systemctl enable synchro_statique.path
< / code > < / pre > < / div > < / div >
< p > Vérifier l’ état< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl status synchro_dplus.path
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > ● synchro_dplus.path - Modification dossier local dplus
Loaded: loaded (/etc/systemd/system/synchro_dplus.path; enabled; vendor preset: disabled)
Active: active (waiting) since Sat 2020-08-08 15:40:09 CEST; 2min 31s ago
Triggers: ● synchro_dplus.service
août 08 15:40:09 yannick-pc systemd[1]: Started Modification dossier local dplus.
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl status synchro_devel.path
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > ● synchro_devel.path - Modification dossier local devel
Loaded: loaded (/etc/systemd/system/synchro_devel.path; enabled; vendor preset: disabled)
Active: active (waiting) since Sat 2020-08-08 15:40:09 CEST; 3min 3s ago
Triggers: ● synchro_devel.service
août 08 15:40:09 yannick-pc systemd[1]: Started Modification dossier local devel.
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl status synchro_statique.path
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > ● synchro_statique.path - Modification dossier local statique
Loaded: loaded (/etc/systemd/system/synchro_statique.path; enabled; vendor preset: disabled)
Active: active (waiting) since Sat 2020-08-08 16:18:24 CEST; 48s ago
Triggers: ● synchro_statique.service
août 08 16:18:24 yannick-pc systemd[1]: Started Modification dossier local statique.
< / code > < / pre > < / div > < / div >
< p > Dans un premier temps , on synchronise uniquement dplus/statique< br / >
On désactive les services< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl stop synchro_dplus.path
sudo systemctl disable synchro_dplus.path
sudo systemctl stop synchro_devel.path
sudo systemctl disable synchro_devel.path
< / code > < / pre > < / div > < / div >
< p > Observation des changements sur dplus/statique< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > journalctl -f -u synchro_statique.path
< / code > < / pre > < / div > < / div >
< p class = "warning" > On désactive TOUS les services < strong > .path< / strong > car la notion de modification de répertoire n’ est pas claire< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl stop synchro_dplus.path
sudo systemctl disable synchro_dplus.path
sudo systemctl stop synchro_devel.path
sudo systemctl disable synchro_devel.path
sudo systemctl stop synchro_statique.path
sudo systemctl disable synchro_statique.path
< / code > < / pre > < / div > < / div >
< h3 id = "unité-sauvegarde-srvsav" > Unité sauvegarde /srv/sav< / h3 >
< p > Disponibilités< br / >
L’ unité de volume LVM vg-nas-one dispose de 3,15To< / p >
< p > Créer un volume logique < strong > sav< / strong > au format ext4< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo lvcreate -L 500G -n sav vg-nas-one
sudo mkfs.ext4 /dev/vg-nas-one/sav
sudo blkid |grep "sav"
< / code > < / pre > < / div > < / div >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "c" > # UUID sav< / span >
/dev/mapper/vg--nas--one-sav: < span class = "nv" > UUID< / span > < span class = "o" > =< / span > < span class = "s2" > "c5b9eefc-1daa-4a0d-8a72-6169b3c8c91f"< / span > < span class = "nv" > BLOCK_SIZE< / span > < span class = "o" > =< / span > < span class = "s2" > "4096"< / span > < span class = "nv" > TYPE< / span > < span class = "o" > =< / span > < span class = "s2" > "ext4"< / span >
< / code > < / pre > < / div > < / div >
< p > Créer un point de montage local < strong > /srv/sav< / strong > et un lien< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo mkdir /srv/sav
sudo ln -s /srv/sav $HOME/sav
< / code > < / pre > < / div > < / div >
< p > Modifier < strong > /etc/fstab< / strong > , ajouter ce qui suit< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > # /dev/mapper/vg--nas--one-sav
UUID=c5b9eefc-1daa-4a0d-8a72-6169b3c8c91f /srv/sav ext4 defaults 0 2
< / code > < / pre > < / div > < / div >
< p > Remontage < code class = "language-plaintext highlighter-rouge" > sudo mount -a< / code > et les droits < code class = "language-plaintext highlighter-rouge" > sudo chown $USER.$USER -R /srv/sav/< / code > < / p >
< h3 id = "disque-usb3-laciedesactive" > Disque USB3 “LaCie”(DESACTIVE)< / h3 >
< p > Vérifier la présence du disque “LaCie”< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > lsusb |if grep -q "LaCie" ;then echo "OK" ;else echo "KO" ;fi
< / code > < / pre > < / div > < / div >
< p > Vérifier si le disque est monté ou pas sur < code class = "language-plaintext highlighter-rouge" > /mnt/usb3< / code > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > mountpoint /mnt/usb3
# /mnt/usb3 n'est pas un point de montage
< / code > < / pre > < / div > < / div >
< p > Le disque externe contient un volume physique LVM < strong > hdd-2g< / strong > et un volume logique < strong > lvhdd< / strong > au format ext4< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > ls /dev/mapper/ |grep 'lvhdd'
< / code > < / pre > < / div > < / div >
< p > hdd– 2g-lvhdd< / p >
< p > Montage manuel volume logique < strong > lvhdd< / strong > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo mount /dev/mapper/hdd--2g-lvhdd /mnt/usb3
< / code > < / pre > < / div > < / div >
< p > Vérifier le point de montage< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > mountpoint /mnt/usb3
# /mnt/usb3 est un point de montage
< / code > < / pre > < / div > < / div >
< p > < strong > Créer un bash pour monter le disque externe “LaCie”< / strong > < br / >
Bash < code class = "language-plaintext highlighter-rouge" > ~/scripts/disque_externe_usb_lacie.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" > # disque_externe_usb_lacie.sh< / span >
< span class = "k" > if< / span > < span class = "o" > [< / span > < span class = "nv" > $# < / span > < span class = "nt" > -eq< / span > 0 < span class = "o" > ]< / span >
< span class = "k" > then
< / span > < span class = "nb" > echo< / span > < span class = "s2" > "Syntaxe de la commande : < / span > < span class = "nv" > $0< / span > < span class = "s2" > /répertoire_de_montage [-u]"< / span >
< span class = "nb" > echo< / span > < span class = "s2" > "-u , démontage"< / span >
< span class = "nb" > exit
< / span > < span class = "k" > fi< / span >
< span class = "c" > # vérifier présence disque externe usb "LaCie"< / span >
lsusb |if < span class = "nb" > grep< / span > < span class = "nt" > -q< / span > < span class = "s2" > "LaCie"< / span > < span class = "p" > ;< / span > < span class = "k" > then< / span >
< span class = "c" > # Disque externe usb présent"< / span >
< span class = "c" > # vérifier si disque est monté sur "%1"< / span >
< span class = "k" > if< / span > < span class = "o" > !< / span > mountpoint < span class = "nt" > -q< / span > < span class = "s2" > "< / span > < span class = "nv" > $1< / span > < span class = "s2" > "< / span > < span class = "p" > ;< / span > < span class = "k" > then< / span >
< span class = "c" > # pas un point de montage< / span >
< span class = "c" > # on monte< / span >
< span class = "nb" > echo< / span > < span class = "s2" > "Montage hdd--2g-lvhdd sur < / span > < span class = "nv" > $1< / span > < span class = "s2" > "< / span > & > /dev/null
< span class = "nb" > sudo < / span > mount /dev/mapper/hdd--2g-lvhdd < span class = "s2" > "< / span > < span class = "nv" > $1< / span > < span class = "s2" > "< / span >
< span class = "nb" > exit < / span > 0
< span class = "k" > else< / span >
< span class = "c" > # si paramètre -u , on démonte< / span >
< span class = "k" > if< / span > < span class = "o" > [< / span > < span class = "s2" > "< / span > < span class = "nv" > $2< / span > < span class = "s2" > "< / span > < span class = "o" > ==< / span > < span class = "s2" > "-u"< / span > < span class = "o" > ]< / span > < span class = "p" > ;< / span > < span class = "k" > then
< / span > < span class = "nb" > echo< / span > < span class = "s2" > "Démontage < / span > < span class = "nv" > $1< / span > < span class = "s2" > "< / span > & > /dev/null
< span class = "nb" > sudo < / span > umount < span class = "s2" > "< / span > < span class = "nv" > $1< / span > < span class = "s2" > "< / span >
< span class = "k" > else
< / span > < span class = "nb" > echo< / span > < span class = "s2" > "hdd--2g-lvhdd est déjà monté sur < / span > < span class = "nv" > $1< / span > < span class = "s2" > "< / span > & > /dev/null
< span class = "k" > fi
< / span > < span class = "nb" > exit < / span > 0
< span class = "k" > fi
else
< / span > < span class = "nb" > echo< / span > < span class = "s2" > "pas de disque !"< / span > & > /dev/null
< span class = "nb" > exit < / span > 1
< span class = "k" > fi< / span >
< / code > < / pre > < / div > < / div >
< p > Créer un lien nommé < code class = "language-plaintext highlighter-rouge" > usbext< / code > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo ln -s /home/yannick/scripts/disque_externe_usb_lacie.sh /usr/local/bin/usbext
< / code > < / pre > < / div > < / div >
< p > Le montage < code class = "language-plaintext highlighter-rouge" > usbext /mnt/lacie< / code > est utilisé par borg pour la sauvegarde< / p >
< p > < strong > Systemd utilisateur “LaCie”< / strong > < br / >
< em > Systemd offre la possibilité d’ utiliser des unités dans l’ espace de l’ utilisateur en lui permettant de démarrer, d’ arrêter, d’ activer ou de désactiver une unité.< / em > < / p >
< p > Créer un service systemd utilisateur pour monter le disque externe USB3 “LaCie”, si connecté. < br / >
On fait le montage sur < code class = "language-plaintext highlighter-rouge" > /mnt/lacie< / code > < / p >
< p > Le but est de lancer l’ image virtuelle au démarrage de la machine< br / >
Création d’ un service utilisateur< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > $ mkdir -p ~/.config/systemd/user
$ nano ~/.config/systemd/user/mount-lacie.service
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > [Unit]
Description=Montage disque usb lacie
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/local/bin/usbext /mnt/lacie
ExecStop=/usr/local/bin/usbext /mnt/lacie -u
[Install]
WantedBy=default.target
< / code > < / pre > < / div > < / div >
< ul >
< li > < strong > ExecStart< / strong > permet d’ indiquer la commande à exécuter au lancement du service. < u > Ce paramètre est obligatoire< / u > pour tout les types de service.< / li >
< li > < strong > ExecStop< / strong > permet d’ indiquer une commande a exécuter pour arrêter le service. < u > Ce paramètre est facultatif< / u > .< / li >
< li > < strong > RemainAfterExit< / strong > à la valeur “yes” permet d’ indiquer que quand la commande de lancement (ExecStart) est terminée, le service est considéré comme toujours lancé. Ce paramètre est très utile pour les services de type “oneshot” qui exécutent une commande à leur lancement (ExecStart) sans qu’ il y ait un processus spécifique qui reste en exécution.< / li >
< / ul >
< p > Relancer systemd utilisateur< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > $ systemctl --user daemon-reload
< / code > < / pre > < / div > < / div >
< p > Démarrer le service< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > $ systemctl --user start mount-lacie.service
< / code > < / pre > < / div > < / div >
< p > Status< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > $ systemctl --user status mount-lacie.service
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > ● mount-lacie.service - Montage disque usb lacie
Loaded: loaded (/home/yannick/.config/systemd/user/mount-lacie.service; disabled; vendor preset: enabled)
Active: active (exited) since Thu 2020-08-13 14:21:32 CEST; 11s ago
Process: 5072 ExecStart=/usr/local/bin/usbext /mnt/lacie (code=exited, status=0/SUCCESS)
Main PID: 5072 (code=exited, status=0/SUCCESS)
août 13 14:21:32 yannick-pc systemd[924]: Starting Montage disque usb lacie...
août 13 14:21:32 yannick-pc systemd[924]: Finished Montage disque usb lacie.
< / code > < / pre > < / div > < / div >
< p > Activation< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > $ systemctl --user enable mount-lacie.service
< / code > < / pre > < / div > < / div >
< p > < strong > Les liens “LaCie”< / strong > < br / >
Créer les liens avec “LaCie”< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo ln -s /mnt/lacie/data/devel /home/yannick/media/devel
sudo ln -s /mnt/lacie/data/dplus /home/yannick/media/dplus
sudo ln -s /mnt/lacie/data/BiblioCalibre /home/yannick/media/BiblioCalibre
sudo ln -s /mnt/lacie/data/CalibreTechnique /home/yannick/media/CalibreTechnique
sudo ln -s /mnt/lacie/data/music /home/yannick/media/music
< / code > < / pre > < / div > < / div >
< p > Liste des liens $HOME/media/< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > ls -la $HOME/media/ |grep ^l |awk '{print $9,$10,$11;}'
< / code > < / pre > < / div > < / div >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > BiblioCalibre -> /mnt/lacie/data/BiblioCalibre
CalibreTechnique -> /mnt/lacie/data/CalibreTechnique
devel -> /mnt/lacie/data/devel
dplus -> /mnt/lacie/data/dplus
music -> /mnt/lacie/data/music
< / code > < / pre > < / div > < / div >
< h4 id = "rsync-lacie-backup" > Rsync LaCie Backup< / h4 >
< p > On rend accessible le dossier data : < code class = "language-plaintext highlighter-rouge" > sudo chown $USER.$USER /mnt/lacie/data/< / code > < br / >
Les scripts de synchronisation entre le disque USB3 “LaCie” et backup xoyaz.xyz< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > nano /mnt/lacie/data/music_backup.sh
< / code > < / pre > < / div > < / div >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "c" > # Synchro music avec Backup - music_backup.sh< / span >
rsync < span class = "nt" > -avz< / span > < span class = "nt" > --progress< / span > < span class = "nt" > --stats< / span > < span class = "nt" > --human-readable< / span > < span class = "nt" > --delete< / span > < span class = "nt" > --rsync-path< / span > < span class = "o" > =< / span > < span class = "s2" > "sudo rsync"< / span > < span class = "nt" > -e< / span > < span class = "s2" > "ssh -p 55036 -i /home/yannick/.ssh/OVZ-STORAGE-128 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"< / span > /mnt/lacie/data/music/< span class = "k" > *< / span > usernl@xoyaz.xyz:/home/usernl/backup/musique/
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > chmod +x /mnt/lacie/data/music_backup.sh
nano /mnt/lacie/data/CalibreTechnique_backup.sh
< / code > < / pre > < / div > < / div >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "c" > # Synchro CalibreTechnique avec Backup - CalibreTechnique_backup.sh< / span >
rsync < span class = "nt" > -avz< / span > < span class = "nt" > --progress< / span > < span class = "nt" > --stats< / span > < span class = "nt" > --human-readable< / span > < span class = "nt" > --delete< / span > < span class = "nt" > --rsync-path< / span > < span class = "o" > =< / span > < span class = "s2" > "sudo rsync"< / span > < span class = "nt" > -e< / span > < span class = "s2" > "ssh -p 55036 -i /home/yannick/.ssh/OVZ-STORAGE-128 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"< / span > /mnt/lacie/data/CalibreTechnique/< span class = "k" > *< / span > usernl@xoyaz.xyz:/home/usernl/backup/CalibreTechnique/
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > chmod +x /mnt/lacie/data/CalibreTechnique_backup.sh
nano /mnt/lacie/data/BiblioCalibre_backup.sh
< / code > < / pre > < / div > < / div >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "c" > # Synchro BiblioCalibre avec Backup - BiblioCalibre_backup.sh< / span >
rsync < span class = "nt" > -avz< / span > < span class = "nt" > --progress< / span > < span class = "nt" > --stats< / span > < span class = "nt" > --human-readable< / span > < span class = "nt" > --delete< / span > < span class = "nt" > --rsync-path< / span > < span class = "o" > =< / span > < span class = "s2" > "sudo rsync"< / span > < span class = "nt" > -e< / span > < span class = "s2" > "ssh -p 55036 -i /home/yannick/.ssh/OVZ-STORAGE-128 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"< / span > /mnt/lacie/data/BiblioCalibre/< span class = "k" > *< / span > usernl@xoyaz.xyz:/home/usernl/backup/BiblioCalibre/
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > chmod +x /mnt/lacie/data/BiblioCalibre_backup.sh
nano /mnt/lacie/data/osm-new_backup.sh
< / code > < / pre > < / div > < / div >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "c" > # Synchro osm-new avec Backup - osm-new_backup.sh< / span >
rsync < span class = "nt" > -avz< / span > < span class = "nt" > --progress< / span > < span class = "nt" > --stats< / span > < span class = "nt" > --human-readable< / span > < span class = "nt" > --delete< / span > < span class = "nt" > --rsync-path< / span > < span class = "o" > =< / span > < span class = "s2" > "sudo rsync"< / span > < span class = "nt" > -e< / span > < span class = "s2" > "ssh -p 55036 -i /home/yannick/.ssh/OVZ-STORAGE-128 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"< / span > /mnt/lacie/data/devel/ouestline/osm-new/< span class = "k" > *< / span > usernl@xoyaz.xyz:/home/usernl/backup/osm-new/
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > chmod +x /mnt/lacie/data/osm-new_backup.sh
nano /mnt/lacie/data/ouestline-xoyize.xyz.sh
< / code > < / pre > < / div > < / div >
< div class = "language-bash highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "c" > # synchro ouestline avec xoyize.xyz - ouestline-xoyize.xyz.sh< / span >
rsync < span class = "nt" > -avz< / span > < span class = "nt" > --progress< / span > < span class = "nt" > --stats< / span > < span class = "nt" > --human-readable< / span > < span class = "nt" > --delete< / span > /mnt/lacie/data/devel/ouestline/< span class = "k" > *< / span > /net/xoyize/data/ouestline/
< / code > < / pre > < / div > < / div >
< h3 id = "conteneur-lxc-debian10" > Conteneur LXC Debian10< / h3 >
< p > < a href = "/2020/08/12/Archlinux_conteneur_LXC_debian_10_(buster).html" > Archlinux conteneur LXC debian 10 (buster) + Jekyll< / a > < / p >
< h3 id = "wireguardgtkwgmullvad" > Wireguard(GtkWg)/Mullvad< / h3 >
< p > Désactiver wireguard< / 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 -> Paramètres -> Session et démarrage”, Démarrage automatique d’ applications< br / >
< img src = "/images/sup-wireguard.png" alt = "" width = "400" / > < / p >
< p > Soit on installe < strong > mullvad< / strong > desktop ou on réactualise < strong > wiregard/mullvad< / strong > < / p >
< h4 id = "mullvad" > Mullvad< / h4 >
< p > < strong > Alternative A - Installation binaire< / strong > < / p >
< p > < a href = "/2019/01/22/Mullvad-VPN-IPV4-IPV6.html" > Connexions VPN fournisseur Mullvad< / a > < / p >
< p > Installation binaire< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > yay -S mullvad-vpn-bin openvpn openresolv
< / code > < / pre > < / div > < / div >
< p > Après l’ installation, vous devez activer et démarrer le service systemd< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl enable mullvad-daemon.service
sudo systemctl start mullvad-daemon.service
< / code > < / pre > < / div > < / div >
< p > < strong > Alternative B - Installation via dépôt deb< / strong > < / p >
< p > < strong > desktop< / strong > < br / >
Télécharger le .deb depuis le site < a href = "https://mullvad.net/fr/download/" > https://mullvad.net/fr/download/< / a > < br / >
Le convertir : < code class = "language-plaintext highlighter-rouge" > debtap -Q MullvadVPN-2020.3_amd64.deb< / code > < br / >
L’ installer : < code class = "language-plaintext highlighter-rouge" > sudo pacman -U mullvad-vpn-2020.3.0-1-x86_64.pkg.tar.xz< / code > < / p >
< p > Des liens sont créés< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > /etc/systemd/system/multi-user.target.wants/mullvad-daemon.service -> '/opt/Mullvad VPN/resources/mullvad-daemon.service'
/etc/systemd/system/mullvad-daemon.service -> '/opt/Mullvad VPN/resources/mullvad-daemon.service'
< / code > < / pre > < / div > < / div >
< p > Structure dossier < strong > /opt/Mullvad VPN/< / strong > < / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > [yannick@yannick-pc ~]$ tree -L 2 /opt/Mullvad\ VPN/
/opt/Mullvad VPN/
├── LICENSE.electron.txt
├── LICENSES.chromium.html
├── chrome_100_percent.pak
├── chrome_200_percent.pak
├── icudtl.dat
├── libEGL.so
├── libGLESv2.so
├── libffmpeg.so
├── locales
│ ├── en-GB.pak
│ ├── en-US.pak
│ └── fr.pak
├── mullvad-gui
├── mullvad-vpn
├── natives_blob.bin
├── resources
│ ├── CHANGELOG.md
│ ├── api_root_ca.pem
│ ├── app.asar
│ ├── ca.crt
│ ├── libtalpid_openvpn_plugin.so
│ ├── mullvad-daemon
│ ├── mullvad-daemon.conf
│ ├── mullvad-daemon.service
│ ├── mullvad-problem-report
│ ├── openvpn
│ ├── relays.json
│ └── sslocal
├── resources.pak
├── snapshot_blob.bin
├── swiftshader
│ ├── libEGL.so
│ ├── libGLESv2.so
│ └── libvk_swiftshader.so
└── v8_context_snapshot.bin
< / code > < / pre > < / div > < / div >
< h4 id = "gtkwg---wiregardmullvad" > GtkWg - Wiregard/Mullvad< / h4 >
< p > < a href = "https://mullvad.net/fr/account/#/wireguard-config/?platform=linux" > Générateur de fichier de configuration WireGuard< / a > < / p >
< p > < img src = "/images/wgen01.png" alt = "wg" width = "400" / > < br / >
Clé publique < strong > h7hl1V9H0cC66XBS7uzWBxiouQS77M+Nabq38VkFoho=< / strong > < / p >
< blockquote >
< p > REMARQUE Nous n’ avons jamais accès à votre clé privée, seule la clé publique nous est envoyée. La clé privée est stockée localement dans votre navigateur afin que vous puissiez créer plusieurs fichiers à partir de la même clé et dès que vous quittez cette page, elle est supprimée.< / p >
< / blockquote >
< p > < img src = "/images/wgen02.png" alt = "wg" width = "400" / > < br / >
Télécharger l’ archive ZIP < strong > mullvad_wireguard_linux_all_all.zip< / strong > dans le dossier < code class = "language-plaintext highlighter-rouge" > /home/yannick/Private/< / code > et décompresser l’ archive< br / >
Effacer les anciennes configurations : < code class = "language-plaintext highlighter-rouge" > rm /usr/local/share/gtkwg/mullvad_config_linux_all/*.conf< / code > < br / >
Copier les nouvelles configurations : < code class = "language-plaintext highlighter-rouge" > cp /home/yannick/Private/mullvad/*.conf /usr/local/share/gtkwg/mullvad_config_linux_all/< / code > < / p >
< p > Vérifier la configuration serveur existante< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > cat /usr/local/share/gtkwg/data/wg-config.json |jq
< / code > < / pre > < / div > < / div >
< div class = "language-json highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > < span class = "p" > {< / span > < span class = "w" >
< / span > < span class = "nl" > "gtkwg_version"< / span > < span class = "p" > :< / span > < span class = "w" > < / span > < span class = "s2" > "1.1"< / span > < span class = "p" > ,< / span > < span class = "w" >
< / span > < span class = "nl" > "gtkwg_date"< / span > < span class = "p" > :< / span > < span class = "w" > < / span > < span class = "s2" > "19/06/2020"< / span > < span class = "p" > ,< / span > < span class = "w" >
< / span > < span class = "nl" > "wg_client_service"< / span > < span class = "p" > :< / span > < span class = "w" > < / span > < span class = "s2" > "wg-quick@wg0"< / span > < span class = "p" > ,< / span > < span class = "w" >
< / span > < span class = "nl" > "chemin_path_conf_wg"< / span > < span class = "p" > :< / span > < span class = "w" > < / span > < span class = "s2" > "mullvad_config_linux_all/"< / span > < span class = "p" > ,< / span > < span class = "w" >
< / span > < span class = "nl" > "chemin_path_flag"< / span > < span class = "p" > :< / span > < span class = "w" > < / span > < span class = "s2" > "flags/"< / span > < span class = "p" > ,< / span > < span class = "w" >
< / span > < span class = "nl" > "wg_chemin_json"< / span > < span class = "p" > :< / span > < span class = "w" > < / span > < span class = "s2" > "data/"< / span > < span class = "p" > ,< / span > < span class = "w" >
< / span > < span class = "nl" > "wg0_conf"< / span > < span class = "p" > :< / span > < span class = "w" > < / span > < span class = "s2" > "/etc/wireguard/wg0.conf"< / span > < span class = "p" > ,< / span > < span class = "w" >
< / span > < span class = "nl" > "wg_actif_conf"< / span > < span class = "p" > :< / span > < span class = "w" > < / span > < span class = "s2" > "mullvad-fr7"< / span > < span class = "p" > ,< / span > < span class = "w" >
< / span > < span class = "nl" > "wg_actif_pays"< / span > < span class = "p" > :< / span > < span class = "w" > < / span > < span class = "s2" > "France"< / span > < span class = "p" > ,< / span > < span class = "w" >
< / span > < span class = "nl" > "wg_actif_flag"< / span > < span class = "p" > :< / span > < span class = "w" > < / span > < span class = "s2" > "fr.png"< / span > < span class = "w" >
< / span > < span class = "p" > }< / span > < span class = "w" >
< / span > < / code > < / pre > < / div > < / div >
< p > Réactualiser la configuration serveur< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo cp /usr/local/share/gtkwg/mullvad_config_linux_all/mullvad-fr7.conf /etc/wireguard/wg0.conf
< / code > < / pre > < / div > < / div >
< p > Si mullvad desktop est installé : < code class = "language-plaintext highlighter-rouge" > yay -R mullvad-bin< / code > < br / >
Réactiver wireguard< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > sudo systemctl start wg-quick@wg0
sudo systemctl enable wg-quick@wg0
< / code > < / pre > < / div > < / div >
< p > xfce: “Menu -> Paramètres -> Session et démarrage”, Démarrage automatique d’ applications< br / >
< img src = "/images/enable-wireguard.png" alt = "" width = "400" / > < / p >
< p > Fermer la session puis la réouvrir< / p >
< h2 id = "box-internet-free" > BOX Internet (Free)< / h2 >
< p > Paramètres - Réseau Local → DHCP< / p >
< p > < img src = "/images/box-baux-statiques.png" alt = "" / > < br / >
Baux statiques< / p >
< p > Paramètres - Connexion Internet → Configuration IPV6< / p >
< p > Attention si vous configurez un Next Hop pour le premier subnet, il ne sera plus annoncé par la Freebox sur votre réseau. Cela empêchera les appareils dépendant d’ IPv6 de fonctionner sans un routeur tiers qui gère ce subnet.{:.warning}< / p >
< p > < img src = "/images/box-delegation-ipv6.png" alt = "" / > < / p >
< table >
< thead >
< tr >
< th > N°< / th >
< th > Désignation< / th >
< th > domaine< / th >
< th > Réseau< / th >
< th > Mac Address< / th >
< th > IPV4< / th >
< th > IPV6< / th >
< th > Next Hop< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > 1< / td >
< td > VM Debian10/PC1< / td >
< td > < / td >
< td > enp1s0< / td >
< td > 52:54:00:a2:03:6b< / td >
< td > 192.168.0.100/24< / td >
< td > 2a01:e34:eebf:df2::1/64< / td >
< td > fe80::5054:ff:fea2:36b/64< / td >
< / tr >
< tr >
< td > 2< / td >
< td > A20-Olinuxino-Micro< / td >
< td > xoyize.xyz< / td >
< td > eth0< / td >
< td > 02:c2:09:40:f2:2b< / td >
< td > 192.168.0.46/24< / td >
< td > 2a01:e34:eebf:df3::1/64< / td >
< td > fe80::c2:9ff:fe40:f22b/64< / td >
< / tr >
< / tbody >
< / table >
< p > Adresse IPV6 lien local : fe80::224:d4ff:fea6:aa20< / p >
< h2 id = "synthese----06112020" > SYNTHESE - 06//11/2020< / h2 >
< h4 id = "paramétrage-xfce" > Paramétrage XFCE< / h4 >
< 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 >
< h4 id = "lvm-pvs-vgs-et-lvs" > LVM (pvs vgs et lvs)< / h4 >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > [root@yannick-pc yannick]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 ct120bx lvm2 a-- < 111,01g 0
/dev/sdb1 ssd-512 lvm2 a-- < 476,94g 0
/dev/sdc3 vg-nas-one lvm2 a-- < 3,64t 2,66t
/dev/sdd1 hdd-2g lvm2 a-- < 1,82t 0
[root@yannick-pc yannick]# vgs
VG #PV #LV #SN Attr VSize VFree
ct120bx 1 1 0 wz--n- < 111,01g 0
hdd-2g 1 1 0 wz--n- < 1,82t 0
ssd-512 1 1 0 wz--n- < 476,94g 0
vg-nas-one 1 2 0 wz--n- < 3,64t 2,66t
[root@yannick-pc yannick]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root ct120bx -wi-ao---- < 111,01g
lvhdd hdd-2g -wi-ao---- < 1,82t
virtuel ssd-512 -wi-ao---- < 476,94g
sav vg-nas-one -wi-ao---- 500,00g
yanplus vg-nas-one -wi-ao---- 500,00g
< / code > < / pre > < / div > < / div >
< h4 id = "etcfstab-fdisk--lsblk" > /etc/fstab, fdisk , lsblk< / h4 >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > [root@yannick-pc yannick]# cat /etc/fstab
# /dev/mapper/ct120bx-root
UUID=1cb72c0a-defd-407d-9a74-3e6f6f2e8ca2 / ext4 rw,relatime 0 1
# /dev/sda2
UUID=c34e370e-0bef-4b1b-847a-72516bc116dd /boot ext2 rw,relatime,stripe=4 0 2
# /dev/sda1
UUID=3D7B-0416 /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/mapper/vg--nas--one-yanplus
UUID=c6ab468e-ed7b-491e-b7c3-010a70816d0c /home/yannick/media ext4 defaults 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
# Montage disque mobile hdd 2G
UUID=1fa41668-dfd3-476b-8bf9-387d172c7db5 /srv/hdd2g ext4 defaults 0 2
# Montage pour le conteneur debian-10
/srv/hdd2g/data/devel /var/lib/lxc/debian-10/rootfs/home/lxcdeb/devel none bind 0 0
# dossier data du serveur xoyize.xyz
# dossiers _posts ,images et files
/home/yannick/media/statique /var/lib/lxc/debian-10/rootfs/home/lxcdeb/statique none bind 0 0
< / code > < / pre > < / div > < / div >
< p > fdisk< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > [root@yannick-pc yannick]# 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/sdd : 1,82 TiB, 2000398934016 octets, 3907029168 secteurs
Disque /dev/mapper/ct120bx-root : 111,01 GiB, 119193731072 octets, 232800256 secteurs
Disque /dev/mapper/ssd--512-virtuel : 476,94 GiB, 512107741184 octets, 1000210432 secteurs
Disque /dev/mapper/vg--nas--one-yanplus : 500 GiB, 536870912000 octets, 1048576000 secteurs
Disque /dev/mapper/vg--nas--one-sav : 500 GiB, 536870912000 octets, 1048576000 secteurs
Disque /dev/mapper/hdd--2g-lvhdd : 1,82 TiB, 2000393601024 octets, 3907018752 secteurs
< / code > < / pre > < / div > < / div >
< p > lsblk< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > 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-root 254:0 0 111G 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-yanplus 254:2 0 500G 0 lvm /home/yannick/media
└─vg--nas--one-sav 254:3 0 500G 0 lvm /srv/sav
sdd 8:48 0 1,8T 0 disk
└─sdd1 8:49 0 1,8T 0 part
└─hdd--2g-lvhdd 254:4 0 1,8T 0 lvm /srv/hdd2g
< / code > < / pre > < / div > < / div >
< h4 id = "liste-des-liens-usrlocalbin-et-alias" > Liste des liens (/usr/local/bin/) et alias< / h4 >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > ls -l /usr/local/bin/ |grep '^l' | awk '{print $9, " ", $10, $11;}'
< / code > < / pre > < / div > < / div >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > allsync -> /home/yannick/scripts/all-synchro.sh
borglist -> /home/yannick/scripts/borglist
pdfdim -> /home/yannick/scripts/compress
postman -> /opt/Postman/Postman
usbext -> /home/yannick/scripts/disque_externe_usb_lacie.sh
wing-personal7.1 -> ../../../opt/wing-personal/wing-personal
< / code > < / pre > < / div > < / div >
< p > Alias< / p >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > [yannick@yannick-pc ~]$ 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 m4a --audio-quality 0 --output "~/Musique/%(title)s.%(ext)s"'
alias cryfs-autostart='/home/yannick/scripts/cryfs-autostart'
alias dnsleak='/home/yannick/scripts/dnsleaktest.sh'
alias ls='ls --color=auto'
alias nmapl='sudo nmap -T4 -sP 192.168.0.0/24'
alias odt2html='/home/yannick/Documents/odt2html+index/_odt2html+index'
alias otp='/home/yannick/scripts/generer-code-2fa-vers-presse-papier-toutes-les-30s.sh'
alias posturl='/home/yannick/scripts/posturl'
alias rename='/home/yannick/scripts/remplacer-les-espaces-accents-dans-une-expression.sh'
alias sshm='/home/yannick/scripts/ssh-manager.sh'
alias sshsyn='/home/yannick/scripts/synchro-ssh-xoyize.xyz.sh'
alias sslxc='/home/yannick/scripts/sslxc'
alias ssvbox='/home/yannick/scripts/ssvbox'
alias static='sshm lxcdeb exe '\''sudo journalctl -f -u yannstatic.service'\'''
alias synchro='sshm lxcdeb exe '\''sudo journalctl -f -u synchro_site.service'\'''
alias tmuxssh='/home/yannick/scripts/tmux-ssd.sh'
alias traduc='/home/yannick/scripts/traduction-page-internet'
alias wgkey='/home/yannick/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 >
< h3 id = "applis-dépot-aur" > Applis dépot aur< / h3 >
< div class = "language-plaintext highlighter-rouge" > < div class = "highlight" > < pre class = "highlight" > < code > birdtray
brave-bin
firefox-nightly-fr
freetube-bin
tor-browser
yay-bin
< / code > < / pre > < / div > < / div >
< / div >
< div class = "d-print-none" > < footer class = "article__footer" > < meta itemprop = "dateModified" content = "2020-09-13T00:00:00+02: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 >
  < / div >
-->
< / footer >
< div class = "article__section-navigator clearfix" > < div class = "previous" > < span > PRÉCÉDENT< / span > < a href = "/2020/09/12/KVM-QEMU-virtualisation-linux.html" > Virtualisation KVM/QEMU< / a > < / div > < div class = "next" > < span > SUIVANT< / span > < a href = "/2020/09/14/Outils-test-DNS-Reseau-Messagerie-Vulnerabilite-Performance.html" > Outils de test réseau, DNS, messagerie (dkim,spf,spam et virus) ,vulnérabilités, performances site< / a > < / div > < / div > < / div >
< / div >
< script > ( f u n c t i o n ( ) {
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 > ( f u n c t i o n ( ) {
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} {title}< / a > (Création {create})< / li > '
})
< / script >
< / div > < / div >
< script > ( f u n c t i o n ( ) {
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 > ( f u n c t i o n ( ) {
var $root = document.getElementsByClassName('root')[0];
if (window.hasEvent('touchstart')) {
$root.dataset.isTouch = true;
document.addEventListener('touchstart', function(){}, false);
}
})();
< / script >
< / body >
< / html >