yannstatic/static/2022/12/24/EndeavourOS-XFCE-LVM.html

2870 lines
230 KiB
HTML
Raw Permalink Normal View History

2024-10-31 20:18:37 +01:00
<!DOCTYPE html><html lang="fr">
<head><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"><title>Portable Dell Latitude E6230 - EndeavourOS XFCE sur partition LVM - YannStatic</title>
<meta name="description" content="EndeavourOS est une distribution GNU/Linux basée sur Arch Linux">
<link rel="canonical" href="https://static.rnmkcy.eu/2022/12/24/EndeavourOS-XFCE-LVM.html"><link rel="alternate" type="application/rss+xml" title="YannStatic" href="/feed.xml">
<!-- - include head/favicon.html - -->
<link rel="shortcut icon" type="image/png" href="/assets/favicon/favicon.png"><link rel="stylesheet" href="/assets/css/main.css"><link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" ><!-- start custom head snippets --><link rel="stylesheet" href="/assets/css/expand.css">
<!-- end custom head snippets --><script>(function() {
window.isArray = function(val) {
return Object.prototype.toString.call(val) === '[object Array]';
};
window.isString = function(val) {
return typeof val === 'string';
};
window.hasEvent = function(event) {
return 'on'.concat(event) in window.document;
};
window.isOverallScroller = function(node) {
return node === document.documentElement || node === document.body || node === window;
};
window.isFormElement = function(node) {
var tagName = node.tagName;
return tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA';
};
window.pageLoad = (function () {
var loaded = false, cbs = [];
window.addEventListener('load', function () {
var i;
loaded = true;
if (cbs.length > 0) {
for (i = 0; i < cbs.length; i++) {
cbs[i]();
}
}
});
return {
then: function(cb) {
cb && (loaded ? cb() : (cbs.push(cb)));
}
};
})();
})();
(function() {
window.throttle = function(func, wait) {
var args, result, thisArg, timeoutId, lastCalled = 0;
function trailingCall() {
lastCalled = new Date;
timeoutId = null;
result = func.apply(thisArg, args);
}
return function() {
var now = new Date,
remaining = wait - (now - lastCalled);
args = arguments;
thisArg = this;
if (remaining <= 0) {
clearTimeout(timeoutId);
timeoutId = null;
lastCalled = now;
result = func.apply(thisArg, args);
} else if (!timeoutId) {
timeoutId = setTimeout(trailingCall, remaining);
}
return result;
};
};
})();
(function() {
var Set = (function() {
var add = function(item) {
var i, data = this._data;
for (i = 0; i < data.length; i++) {
if (data[i] === item) {
return;
}
}
this.size ++;
data.push(item);
return data;
};
var Set = function(data) {
this.size = 0;
this._data = [];
var i;
if (data.length > 0) {
for (i = 0; i < data.length; i++) {
add.call(this, data[i]);
}
}
};
Set.prototype.add = add;
Set.prototype.get = function(index) { return this._data[index]; };
Set.prototype.has = function(item) {
var i, data = this._data;
for (i = 0; i < data.length; i++) {
if (this.get(i) === item) {
return true;
}
}
return false;
};
Set.prototype.is = function(map) {
if (map._data.length !== this._data.length) { return false; }
var i, j, flag, tData = this._data, mData = map._data;
for (i = 0; i < tData.length; i++) {
for (flag = false, j = 0; j < mData.length; j++) {
if (tData[i] === mData[j]) {
flag = true;
break;
}
}
if (!flag) { return false; }
}
return true;
};
Set.prototype.values = function() {
return this._data;
};
return Set;
})();
window.Lazyload = (function(doc) {
var queue = {js: [], css: []}, sources = {js: {}, css: {}}, context = this;
var createNode = function(name, attrs) {
var node = doc.createElement(name), attr;
for (attr in attrs) {
if (attrs.hasOwnProperty(attr)) {
node.setAttribute(attr, attrs[attr]);
}
}
return node;
};
var end = function(type, url) {
var s, q, qi, cbs, i, j, cur, val, flag;
if (type === 'js' || type ==='css') {
s = sources[type], q = queue[type];
s[url] = true;
for (i = 0; i < q.length; i++) {
cur = q[i];
if (cur.urls.has(url)) {
qi = cur, val = qi.urls.values();
qi && (cbs = qi.callbacks);
for (flag = true, j = 0; j < val.length; j++) {
cur = val[j];
if (!s[cur]) {
flag = false;
}
}
if (flag && cbs && cbs.length > 0) {
for (j = 0; j < cbs.length; j++) {
cbs[j].call(context);
}
qi.load = true;
}
}
}
}
};
var load = function(type, urls, callback) {
var s, q, qi, node, i, cur,
_urls = typeof urls === 'string' ? new Set([urls]) : new Set(urls), val, url;
if (type === 'js' || type ==='css') {
s = sources[type], q = queue[type];
for (i = 0; i < q.length; i++) {
cur = q[i];
if (_urls.is(cur.urls)) {
qi = cur;
break;
}
}
val = _urls.values();
if (qi) {
callback && (qi.load || qi.callbacks.push(callback));
callback && (qi.load && callback());
} else {
q.push({
urls: _urls,
callbacks: callback ? [callback] : [],
load: false
});
for (i = 0; i < val.length; i++) {
node = null, url = val[i];
if (s[url] === undefined) {
(type === 'js' ) && (node = createNode('script', { src: url }));
(type === 'css') && (node = createNode('link', { rel: 'stylesheet', href: url }));
if (node) {
node.onload = (function(type, url) {
return function() {
end(type, url);
};
})(type, url);
(doc.head || doc.body).appendChild(node);
s[url] = false;
}
}
}
}
}
};
return {
js: function(url, callback) {
load('js', url, callback);
},
css: function(url, callback) {
load('css', url, callback);
}
};
})(this.document);
})();
</script><script>
(function() {
var TEXT_VARIABLES = {
version: '2.2.6',
sources: {
font_awesome: 'https://use.fontawesome.com/releases/v5.0.13/css/all.css',
jquery: '/assets/js/jquery.min.js',
leancloud_js_sdk: '//cdn.jsdelivr.net/npm/leancloud-storage@3.13.2/dist/av-min.js',
chart: 'https://cdn.bootcss.com/Chart.js/2.7.2/Chart.bundle.min.js',
gitalk: {
js: 'https://cdn.bootcss.com/gitalk/1.2.2/gitalk.min.js',
css: 'https://cdn.bootcss.com/gitalk/1.2.2/gitalk.min.css'
},
valine: 'https://unpkg.com/valine/dist/Valine.min.js'
},
site: {
toc: {
selectors: 'h1,h2,h3'
}
},
paths: {
search_js: '/assets/search.js'
}
};
window.TEXT_VARIABLES = TEXT_VARIABLES;
})();
</script>
</head>
<body>
<div class="root" data-is-touch="false">
<div class="layout--page js-page-root"><!----><div class="page__main js-page-main page__viewport hide-footer has-aside has-aside cell cell--auto">
<div class="page__main-inner"><div class="page__header d-print-none"><header class="header"><div class="main">
<div class="header__title">
<div class="header__brand"><svg id="svg" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="400" height="478.9473684210526" viewBox="0, 0, 400,478.9473684210526"><g id="svgg"><path id="path0" d="M308.400 56.805 C 306.970 56.966,303.280 57.385,300.200 57.738 C 290.906 58.803,278.299 59.676,269.200 59.887 L 260.600 60.085 259.400 61.171 C 258.010 62.428,256.198 63.600,255.645 63.600 C 255.070 63.600,252.887 65.897,252.598 66.806 C 252.460 67.243,252.206 67.600,252.034 67.600 C 251.397 67.600,247.206 71.509,247.202 72.107 C 247.201 72.275,246.390 73.190,245.400 74.138 C 243.961 75.517,243.598 76.137,243.592 77.231 C 243.579 79.293,241.785 83.966,240.470 85.364 C 239.176 86.740,238.522 88.365,237.991 91.521 C 237.631 93.665,236.114 97.200,235.554 97.200 C 234.938 97.200,232.737 102.354,232.450 104.472 C 232.158 106.625,230.879 109.226,229.535 110.400 C 228.933 110.926,228.171 113.162,226.434 119.500 C 226.178 120.435,225.795 121.200,225.584 121.200 C 225.373 121.200,225.200 121.476,225.200 121.813 C 225.200 122.149,224.885 122.541,224.500 122.683 C 223.606 123.013,223.214 123.593,223.204 124.600 C 223.183 126.555,220.763 132.911,219.410 134.562 C 218.443 135.742,217.876 136.956,217.599 138.440 C 217.041 141.424,215.177 146.434,214.532 146.681 C 214.240 146.794,214.000 147.055,214.000 147.261 C 214.000 147.467,213.550 148.086,213.000 148.636 C 212.450 149.186,212.000 149.893,212.000 150.208 C 212.000 151.386,208.441 154.450,207.597 153.998 C 206.319 153.315,204.913 150.379,204.633 147.811 C 204.365 145.357,202.848 142.147,201.759 141.729 C 200.967 141.425,199.200 137.451,199.200 135.974 C 199.200 134.629,198.435 133.224,196.660 131.311 C 195.363 129.913,194.572 128.123,193.870 125.000 C 193.623 123.900,193.236 122.793,193.010 122.540 C 190.863 120.133,190.147 118.880,188.978 115.481 C 188.100 112.928,187.151 111.003,186.254 109.955 C 185.358 108.908,184.518 107.204,183.847 105.073 C 183.280 103.273,182.497 101.329,182.108 100.753 C 181.719 100.177,180.904 98.997,180.298 98.131 C 179.693 97.265,178.939 95.576,178.624 94.378 C 178.041 92.159,177.125 90.326,175.023 87.168 C 174.375 86.196,173.619 84.539,173.342 83.486 C 172.800 81.429,171.529 79.567,170.131 78.785 C 169.654 78.517,168.697 77.511,168.006 76.549 C 167.316 75.587,166.594 74.800,166.402 74.800 C 166.210 74.800,164.869 73.633,163.421 72.206 C 160.103 68.936,161.107 69.109,146.550 69.301 C 133.437 69.474,128.581 70.162,126.618 72.124 C 126.248 72.495,125.462 72.904,124.872 73.033 C 124.282 73.163,123.088 73.536,122.219 73.863 C 121.349 74.191,119.028 74.638,117.061 74.858 C 113.514 75.254,109.970 76.350,108.782 77.419 C 107.652 78.436,100.146 80.400,97.388 80.400 C 95.775 80.400,93.167 81.360,91.200 82.679 C 90.430 83.195,89.113 83.804,88.274 84.031 C 85.875 84.681,78.799 90.910,74.400 96.243 L 73.400 97.456 73.455 106.028 C 73.526 117.055,74.527 121.238,77.820 124.263 C 78.919 125.273,80.400 127.902,80.400 128.842 C 80.400 129.202,81.075 130.256,81.900 131.186 C 83.563 133.059,85.497 136.346,86.039 138.216 C 86.233 138.886,87.203 140.207,88.196 141.153 C 89.188 142.098,90.000 143.104,90.000 143.388 C 90.000 144.337,92.129 148.594,92.869 149.123 C 93.271 149.410,93.600 149.831,93.600 150.059 C 93.600 150.286,93.932 150.771,94.337 151.136 C 94.743 151.501,95.598 153.004,96.237 154.475 C 96.877 155.947,97.760 157.351,98.200 157.596 C 98.640 157.841,99.900 159.943,101.000 162.267 C 102.207 164.817,103.327 166.644,103.825 166.876 C 104.278 167.087,105.065 168.101,105.573 169.130 C 107.658 173.348,108.097 174.093,110.006 176.647 C 111.103 178.114,112.000 179.725,112.000 180.227 C 112.000 181.048,113.425 183.163,114.678 184.200 C 115.295 184.711,117.396 188.733,117.720 190.022 C 117.855 190.562,118.603 191.633,119.381 192.402 C 120.160 193.171,121.496 195.258,122.351 197.039 C 123.206 198.820,124.167 200.378,124.487 200.501 C 124.807 200.624,125.953 202.496,127.034 204.662 C 128.114 206.828,129.676 209.299,130.505 210.153 C 131.333 211.007,132.124 212.177,132.262 212.753 C 132.618 214.239,134.291 217.048,136.288 219.5
" href="/">YannStatic</a></div><!--<button class="button button--secondary button--circle search-button js-search-toggle"><i class="fas fa-search"></i></button>--><!-- <li><button class="button button--secondary button--circle search-button js-search-toggle"><i class="fas fa-search"></i></button></li> -->
<!-- Champ de recherche -->
<div id="searchbox" class="search search--dark" style="visibility: visible">
<div class="main">
<div class="search__header"></div>
<div class="search-bar">
<div class="search-box js-search-box">
<div class="search-box__icon-search"><i class="fas fa-search"></i></div>
<input id="search-input" type="text" />
<!-- <div class="search-box__icon-clear js-icon-clear">
<a><i class="fas fa-times"></i></a>
</div> -->
</div>
</div>
</div>
</div>
<!-- Script pointing to search-script.js -->
<script>/*!
* Simple-Jekyll-Search
* Copyright 2015-2020, Christian Fei
* Licensed under the MIT License.
*/
(function(){
'use strict'
var _$Templater_7 = {
compile: compile,
setOptions: setOptions
}
const options = {}
options.pattern = /\{(.*?)\}/g
options.template = ''
options.middleware = function () {}
function setOptions (_options) {
options.pattern = _options.pattern || options.pattern
options.template = _options.template || options.template
if (typeof _options.middleware === 'function') {
options.middleware = _options.middleware
}
}
function compile (data) {
return options.template.replace(options.pattern, function (match, prop) {
const value = options.middleware(prop, data[prop], options.template)
if (typeof value !== 'undefined') {
return value
}
return data[prop] || match
})
}
'use strict';
function fuzzysearch (needle, haystack) {
var tlen = haystack.length;
var qlen = needle.length;
if (qlen > tlen) {
return false;
}
if (qlen === tlen) {
return needle === haystack;
}
outer: for (var i = 0, j = 0; i < qlen; i++) {
var nch = needle.charCodeAt(i);
while (j < tlen) {
if (haystack.charCodeAt(j++) === nch) {
continue outer;
}
}
return false;
}
return true;
}
var _$fuzzysearch_1 = fuzzysearch;
'use strict'
/* removed: const _$fuzzysearch_1 = require('fuzzysearch') */;
var _$FuzzySearchStrategy_5 = new FuzzySearchStrategy()
function FuzzySearchStrategy () {
this.matches = function (string, crit) {
return _$fuzzysearch_1(crit.toLowerCase(), string.toLowerCase())
}
}
'use strict'
var _$LiteralSearchStrategy_6 = new LiteralSearchStrategy()
function LiteralSearchStrategy () {
this.matches = function (str, crit) {
if (!str) return false
str = str.trim().toLowerCase()
crit = crit.trim().toLowerCase()
return crit.split(' ').filter(function (word) {
return str.indexOf(word) >= 0
}).length === crit.split(' ').length
}
}
'use strict'
var _$Repository_4 = {
put: put,
clear: clear,
search: search,
setOptions: __setOptions_4
}
/* removed: const _$FuzzySearchStrategy_5 = require('./SearchStrategies/FuzzySearchStrategy') */;
/* removed: const _$LiteralSearchStrategy_6 = require('./SearchStrategies/LiteralSearchStrategy') */;
function NoSort () {
return 0
}
const data = []
let opt = {}
opt.fuzzy = false
opt.limit = 10
opt.searchStrategy = opt.fuzzy ? _$FuzzySearchStrategy_5 : _$LiteralSearchStrategy_6
opt.sort = NoSort
opt.exclude = []
function put (data) {
if (isObject(data)) {
return addObject(data)
}
if (isArray(data)) {
return addArray(data)
}
return undefined
}
function clear () {
data.length = 0
return data
}
function isObject (obj) {
return Boolean(obj) && Object.prototype.toString.call(obj) === '[object Object]'
}
function isArray (obj) {
return Boolean(obj) && Object.prototype.toString.call(obj) === '[object Array]'
}
function addObject (_data) {
data.push(_data)
return data
}
function addArray (_data) {
const added = []
clear()
for (let i = 0, len = _data.length; i < len; i++) {
if (isObject(_data[i])) {
added.push(addObject(_data[i]))
}
}
return added
}
function search (crit) {
if (!crit) {
return []
}
return findMatches(data, crit, opt.searchStrategy, opt).sort(opt.sort)
}
function __setOptions_4 (_opt) {
opt = _opt || {}
opt.fuzzy = _opt.fuzzy || false
opt.limit = _opt.limit || 10
opt.searchStrategy = _opt.fuzzy ? _$FuzzySearchStrategy_5 : _$LiteralSearchStrategy_6
opt.sort = _opt.sort || NoSort
opt.exclude = _opt.exclude || []
}
function findMatches (data, crit, strategy, opt) {
const matches = []
for (let i = 0; i < data.length && matches.length < opt.limit; i++) {
const match = findMatchesInObject(data[i], crit, strategy, opt)
if (match) {
matches.push(match)
}
}
return matches
}
function findMatchesInObject (obj, crit, strategy, opt) {
for (const key in obj) {
if (!isExcluded(obj[key], opt.exclude) && strategy.matches(obj[key], crit)) {
return obj
}
}
}
function isExcluded (term, excludedTerms) {
for (let i = 0, len = excludedTerms.length; i < len; i++) {
const excludedTerm = excludedTerms[i]
if (new RegExp(excludedTerm).test(term)) {
return true
}
}
return false
}
/* globals ActiveXObject:false */
'use strict'
var _$JSONLoader_2 = {
load: load
}
function load (location, callback) {
const xhr = getXHR()
xhr.open('GET', location, true)
xhr.onreadystatechange = createStateChangeListener(xhr, callback)
xhr.send()
}
function createStateChangeListener (xhr, callback) {
return function () {
if (xhr.readyState === 4 && xhr.status === 200) {
try {
callback(null, JSON.parse(xhr.responseText))
} catch (err) {
callback(err, null)
}
}
}
}
function getXHR () {
return window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP')
}
'use strict'
var _$OptionsValidator_3 = function OptionsValidator (params) {
if (!validateParams(params)) {
throw new Error('-- OptionsValidator: required options missing')
}
if (!(this instanceof OptionsValidator)) {
return new OptionsValidator(params)
}
const requiredOptions = params.required
this.getRequiredOptions = function () {
return requiredOptions
}
this.validate = function (parameters) {
const errors = []
requiredOptions.forEach(function (requiredOptionName) {
if (typeof parameters[requiredOptionName] === 'undefined') {
errors.push(requiredOptionName)
}
})
return errors
}
function validateParams (params) {
if (!params) {
return false
}
return typeof params.required !== 'undefined' && params.required instanceof Array
}
}
'use strict'
var _$utils_9 = {
merge: merge,
isJSON: isJSON
}
function merge (defaultParams, mergeParams) {
const mergedOptions = {}
for (const option in defaultParams) {
mergedOptions[option] = defaultParams[option]
if (typeof mergeParams[option] !== 'undefined') {
mergedOptions[option] = mergeParams[option]
}
}
return mergedOptions
}
function isJSON (json) {
try {
if (json instanceof Object && JSON.parse(JSON.stringify(json))) {
return true
}
return false
} catch (err) {
return false
}
}
var _$src_8 = {};
(function (window) {
'use strict'
let options = {
searchInput: null,
resultsContainer: null,
json: [],
success: Function.prototype,
searchResultTemplate: '<li><a href="{url}" title="{desc}">{title}</a></li>',
templateMiddleware: Function.prototype,
sortMiddleware: function () {
return 0
},
noResultsText: 'No results found',
limit: 10,
fuzzy: false,
debounceTime: null,
exclude: []
}
let debounceTimerHandle
const debounce = function (func, delayMillis) {
if (delayMillis) {
clearTimeout(debounceTimerHandle)
debounceTimerHandle = setTimeout(func, delayMillis)
} else {
func.call()
}
}
const requiredOptions = ['searchInput', 'resultsContainer', 'json']
/* removed: const _$Templater_7 = require('./Templater') */;
/* removed: const _$Repository_4 = require('./Repository') */;
/* removed: const _$JSONLoader_2 = require('./JSONLoader') */;
const optionsValidator = _$OptionsValidator_3({
required: requiredOptions
})
/* removed: const _$utils_9 = require('./utils') */;
window.SimpleJekyllSearch = function (_options) {
const errors = optionsValidator.validate(_options)
if (errors.length > 0) {
throwError('You must specify the following required options: ' + requiredOptions)
}
options = _$utils_9.merge(options, _options)
_$Templater_7.setOptions({
template: options.searchResultTemplate,
middleware: options.templateMiddleware
})
_$Repository_4.setOptions({
fuzzy: options.fuzzy,
limit: options.limit,
sort: options.sortMiddleware,
exclude: options.exclude
})
if (_$utils_9.isJSON(options.json)) {
initWithJSON(options.json)
} else {
initWithURL(options.json)
}
const rv = {
search: search
}
typeof options.success === 'function' && options.success.call(rv)
return rv
}
function initWithJSON (json) {
_$Repository_4.put(json)
registerInput()
}
function initWithURL (url) {
_$JSONLoader_2.load(url, function (err, json) {
if (err) {
throwError('failed to get JSON (' + url + ')')
}
initWithJSON(json)
})
}
function emptyResultsContainer () {
options.resultsContainer.innerHTML = ''
}
function appendToResultsContainer (text) {
options.resultsContainer.innerHTML += text
}
function registerInput () {
options.searchInput.addEventListener('input', function (e) {
if (isWhitelistedKey(e.which)) {
emptyResultsContainer()
debounce(function () { search(e.target.value) }, options.debounceTime)
}
})
}
function search (query) {
if (isValidQuery(query)) {
emptyResultsContainer()
render(_$Repository_4.search(query), query)
}
}
function render (results, query) {
const len = results.length
if (len === 0) {
return appendToResultsContainer(options.noResultsText)
}
for (let i = 0; i < len; i++) {
results[i].query = query
appendToResultsContainer(_$Templater_7.compile(results[i]))
}
}
function isValidQuery (query) {
return query && query.length > 0
}
function isWhitelistedKey (key) {
return [13, 16, 20, 37, 38, 39, 40, 91].indexOf(key) === -1
}
function throwError (message) {
throw new Error('SimpleJekyllSearch --- ' + message)
}
})(window)
}());
</script>
<!-- Configuration -->
<script>
SimpleJekyllSearch({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
json: '/search.json',
//searchResultTemplate: '<li><a href="https://static.rnmkcy.eu{url}">{date}&nbsp;{title}</a></li>'
searchResultTemplate: '<li><a href="{url}">{date}&nbsp;{title}</a></li>'
})
</script>
<!-- Fin déclaration champ de recherche --></div><nav class="navigation">
<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="/aide-jekyll-text-theme.html">Aide</a></li></ul>
</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;">Portable Dell Latitude E6230 - EndeavourOS XFCE sur partition LVM</h1></header></div><meta itemprop="headline" content="Portable Dell Latitude E6230 - EndeavourOS XFCE sur partition LVM"><div class="article__info clearfix"><ul class="left-col menu"><li>
2024-11-08 14:10:33 +01:00
<a class="button button--secondary button--pill button--sm" style="color:#00FFFF" href="/archive.html?tag=archlinux">archlinux</a>
2024-10-31 20:18:37 +01:00
</li></ul><ul class="right-col menu"><li>
<i class="far fa-calendar-alt"></i>&nbsp;<span title="Création" style="color:#FF00FF">24&nbsp;déc.&nbsp;&nbsp;2022</span>
<span title="Modification" style="color:#00FF7F">25&nbsp;déc.&nbsp;&nbsp;2022</span></li></ul></div><meta itemprop="datePublished" content="2022-12-25T00:00:00+01:00">
<meta itemprop="keywords" content="archlinux"><div class="js-article-content">
<div class="layout--article"><!-- start custom article top snippet -->
<style>
#myBtn {
display: none;
position: fixed;
bottom: 10px;
right: 10px;
z-index: 99;
font-size: 12px;
font-weight: bold;
border: none;
outline: none;
background-color: white;
color: black;
cursor: pointer;
padding: 5px;
border-radius: 4px;
}
#myBtn:hover {
background-color: #555;
}
</style>
<button onclick="topFunction()" id="myBtn" title="Haut de page">&#8679;</button>
<script>
//Get the button
var mybutton = document.getElementById("myBtn");
// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
<!-- end custom article top snippet -->
<div class="article__content" itemprop="articleBody"><details>
<summary><b>Afficher/cacher Sommaire</b></summary>
<!-- affichage sommaire -->
<div class="toc-aside js-toc-root"></div>
</details><p><em>EndeavourOS est une distribution GNU/Linux basée sur Arch Linux</em></p>
<p><img src="/images/EndeavourOS_Logo.png" alt="" width="90" /></p>
<ul>
<li><a href="#créer-endeavouros-usb-live">Créer EndeavourOS USB Live</a></li>
<li><a href="#endeavouros-xfce-sur-partition-lvm">EndeavourOS XFCE sur partition LVM</a>
<ul>
<li><a href="#1---installation-via-usb-live">1 - Installation via USB LIVE</a></li>
<li><a href="#2---partionner-un-disque">2 - Partionner un disque</a></li>
<li><a href="#3--installer-endeavouros-sur-une-partition-temporaire">3 -Installer EndeavourOS sur une partition temporaire</a></li>
<li><a href="#4---première-connexion-utilisateur-sur-endeavouros-xfce">4 - Première connexion utilisateur sur EndeavourOS XFCE</a>
<ul>
<li><a href="#ajout-lvm2-au-hooks">Ajout lvm2 au HOOKS</a></li>
<li><a href="#créer-un-volume-physique-et-groupe-lvm">Créer un volume physique et groupe LVM</a></li>
<li><a href="#dupliquer-la-distribution-temporaire-dans-des-partitions-lvm">Dupliquer la distribution temporaire dans des partitions LVM</a></li>
</ul>
</li>
<li><a href="#5---chroot-sur-le-root-lvm">5 - Chroot sur le root LVM</a>
<ul>
<li><a href="#créer-le-fstab">Créer le fstab</a></li>
<li><a href="#grub-efi">grub EFI</a></li>
<li><a href="#sortie-du-chroot">Sortie du chroot</a></li>
</ul>
</li>
<li><a href="#6---redémarrer-la-machine">6 - Redémarrer la machine</a></li>
</ul>
</li>
<li><a href="#endeavouros-xfce">EndeavourOS XFCE</a>
<ul>
<li><a href="#activation-ssh">Activation SSH</a></li>
<li><a href="#mide-à-jour-système">Mide à jour système</a></li>
<li><a href="#activation-ssh">Activation SSH</a></li>
<li><a href="#ecran-de-veille">Ecran de veille</a></li>
<li><a href="#modification-clavier-portable">Modification clavier portable</a></li>
<li><a href="#ssh--clé">SSH + clé</a></li>
<li><a href="#parefeu-firewalld">Parefeu firewalld</a></li>
<li><a href="#motd">Motd</a></li>
<li><a href="#pont-réseau-networkmanager">Pont réseau (NetworkManager)</a>
<ul>
<li><a href="#activation-du-pont-bridge-br0">Activation du pont (bridge) br0</a></li>
<li><a href="#paramétrage-graphique-networkmanager">Paramétrage graphique NetworkManager</a></li>
<li><a href="#ip-lan-bridge-statique">IP LAN bridge statique</a></li>
</ul>
</li>
<li><a href="#vnc">VNC</a>
<ul>
<li><a href="#portable-dell-latitude-e6230">Portable DELL Latitude e6230</a></li>
<li><a href="#poste-appelant">Poste Appelant</a></li>
</ul>
</li>
<li><a href="#lecteur-carte-à-puce--nfc">Lecteur carte à puce + NFC</a>
<ul>
<li><a href="#configuration">Configuration</a></li>
</ul>
</li>
<li><a href="#applications">Applications</a>
<ul>
<li><a href="#logiciels-supplémentaires">Logiciels supplémentaires</a></li>
<li><a href="#minicom">Minicom</a></li>
<li><a href="#son">Son</a></li>
<li><a href="#flameshot-copie-écran">Flameshot (copie écran)</a></li>
<li><a href="#scrpy-émulation-android">scrpy émulation android</a></li>
<li><a href="#client-nextcloud">Client Nextcloud</a></li>
<li><a href="#gestion-mot-de-passe-keepassxc">Gestion mot de passe (keepassxc)</a></li>
<li><a href="#sshfs">SSHFS</a></li>
<li><a href="#thunderbird">Thunderbird</a></li>
<li><a href="#radio-via-internet">Radio via internet</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<h2 id="créer-endeavouros-usb-live">Créer EndeavourOS USB Live</h2>
<p>Télécharger le dernier fichier iSO <a href="https://endeavouros.com/latest-release/">https://endeavouros.com/latest-release/</a><br />
<strong>EndeavourOS_Artemis_neo_22_8.iso</strong> et <strong>EndeavourOS_Artemis_neo_22_8.iso.sha512sum</strong> août 2022</p>
<p>Vérifier checksum</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sha512sum -c EndeavourOS_Artemis_neo_22_8.iso.sha512sum
</code></pre></div></div>
<p><strong>EndeavourOS_Artemis_neo_22_8.iso: Réussi</strong></p>
<p>Créer la clé bootable <br />
Pour savoir sur quel périphérique, connecter la clé sur un port USB dun ordinateur et lancer la commande <code class="language-plaintext highlighter-rouge">sudo dmesg</code><br />
Dans le cas présent , le périphérique est <strong>/dev/sdc</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo dd if=EndeavourOS_Artemis_neo_22_8.iso of=/dev/sdc bs=4M
</code></pre></div></div>
<p><code class="language-plaintext warning highlighter-rouge">Installer une distribution EndeavourOS sur une partition LVM est impossible avec l'outil "Calamarès"</code></p>
<h2 id="endeavouros-xfce-sur-partition-lvm">EndeavourOS XFCE sur partition LVM</h2>
<p><a href="/2022/12/22/Dell_Latitude_E6230_Caracteristiques_generales_Documentation_et_Bios.html">Portable Dell Latitude E6230 - matériel , documentation et bios</a></p>
<h3 id="1---installation-via-usb-live">1 - Installation via USB LIVE</h3>
<p>Démarrage avec la clé USB insérée dans le portable DELL Latitude e6230 et appui sur F12 pour un accès au menu <br />
Choisir UEFI specific storage</p>
<p>Vous arrivez sur la page de sélection<br />
<img src="/images/endos0001.png" alt="" width="400" /><br />
Valider le choix par défaut</p>
<p>Changer le clavier en FR<br />
<img src="/images/endos0001a.png" alt="" width="600" /><br />
<img src="/images/endos0001b.png" alt="" width="400" /><br />
<img src="/images/endos0001c.png" alt="" width="200" /><br />
Supprimer <strong>English(US)</strong> pour ne garder que <strong>French</strong> et <strong>Close</strong></p>
<p>Ouvrir un <strong>Terminal Emulator</strong> dans le live endeavour<br />
<img src="/images/endos0001d.png" alt="" width="600" /></p>
<h3 id="2---partionner-un-disque">2 - Partionner un disque</h3>
<p>en mode su</p>
<p>Le disque : <code class="language-plaintext highlighter-rouge">lsblk</code></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sda 8:0 0 447.1G 0 disk
</code></pre></div></div>
<p>On partitionne un disque en 3 avec <code class="language-plaintext highlighter-rouge">gdisk</code></p>
<ul>
<li>Partition 1 : 512M EFI (code ef00) système de fichier FAT32</li>
<li>Partition 2 : 200G LVM (code 8e00) système de fichier EXT4</li>
<li>Partition 3 : 12G Linux (code 8300) système de fichier EXT4 (Installation temporaire)</li>
</ul>
<p>Créer une table de partition GPT sur le disque /dev/sda</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>gdisk /dev/sda
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>GPT fdisk (gdisk) version 1.0.9
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries in memory.
# créer une table de partition GPT
Command (? for help): o
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): Y
# créer partition EFI (ef00) de 512 Mo, formater fat32 et définir le drapeau de démarrage et esp
Command (? for help): n
Partition number (1-128, default 1):
First sector (34-937703054, default = 2048) or {+-}size{KMGTP}:
Last sector (2048-937703054, default = 937701375) or {+-}size{KMGTP}: +512M
Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300): ef00
Changed type of partition to 'EFI system partition'
# créer une partition LVM (8e00) pour le futur de 200G
Command (? for help): n
Partition number (2-128, default 2):
First sector (34-937703054, default = 1050624) or {+-}size{KMGTP}:
Last sector (1050624-937703054, default = 937701375) or {+-}size{KMGTP}: +200G
Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300): 8e00
Changed type of partition to 'Linux LVM'
# Créer une partition restante de 12G pour installer endeavouros temporairement
Command (? for help): n
Partition number (3-128, default 3):
First sector (34-937703054, default = 420481024) or {+-}size{KMGTP}:
Last sector (420481024-937703054, default = 937701375) or {+-}size{KMGTP}: +12G
Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300):
Changed type of partition to 'Linux filesystem'
# Ecriture et sortie
Command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): Y
OK; writing new GUID partition table (GPT) to /dev/sda.
The operation has completed successfully.
</code></pre></div></div>
<p>Pour vérifier la liste des partitions mappées par nbd, utilisez fdisk :</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>fdisk /dev/sda -l
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Disk /dev/sda: 447.13 GiB, 480103981056 bytes, 937703088 sectors
Disk model: GIGABYTE GP-GSTF
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: AF70F9F8-5910-4F43-87D5-D7D71A05B9FC
Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 420481023 419430400 200G Linux LVM
/dev/sda3 420481024 445646847 25165824 12G Linux filesystem
</code></pre></div></div>
<p>Fermer la console</p>
<h3 id="3--installer-endeavouros-sur-une-partition-temporaire">3 -Installer EndeavourOS sur une partition temporaire</h3>
<p>Lancer linstallation<br />
<img src="/images/endos0002.png" alt="" width="600" /></p>
<p><img src="/images/endos0003.png" alt="" width="600" /><br />
Choix du “pas en ligne”</p>
<p><img src="/images/endos0004.png" alt="" width="600" /><br />
Français</p>
<p><img src="/images/endos0005.png" alt="" width="600" /></p>
<p><img src="/images/endos0006.png" alt="" width="600" /></p>
<p><img src="/images/endos0007.png" alt="" width="600" /><br />
Pour une partition chiffrée, cocher “Chiffrer le système” et saisir la phrase secrète que vous voulez<br />
<img src="/images/endos0007a.png" alt="" width="600" /><br />
Vous pouvez choisir loption <strong>Formater</strong></p>
<p><img src="/images/endos0007b.png" alt="" width="600" /><br />
Vous pouvez choisir loption <strong>Formater</strong></p>
<p><img src="/images/endos0007c.png" alt="" width="600" /></p>
<p><code class="language-plaintext info highlighter-rouge">En mode "offline" , uniquement xfce4</code></p>
<p>Choix du gestionnaire uniquement en mode “online”<br />
<img src="/images/endos0008.png" alt="" width="600" /><br />
<img src="/images/endos0009.png" alt="" width="600" /><br />
Validation facultative de “Printing Support”</p>
<p><img src="/images/endos0010.png" alt="" width="600" /><br />
eosvm eosvm49</p>
<p><img src="/images/endos0011.png" alt="" width="600" /><br />
<img src="/images/endos0012.png" alt="" width="600" /></p>
<p>Linstallation démarre<br />
<img src="/images/endos0013.png" alt="" width="600" /><br />
Installation en cours, patienter …</p>
<p><img src="/images/endos0014.png" alt="" width="600" /><br />
Linstallation est terminée, cliquer sur <strong>Terminé</strong> et redémarrer sur endeavour</p>
<h3 id="4---première-connexion-utilisateur-sur-endeavouros-xfce">4 - Première connexion utilisateur sur EndeavourOS XFCE</h3>
<p><em>Toutes les commandes se font en mode su : <code class="language-plaintext highlighter-rouge">sudo -s</code></em></p>
<h4 id="ajout-lvm2-au-hooks">Ajout lvm2 au HOOKS</h4>
<p>Ajouter <strong>lvm2</strong> dans le HOOKs <code class="language-plaintext highlighter-rouge">/etc/mkinitcpio.conf</code></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>HOOKS="base udev autodetect modconf block lvm2 keyboard keymap consolefont filesystems fsck"
</code></pre></div></div>
<p>Puis exécuter <strong>mkinitcpio</strong> qui est un script shell utilisé pour créer un environnement qui se charge en premier en mémoire</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mkinitcpio -P
</code></pre></div></div>
<h4 id="créer-un-volume-physique-et-groupe-lvm">Créer un volume physique et groupe LVM</h4>
<p>Exécuter les commandes suivantes</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pvcreate /dev/sda2
vgcreate vgeos /dev/sda2
</code></pre></div></div>
<p>Créer les volumes logiques root et home avec un système de fichier ext4</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>lvcreate <span class="nt">-L</span> 40G <span class="nt">-n</span> lvroot vgeos
lvcreate <span class="nt">-L</span> 100G <span class="nt">-n</span> lvhome vgeos
mkfs.ext4 /dev/vgeos/lvroot
mkfs.ext4 /dev/vgeos/lvhome
</code></pre></div></div>
<h4 id="dupliquer-la-distribution-temporaire-dans-des-partitions-lvm">Dupliquer la distribution temporaire dans des partitions LVM</h4>
<p>Montages sur /mnt/lvm</p>
<p>Partition actuelle montée sur /mnt/eos</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">mkdir</span> <span class="nt">-p</span> /mnt/eos
mount /dev/sda3 /mnt/eos
</code></pre></div></div>
<p>Partitions LVM home et root montées sur /mnt/lvm/{root,lvm}</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">mkdir</span> <span class="nt">-p</span> /mnt/lvm/<span class="o">{</span>root,home<span class="o">}</span>
mount /dev/vgeos/lvroot /mnt/lvm/root
mount /dev/vgeos/lvhome /mnt/lvm/home
</code></pre></div></div>
<p>Copier le root et le home de la machine non LVM vers les volumes loqiques LVM</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># copie root sans le home</span>
rsync <span class="nt">-avA</span> <span class="nt">--exclude</span> <span class="s1">'home'</span> /mnt/eos/ /mnt/lvm/root/
<span class="nb">mkdir</span> <span class="nt">-p</span> /mnt/lvm/root/home <span class="c"># pour le montage au boot</span>
<span class="c"># copie du home</span>
rsync <span class="nt">-avA</span> /mnt/eos/home/ /mnt/lvm/home/
</code></pre></div></div>
<h3 id="5---chroot-sur-le-root-lvm">5 - Chroot sur le root LVM</h3>
<p><strong>On va monter un chroot sur les partitions LVM</strong></p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># root</span>
<span class="c"># /mnt/lvm/root</span>
<span class="c"># montage du home</span>
<span class="nb">mkdir</span> /mnt/lvm/root/home
mount /dev/vgeos/lvhome /mnt/lvm/root/home
<span class="c"># montage du boot EFI</span>
mount /dev/sda1 /mnt/lvm/root/boot/efi
</code></pre></div></div>
<p>Installer les outils</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pacman -Syy
pacman -S arch-install-scripts
</code></pre></div></div>
<h4 id="créer-le-fstab">Créer le fstab</h4>
<p>Sur le portable DELL pas de touche <code class="language-plaintext highlighter-rouge">&lt;&gt;</code> , exécuter en mode utilisateur</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>xmodmap -e "keycode 49 = less greater less greater bar brokenbar bar"
</code></pre></div></div>
<p>Générer le nouveau fstab</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>genfstab -U -p /mnt/lvm/root &gt; /mnt/lvm/root/etc/fstab
</code></pre></div></div>
<p>Passage en chroot</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>arch-chroot /mnt/lvm/root
</code></pre></div></div>
<p>Vérifier le fstab</p>
<p><img src="/images/endos0020.png" alt="" /></p>
<h4 id="grub-efi">grub EFI</h4>
<p>Réinstaller grub EFI</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=endeavouros
</code></pre></div></div>
<p>Dupliquer</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cp /boot/efi/EFI/endeavouros/grubx64.efi /boot/efi/EFI/boot/bootx64.efi
</code></pre></div></div>
<p>Regénérer 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>
<p><img src="/images/endos0021.png" alt="" /></p>
<h4 id="sortie-du-chroot">Sortie du chroot</h4>
<p>On sort du chroot</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>exit
</code></pre></div></div>
<p>Arrêter la machine</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>poweroff
</code></pre></div></div>
<h3 id="6---redémarrer-la-machine">6 - Redémarrer la machine</h3>
<p><img src="/images/endos0022.png" alt="" width="400" /></p>
<p><img src="/images/endos0015.png" alt="" /><br />
Page de démarrage</p>
<p><img src="/images/endos0016.png" alt="" /><br />
Page connexion utilisateur</p>
<p><img src="/images/endos0017.png" alt="" /><br />
A ce stade , EndeavourOS est entièrement fonctionnel sur une partition LVM.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 447,1G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
├─sda2 8:2 0 200G 0 part
│ ├─vgeos-lvroot 254:0 0 40G 0 lvm /
│ └─vgeos-lvhome 254:1 0 100G 0 lvm /home
└─sda3 8:3 0 12G 0 part
</code></pre></div></div>
<p>La partition /dev/sda3 peut être récupérée</p>
<h2 id="endeavouros-xfce">EndeavourOS XFCE</h2>
<h3 id="activation-ssh">Activation SSH</h3>
<p>Relever adresse par <code class="language-plaintext highlighter-rouge">ip a</code><br />
192.168.8.209</p>
<p>Lancer et activer SSH</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>systemctl start sshd
<span class="nb">sudo </span>systemctl <span class="nb">enable </span>sshd
</code></pre></div></div>
<p>Se connecter via ssh depuis un autre poste sur le réseau</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ssh yano@192.168.8.209
</code></pre></div></div>
<h3 id="mide-à-jour-système">Mide à jour système</h3>
<p>Ouvrir un terminal</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>pacman <span class="nt">-Sy</span> archlinux-keyring <span class="c"># mise à jour des clés</span>
<span class="nb">sudo </span>pacman <span class="nt">-Su</span> <span class="c"># mise à jour </span>
</code></pre></div></div>
<p>Modifier sudoers pour accès sudo sans mot de passe à lutilisateur <strong>yano</strong></p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>su <span class="c"># mot de passe root identique utilisateur</span>
<span class="nb">echo</span> <span class="s2">"yano ALL=(ALL) NOPASSWD: ALL"</span> <span class="o">&gt;&gt;</span> /etc/sudoers.d/20-yano
</code></pre></div></div>
<p>Redémarrer la machine</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo systemctl reboot
</code></pre></div></div>
<h3 id="activation-ssh-1">Activation SSH</h3>
<p>Relever adresse par <code class="language-plaintext highlighter-rouge">ip a</code><br />
192.168.8.210</p>
<p>Lancer et activer SSH</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>systemctl start sshd
<span class="nb">sudo </span>systemctl <span class="nb">enable </span>sshd
</code></pre></div></div>
<p>Se connecter via ssh depuis un autre poste sur le réseau</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ssh yano@192.168.8.210
</code></pre></div></div>
<p><strong>Firefox en français</strong> : <code class="language-plaintext highlighter-rouge">yay -S firefox-i18n-fr</code></p>
<p><strong>XFCE - Paramètres</strong><br />
On déplace le <strong>tableau de bord</strong> du bas vers le haut de lécran</p>
<p>Modification du <strong>tableau de bord</strong> , clic-droit → Tableau de bord → Préférences de tableau de bord → Eléments</p>
<p>Affichage date et heure, <strong>format personnalisé</strong> dans <strong>Horloge</strong> : <code class="language-plaintext highlighter-rouge">%e %b %Y %R</code></p>
<p>Gestionnaire dalimentation → Ecran : Désactiver la <strong>gestion dalimentation de lécran</strong></p>
<p>Les fonds décran → <code class="language-plaintext highlighter-rouge">/usr/share/endeavouros/backgrounds/</code></p>
<h3 id="ecran-de-veille">Ecran de veille</h3>
<p>On remplace lapplication <strong>xfce4-screensaver</strong> (goodies) par <strong>xscreensaver</strong></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -R xfce4-screensaver
sudo pacman -S xscreensaver
</code></pre></div></div>
<p>Préférences économiseur écran <strong>XScreenSaver Settings</strong></p>
<ul>
<li>Considérer lordinateur inactif après: 20 min</li>
<li>Verrouillage écran INACTIF</li>
</ul>
<h3 id="modification-clavier-portable">Modification clavier portable</h3>
<p><em>Manipulations à effectuer sur un terminal de la machine</em><br />
Pas de touches “&gt;” “&lt;” sur clavier ex Qwerty du portable e6230<br />
La commande suivante permet dafficher la disposition actuelle de votre clavier</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>xmodmap -pke
</code></pre></div></div>
<p>Sur un clavier normal Azerty</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>keycode 94 = less greater less greater bar brokenbar bar
</code></pre></div></div>
<p>Sur le clavier du portable on va utiliser la touches <code class="language-plaintext highlighter-rouge">²</code> et shift <code class="language-plaintext highlighter-rouge">²</code> keycode 49<br />
Pour modifier la fonction dune touche on invoque simplement xmodmap avec en argument la chaîne de caractères que lon souhaite modifier :</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>xmodmap -e "keycode 49 = less greater less greater bar brokenbar bar"
</code></pre></div></div>
<p>Pour rendre les modifications permanentes ,créer ou modifier <strong>~/.xmodmap.conf</strong> et ajouter</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>echo "keycode 49 = less greater less greater bar brokenbar bar" &gt;&gt; ~/.xmodmap.conf
</code></pre></div></div>
<p><u>Exécuter au lancement de la session</u><br />
Menu → Paramètres → Session et démarrage ,onglet <strong>Démarrage automatique dapplication</strong><br />
Clique sur <strong>+</strong> :<br />
Nom : <strong>Modif clavier</strong><br />
Description : <strong>attribution touche</strong><br />
Commande : <strong>/usr/bin/xmodmap /home/yano/.xmodmap.conf</strong><br />
Déclencher : on login<br />
Puis cliquer sur <strong>OK</strong></p>
<p>Déconnexion/Reconnexion utilisateur pour prise en charge</p>
<h3 id="ssh--clé">SSH + clé</h3>
<p><img src="/images/ssh_logo1.png" alt="" width="100" /></p>
<p><strong><u>Connexion SSH par clé</u></strong></p>
<p><u>Opérations à réaliser sur l'ordinateur de bureau</u><br />
Générer une paire de clé curve25519-sha256 (ECDH avec Curve25519 et SHA2) nommé <strong>e6230</strong> pour une liaison SSH avec le portable E6230.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ssh-keygen -t ed25519 -o -a 100 -f ~/.ssh/e6230
</code></pre></div></div>
<p>Envoyer la clé publique sur le portable</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ssh-copy-id -i ~/.ssh/e6230.pub yano@192.168.8.210
</code></pre></div></div>
<p>Modification fichier configuration ssh sur le dell e6230</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo nano /etc/ssh/sshd_config
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Port 56230
PasswordAuthentication no
</code></pre></div></div>
<p>Relancer</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo systemctl restart sshd
</code></pre></div></div>
<p><code class="language-plaintext warning highlighter-rouge">IL FAUT AJOUTER LE PORT 56230 EN ZONE "PUBLIC" DU PAREFEU !</code></p>
<h3 id="parefeu-firewalld">Parefeu firewalld</h3>
<p><img src="/images/firewalld-logo.png" alt="" width="100" /><br />
<em>FirewallD est un service qui permet dapporter une fonction de pare-feu avec une gestion dynamique. Cest à dire que les règles gérées par le service FirewallD sont appliquées sans le redémarrage complet du pare-feu. Les règles existantes, toujours utiles, restent donc en place et les modules noyaux complémentaires utilisés ne sont pas déchargés.</em></p>
<ul>
<li><a href="https://www.linuxtricks.fr/wiki/firewalld-le-pare-feu-facile-sous-linux">firewalld : Le pare-feu facile sous Linux</a></li>
<li><a href="https://doc.fedora-fr.org/wiki/Parefeu_-_firewall_-_FirewallD">Parefeu - firewall - FirewallD</a></li>
</ul>
<p>Ajouter le nouveau port à la zone configurée de firewalld (“public” par défaut).</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>firewall-cmd <span class="nt">--zone</span><span class="o">=</span>public <span class="nt">--add-port</span><span class="o">=</span>56230/tcp <span class="nt">--permanent</span>
<span class="nb">sudo </span>systemctl restart firewalld
</code></pre></div></div>
<p>Tester connexion SSH depuis lhôte</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ssh -p 56230 -i ~/.ssh/e6230 yano@192.168.8.209
</code></pre></div></div>
<h3 id="motd">Motd</h3>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo nano /etc/motd
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> ___ _ _ _ _
| __| ___ ___ /_\ _ _ __ | |_ | | (_) _ _ _ _ __ __
| _| / _ \(_-&lt; / _ \ | '_|/ _|| ' \ | |__ | || ' \| || |\ \ /
|___|\___//__/ /_/ \_\|_| \__||_||_| |____||_||_||_|\_,_|/_\_\
_ _ _ _ _ __ ___ ____ __
| | __ _ | |_ (_)| |_ _ _ __| | ___ ___ / / |_ )|__ / / \
| |__ / _` || _|| || _|| || |/ _` |/ -_) / -_)/ _ \ / / |_ \| () |
|____|\__,_| \__||_| \__| \_,_|\__,_|\___| \___|\___//___||___/ \__/
</code></pre></div></div>
<h3 id="pont-réseau-networkmanager">Pont réseau (NetworkManager)</h3>
<p><em>créer un bridged network ou réseau bridgé sur linterface réelle pour une utilisation avec virt-manager (Qemu/KVM).<br />
On utilise un réseau bridgé pour les machines virtualisées pour quelles aient une vrai adresse IP sur le réseau local et quelles soient accessibles comme un ordinateur réel.</em></p>
<blockquote>
<p>Les commandes se font en mode su</p>
</blockquote>
<p><a href="/2020/11/14/KVM-QEMU-Network-Bridge-(Pont-reseau).html">KVM/QEMU Network Bridge (Pont réseau)</a><br />
<a href="https://www.grottedubarbu.fr/mode-bridge-kvm-ubuntu20-04/">Ubuntu 20.04 et KVM : Un bridge “Public”</a><br />
<a href="https://www.cyberciti.biz/faq/how-to-add-network-bridge-with-nmcli-networkmanager-on-linux/">How to add network bridge with nmcli (NetworkManager) on Linux</a></p>
<p>On utilise NetworkManager en ligne de commande avec loutils <code class="language-plaintext highlighter-rouge">nmcli</code></p>
<p>Létat du réseau</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>nmcli connection show --active
</code></pre></div></div>
<p><img src="/images/nmcli-e6230-01d.png" alt="nmcli-e6230" /></p>
<p>Création dun 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>sudo nmcli connection add type bridge con-name bridge-br0 ifname br0 stp no
</code></pre></div></div>
<p><em>Connexion « bridge-br0 » (95168faf-9905-4ad1-8dd0-796226d14d37) ajoutée avec succès.</em></p>
<p>Faire de linterface <strong>eno1</strong> un élément appartenant au pont :</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo nmcli connection add type bridge-slave con-name Ethernet-eno1 ifname eno1 master br0
</code></pre></div></div>
<p><em>Connexion « Ethernet-eno1 » (425b15d3-3316-4dd6-856f-dbf332320cc0) ajoutée avec succès.</em></p>
<p>Visualisation des paramètres du pont br0</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>nmcli -f bridge con show bridge-br0
</code></pre></div></div>
<p><img src="/images/nmcli-e6230-01e.png" alt="nmcli-e6230" /></p>
<h4 id="activation-du-pont-bridge-br0">Activation du pont (bridge) br0</h4>
<p>Désactiver les connexions actives</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>nmcli con show --active
</code></pre></div></div>
<p><img src="/images/nmcli-e6230-01f.png" alt="nmcli-e6230" /></p>
<p>Dans note cas , <strong>Connexion filaire 1</strong> est actif, il faut la désactiver</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo nmcli connection down 1803050d-4989-3ab6-a898-a39fbc37dd6d
</code></pre></div></div>
<p><em>Connexion « Connexion filaire 1 » désactivée (chemin D-Bus actif : /org/freedesktop/NetworkManager/ActiveConnection/3)</em></p>
<p>Mise en place du nouveau pont :</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo nmcli connection up bridge-br0
</code></pre></div></div>
<p><em>Connexion activée (master waiting for slaves) (Chemin D-Bus actif : /org/freedesktop/NetworkManager/ActiveConnection/57)</em></p>
<p>Vérifications</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>nmcli connection show
</code></pre></div></div>
<p><img src="/images/nmcli-e6230-01g.png" alt="nmcli-e6230" /></p>
<p>Adresses IP</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ip a s br0
</code></pre></div></div>
<p><img src="/images/nmcli-e6230-01h.png" alt="nmcli-e6230" /></p>
<p>Nouvelle adresse IP : 192.168.8.166</p>
<h4 id="paramétrage-graphique-networkmanager">Paramétrage graphique NetworkManager</h4>
<p>Paramétrage réseau pour un démarrage auto sur le pont br0 si le réseau filaire est branché</p>
<p>Modifier les paramètres réseau, clic droit sur icône réseau<br />
<img src="/images/networkmanager-10.png" alt="" width="300" /></p>
<p>Créer un pont réseau nommé br0 en cliquant sur le <strong>+</strong><br />
<img src="/images/networkmanager-10a.png" alt="" width="300" /><br />
Saisir un nom après avoir cliquer sur <strong>Créer</strong><br />
<img src="/images/networkmanager-11.png" alt="" width="300" /></p>
<p><strong>Pont entre connexions</strong><strong>Ajouter</strong><br />
<img src="/images/networkmanager-12.png" alt="" width="300" /><br />
Enregistrer</p>
<p>Le pont réseau<br />
<img src="/images/networkmanager-13.png" alt="" width="300" /><br />
<img src="/images/networkmanager-14.png" alt="" width="300" /><br />
Enregistrer</p>
<p>Il faut désactiver la connexion automatique du réseau filaire<br />
<img src="/images/networkmanager-15.png" alt="" width="300" /></p>
<h4 id="ip-lan-bridge-statique">IP LAN bridge statique</h4>
<p><strong>dans le réseau 192.168.8.0</strong></p>
<p>Avoir une adresse ip statique dans le réseau 192.168.8.0<br />
On va modifier le routeur pour ajouter ladresse mac du bridge br0</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ip link show br0
</code></pre></div></div>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>4: br0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 26:1d:bb:8c:9f:21 brd ff:ff:ff:ff:ff:ff
</code></pre></div></div>
<p>Se connecter en admin sur le routeur <strong>GL inet</strong><br />
Dans la rubrique <strong>PLUS DE REGLAGES → LAN IP</strong> , sélectionner ladresse mac <code class="language-plaintext highlighter-rouge">26:1d:bb:8c:9f:215</code> et cliquer sur Ajouter</p>
<p><img src="/images/glinet-ip-static-a1.png" alt="" width="600" /></p>
<h3 id="vnc">VNC</h3>
<p><em>Se connecter VNC via SSH</em></p>
<h4 id="portable-dell-latitude-e6230">Portable DELL Latitude e6230</h4>
<p>installer x11vnc</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>yay -S x11vnc
</code></pre></div></div>
<p>Générer un mot de passe dans le dossier root</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo</span> <span class="nt">-s</span>
x11vnc <span class="nt">-storepasswd</span> <span class="s2">"mot_de_passe"</span> /root/.vnc_passwd
<span class="nb">exit</span>
</code></pre></div></div>
<p><em>stored passwd in file: /root/.vnc_passwd</em></p>
<p>Ajouter le nouveau port 9500 à la zone configurée de firewalld (“public” par défaut).</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>firewall-cmd <span class="nt">--zone</span><span class="o">=</span>public <span class="nt">--add-port</span><span class="o">=</span>5900/tcp <span class="nt">--permanent</span>
<span class="nb">sudo </span>systemctl restart firewalld
</code></pre></div></div>
<p>Lancement manuel en console et en session utilisateur pour valider et enregistrer le mot de passe VNC</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>x11vnc <span class="nt">-xkb</span> <span class="nt">-noxrecord</span> <span class="nt">-noxfixes</span> <span class="nt">-noxdamage</span> <span class="nt">-display</span> :0 <span class="nt">-auth</span> /var/run/lightdm/root/:0 <span class="nt">-usepw</span>
</code></pre></div></div>
<p>Saisir le mot de passe VNC 2 fois ( la seconde pour vérification) et répondre <code class="language-plaintext highlighter-rouge">y</code> pour écriture</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Enter VNC password:
Verify password:
Write password to /root/.vnc/passwd? [y]/n y
</code></pre></div></div>
<p>Arrêt par Ctrl+C</p>
<h4 id="poste-appelant">Poste Appelant</h4>
<p><u>Première fenêtre de terminal</u></p>
<p>Tunnel SSH<br />
Utilisez le drapeau <code class="language-plaintext highlighter-rouge">-localhost</code> avec <strong>x11vnc</strong> pour quil se lie à linterface locale.<br />
Une fois que cest fait, vous pouvez utiliser SSH pour tunneliser le port ; puis, connectez-vous à VNC via SSH.</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># SSH avec clés</span>
ssh <span class="nt">-f</span> <span class="nt">-L</span> 5900:localhost:5900 <span class="nt">-p</span> 56230 <span class="nt">-i</span> ~/.ssh/e6230 yano@192.168.8.126 <span class="s1">'sudo x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -usepw'</span>
</code></pre></div></div>
<p><u>Seconde fenêtre de terminal</u> <br />
Exécuter la commande suivante</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>vncviewer <span class="nt">-PreferredEncoding</span><span class="o">=</span>ZRLE localhost:0
</code></pre></div></div>
<p><img src="/images/vnc_login.png" alt="" width="200" /><br />
Saisir le mot de passe pour la connexion VNC</p>
<p><img src="/images/vnc-e6230-1.png" alt="" width="600" /></p>
<p>Si le curseur est mal affiché, cest possible de mettre loption -cursor à la ligne de commande x11vnc
<code class="language-plaintext info highlighter-rouge">Le programme écoute sur le port 9500. Il faut penser à ouvrir le parefeu du Latitude e6230 sur ce port en TCP</code></p>
<p><u>Script - VNC via Tunnel SSH</u></p>
<ul>
<li>Ouverture distant et redirection du port 5900 via tunnel ssh, reprise de la main (nohup)</li>
<li>On mémorise le processus ssh (pidof)</li>
<li>Lancement de vncviewer</li>
<li>
<p>En sortie du viewer, on tue le processus ssh … avec kill</p>
<p>nano ~/scripts/vncdell.sh</p>
</li>
</ul>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#!/bin/bash</span>
<span class="nb">nohup </span>ssh <span class="nt">-f</span> <span class="nt">-L</span> 5900:localhost:5900 <span class="nt">-p</span> 56230 <span class="nt">-i</span> ~/.ssh/e6230 yano@192.168.8.126 <span class="s1">'sudo x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -usepw'</span>
<span class="nv">p</span><span class="o">=</span><span class="si">$(</span>pidof <span class="nt">-s</span> ssh<span class="si">)</span>
<span class="c"># tempo</span>
<span class="nb">echo</span> <span class="s2">"Patienter 5 secondes..."</span>
<span class="nb">sleep </span>5
vncviewer <span class="nt">-PreferredEncoding</span><span class="o">=</span>ZRLE localhost:0
<span class="nb">kill</span> <span class="nv">$p</span>
<span class="nb">echo</span> <span class="s2">"FIN VNC"</span>
<span class="nb">exit </span>0
</code></pre></div></div>
<p>Droits en exécution</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>chmod +x ~/scripts/vncdell.sh
</code></pre></div></div>
<p>Au lancement du script</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sh ~/scripts/vncdell.sh
</code></pre></div></div>
<p><img src="/images/vnc-e6230A.png" alt="" width="200" /><br />
Saisir le mot de passe VNC</p>
<h3 id="lecteur-carte-à-puce--nfc">Lecteur carte à puce + NFC</h3>
<p><em>comment configurer votre système pour utiliser un lecteur de carte à puce</em></p>
<h4 id="configuration">Configuration</h4>
<p>Installez ccid et opensc à partir des référentiels officiels</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S ccid opensc
</code></pre></div></div>
<p>Si le lecteur de carte ne dispose pas dun clavier NIP, définissez <code class="language-plaintext highlighter-rouge">enable_pinpad = false</code> dans le fichier de configuration opensc <strong>/etc/opensc.conf</strong></p>
<p>Démarrer le service pcscd.service</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo systemctl start pcscd.service # démarrer
</code></pre></div></div>
<blockquote>
<p><strong>Conseil</strong>: Si vous obtenez le <code class="language-plaintext highlighter-rouge">Failed to start pcscd.service: Unit pcscd.socket not found</code>. erreur <code class="language-plaintext highlighter-rouge">Failed to start pcscd.service: Unit pcscd.socket not found</code>. , rechargez simplement les unités systemd avec cette commande <code class="language-plaintext highlighter-rouge">systemctl daemon-reload</code></p>
</blockquote>
<p>Status</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo systemctl status pcscd.service
</code></pre></div></div>
<p>lecteur de carte <code class="language-plaintext highlighter-rouge">pcsc-tools</code></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S pcsc-tools
</code></pre></div></div>
<p>et lancez lutilitaire <code class="language-plaintext highlighter-rouge">pcsc_scan</code> , puis (connectez le lecteur de carte à puce si non interne) insérez une carte. Si vous voyez une sortie comme celle-ci, le lecteur de carte à puce ainsi que la carte ont été reconnus avec succès.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Mon Jul 29 14:43:50 2019
Reader 0: Broadcom Corp 5880 [Contacted SmartCard] (0123456789ABCD) 00 00
Event number: 2
Card state: Card inserted,
ATR: 3B DA 18 FF 81 B1 FE 75 1F 03 00 31 C5 73 C0 01 40 00 90 00 0C
[...]
Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B DA 18 FF 81 B1 FE 75 1F 03 00 31 C5 73 C0 01 40 00 90 00 0C
OpenPGP Card V2
</code></pre></div></div>
<p>Activer le service pcscd.service</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo systemctl enable pcscd.service # activer
</code></pre></div></div>
<p>Vérifier également la lecture NFC</p>
<h3 id="applications">Applications</h3>
<h4 id="logiciels-supplémentaires">Logiciels supplémentaires</h4>
<p>On commence par tout ce qui est graphique : gimp, cups (gestion de limprimante) et hplip (si vous avez une imprimante scanner Hewlett Packard). Le paquet python-pyqt5 est indispensable pour linterface graphique de HPLIP+scan. Webkigtk2 étant indispensable pour la lecture de laide en ligne de Gimp. outil rsync, Retext éditeur markdown, firefox fr, thunderbird, libreoffice, gdisk, bluefish, <strong>Double Commander</strong> , <strong>Menulibre</strong> pour la gestion des menus , outils android</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>yay <span class="nt">-S</span> cups system-config-printer gimp hplip libreoffice-fresh-fr thunderbird-i18n-fr jq figlet p7zip xsane tmux calibre retext bluefish gedit doublecmd-gtk2 terminator filezilla minicom zenity android-tools menulibre yt-dlp
<span class="c"># Scripts to aid in installing Arch Linux (ex: arch-chroot)</span>
yay <span class="nt">-S</span> arch-install-scripts
</code></pre></div></div>
<h4 id="minicom">Minicom</h4>
<p>Paramétrage de lapplication terminale <strong>minicom</strong></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 />
<img src="/images/minicom01.png" alt="" /><br />
A - Port série : <strong>/dev/ttyUSB0</strong> <br />
F - Contrôle de flux matériel : <strong>Non</strong><br />
<img src="/images/minicom02.png" alt="" /><br />
Echap<br />
Enregistrer config. sous dfl<br />
<img src="/images/minicom03.png" alt="" /><br />
Sortir de Minicom</p>
<h4 id="son">Son</h4>
<p><strong><u>PulseAudio</u></strong><br />
La gestion <strong>coupure</strong>, <strong>vol+</strong> et <strong>vol-</strong> du son se fait à laide des touches spécifique du clavier<br />
<img src="/images/e6230-sound-keys.png" alt="alt text" title="Touches Son - Dell Latitude E6230" /></p>
<h4 id="flameshot-copie-écran">Flameshot (copie écran)</h4>
<p><strong>Copie écran (flameshot)</strong><br />
<strong><a href="https://github.com/lupoDharkael/flameshot">Flameshot</a></strong> cest un peu THE TOOL pour faire des captures décrans</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S flameshot
</code></pre></div></div>
<p>Lancer lapplication XFCE Flameshot et licône est visible dans la barre des tâches<br />
<img src="/images/flameshot_e6230-1a.png" alt="" width="300" /></p>
<p>Paramétrage de flameshot, clic droit sur icône , Configuration <br />
<img src="/images/flameshot_e6230-1b.png" alt="" width="300" /><br />
Paramétrage de flameshot<br />
<img src="/images/flameshot01.png" alt="" width="300" /></p>
<h4 id="scrpy-émulation-android">scrpy émulation android</h4>
<p>Utilise adb et le port USB</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>yay -S scrcpy
</code></pre></div></div>
<p>Créer le dossier</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mkdir -p $HOME/.local/share/applications
</code></pre></div></div>
<p>Créer le fichier <code class="language-plaintext highlighter-rouge">$HOME/.local/share/applications/scrcpy-android.desktop</code> avec le contenu suivant</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[Desktop Entry]
Version=1.1
Type=Application
Name=ScrCpy (Android)
Comment=Votre smartphone sur le bureau
Icon=phone
Exec=/usr/bin/scrcpy
Path=/home/yann
Actions=
Categories=Utility;X-XFCE;X-Xfce-Toplevel;
Terminal=false
StartupNotify=false
</code></pre></div></div>
<h4 id="client-nextcloud">Client Nextcloud</h4>
<p>Créer les dossiers <code class="language-plaintext highlighter-rouge">.keepassx</code> , <code class="language-plaintext highlighter-rouge">Notes</code> , <code class="language-plaintext highlighter-rouge">scripts</code> <code class="language-plaintext highlighter-rouge">statique/images</code> et <code class="language-plaintext highlighter-rouge">statique/_posts</code> qui sont synchronisés avec netxcloud</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">mkdir</span> <span class="nt">-p</span> ~/<span class="o">{</span>.ssh,.keepassx,scripts,media<span class="o">}</span>
<span class="nb">mkdir</span> <span class="nt">-p</span> ~/media/statique/<span class="o">{</span>images,_posts<span class="o">}</span>
<span class="nb">mkdir</span> <span class="nt">-p</span> ~/Documents/Dossiers-Locaux-Thunderbird
<span class="nb">mkdir</span> <span class="nt">-p</span> ~/media/Notes
<span class="c"># Lien pour affichage des images avec éditeur Retext</span>
<span class="nb">sudo ln</span> <span class="nt">-s</span> /home/yano/media/statique/images /images
</code></pre></div></div>
<p>Installation client nextcloud</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>yay -S nextcloud-client libgnome-keyring gnome-keyring
</code></pre></div></div>
<p>Démarrer le client nextcloud , après avoir renseigné lurl ,login et mot de passe pour la connexion</p>
<p>Trousseau de clé avec mot de passe idem connexion utilisateur</p>
<p>Paramétrage</p>
<ul>
<li>Menu → Lancer <strong>Client de synchronisation nextcloud</strong></li>
<li>Adresse du serveur : <a href="https://cloud.xoyaz.xyz">https://cloud.xoyaz.xyz</a></li>
<li>Nom dutilisateur : yann</li>
<li>Mot de passe : xxxxx</li>
<li>Sauter les dossiers à synchroniser</li>
<li>Trousseau de clés = mot de passe connexion utilisateur</li>
<li>Paramètres nextcloud<br />
<img src="/images/e6230-nextcloud-a.png" alt="" width="400" /></li>
</ul>
<p>Saisir les différents dossiers à synhroniser<br />
<img src="/images/e6230-nextcloud.png" alt="" width="400" /></p>
<p>Au prochain redémarrage, il faudra confirmer le mot de passe du trousseau</p>
<h4 id="gestion-mot-de-passe-keepassxc">Gestion mot de passe (keepassxc)</h4>
<p><img src="/images/KeePassXC.png" alt="" width="50" /><br />
Ajouter une synchronisation de dossier nextcloud : /home/yano/.keepassx (local) → Home/.keepasx (serveur)<br />
Télécharger la clé <strong>yannick_keepassxc.key</strong> dans <strong>~/.ssh</strong></p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>scp <span class="nt">-P</span> 56230 <span class="nt">-i</span> ~/.ssh/e6230 ~/.ssh/yannick_keepassxc.key yano@192.168.8.126:/home/yano/.ssh/
</code></pre></div></div>
<p>Installer keepassxc</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S keepassxc
</code></pre></div></div>
<p>Ajouter aux favoris “KeepassXC” et lancer lapplication → <strong>Ouvrir une base de données existante</strong><br />
Base de données &gt; Ouvrir une base de données (afficher les fichiers cachés) : <strong>~/.keepassx/yannick_xc.kdbx</strong> &gt; Ouvrir<br />
<img src="/images/e6230-keepassx01.png" alt="" width="400" /></p>
<p><strong>Affichage → Thème</strong> : Sombre<br />
<strong>Affichage → Mode compact</strong> , un redémarrage de lapplication est nécessaire</p>
<h4 id="sshfs">SSHFS</h4>
<p><img src="/images/sshfs-logo.png" alt="" width="50" /><br />
<em>SSHFS sert à monter sur son système de fichier, un autre système de fichier distant, à travers une connexion SSH, le tout avec des droits utilisateur.</em></p>
<p>Installer paquet SSHFS</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo pacman -S sshfs
</code></pre></div></div>
<p class="warning">sshfs est installé par défaut sur la distribution EndeavourOS</p>
<p>Création des partages utilisés par sshfs (facultatif)</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mkdir -p $HOME/vps/{cx21,lxc,vdb,xoyaz.xyz,xoyize.xyz}
</code></pre></div></div>
<p>Exemple de montage manuel<br />
<code class="language-plaintext highlighter-rouge">sshfs -oIdentityFile=&lt;clé privée&gt; utilisateur@domaine.tld:&lt;dossier distant&gt; &lt;dossier local&gt; -C -p &lt;port si dfférent de 22&gt;</code></p>
<h4 id="thunderbird">Thunderbird</h4>
<p>Ajouter thunderbird aux favoris et lancer</p>
<p><strong>Comptes de messagerie</strong></p>
<ul>
<li>Paramètrer les différents compte de messagerie</li>
<li>Compte ProtonMail
<ol>
<li>Comment paramétrer Mozilla Thunderbird pour ProtonMail Bridge, ouvrir le lien suivant <a href="/2022/08/06/Proton_Mail.html">Proton Mail</a>
<ul>
<li>Paramétrer le compte de messagerie ProtonMail</li>
</ul>
</li>
</ol>
</li>
</ul>
<p><em>Si vous souhaitez que Thunderbird soit minimisé dans la zone de notification, vous devez installer une application indépendante pour déplacer Thunderbird dans la zone de notification chaque fois quil est minimisé. Sous Linux, je recommande KDocker (disponible dans de nombreuses distributions Linux).</em></p>
<p><em>KDocker est pratique lorsque vous souhaitez intégrer une application graphique dans la barre détat système, étant donné que lapplication en question ne dispose pas de sa propre fonctionnalité pour la placer dans la barre détat système. Bien quelle nait pas été mise à jour depuis 2005, la dernière version publiée le 5 avril 2005 est suffisamment bonne et, selon le site officiel, elle fonctionne avec tous les gestionnaires de fenêtres conformes à la norme NET WM. Pour nen citer que quelques-uns : KDE, GNOME, Xfce, Blackbox ou Fluxbox. Je ne lai utilisé que dans KDE 3.5.9, mais je suis sûr quil fonctionne bien dans les autres environnements de bureau aussi, si vous ne voulez pas utiliser une application dancrage native, comme ALLTray pour GNOME.</em></p>
<ul>
<li>Paramètres → Modules complémentaires et thèmes
<ul>
<li><strong>Thèmes</strong> : Activer <strong>sombre</strong></li>
<li><strong>Extensions</strong> : Installer <strong>Minimize on Close</strong></li>
</ul>
</li>
</ul>
<p><strong>Calendriers et contacts</strong></p>
<p><code class="language-plaintext highlighter-rouge">Alt+m</code> pour afficher la bare de menu<br />
<img src="/images/e6230-thunderbird02.png" alt="" width="400" /></p>
<ul>
<li><strong>Calendrier</strong><br />
<img src="/images/e6230-thunderbird03.png" alt="" width="400" /><br />
<img src="/images/e6230-thunderbird04.png" alt="" width="400" /><br />
<img src="/images/e6230-thunderbird05.png" alt="" width="400" /><br />
Saisir le mot de passe<br />
<img src="/images/e6230-thunderbird06.png" alt="" width="400" /><br />
<img src="/images/e6230-thunderbird07.png" alt="" width="400" /></li>
<li><strong>Contacts</strong><br />
Outils → Carnet dadresses<br />
<img src="/images/e6230-thunderbird08.png" alt="" width="400" /><br />
<img src="/images/e6230-thunderbird09.png" alt="" width="250" /><br />
<img src="/images/e6230-thunderbird10.png" alt="" width="250" /><br />
<img src="/images/e6230-thunderbird11.png" alt="" width="250" /></li>
</ul>
<h4 id="radio-via-internet">Radio via internet</h4>
<p>Installation au choix</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>yay -S radiotray
yay -S geocode-glib tuner-git
</code></pre></div></div>
</div>
<div class="d-print-none"><footer class="article__footer"><meta itemprop="dateModified" content="2022-12-24T00:00:00+01:00"><!-- start custom article footer snippet -->
<!-- end custom article footer snippet -->
<!--
<div align="right"><a type="application/rss+xml" href="/feed.xml" title="S'abonner"><i class="fa fa-rss fa-2x"></i></a>
&emsp;</div>
-->
</footer>
<div class="article__section-navigator clearfix"><div class="previous"><span>PRÉCÉDENT</span><a href="/2022/12/22/EndeavourOS_Archlinux_Portable_ASUS_Laptop_Intel_Core_i5_3317U_B400A-XH51.html">EndeavourOS Archlinux - Portable ASUS Laptop Intel Core i5 3317U B400A-XH51</a></div><div class="next"><span>SUIVANT</span><a href="/2022/12/25/Configurer_la_synchronisation_de_fichiers_entre_deux_serveurs_avec_Unison.html">Configurer la synchronisation de fichiers entre deux serveurs avec Unison</a></div></div></div>
</div>
<script>(function() {
var SOURCES = window.TEXT_VARIABLES.sources;
window.Lazyload.js(SOURCES.jquery, function() {
$(function() {
var $this ,$scroll;
var $articleContent = $('.js-article-content');
var hasSidebar = $('.js-page-root').hasClass('layout--page--sidebar');
var scroll = hasSidebar ? '.js-page-main' : 'html, body';
$scroll = $(scroll);
$articleContent.find('.highlight').each(function() {
$this = $(this);
$this.attr('data-lang', $this.find('code').attr('data-lang'));
});
$articleContent.find('h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]').each(function() {
$this = $(this);
$this.append($('<a class="anchor d-print-none" aria-hidden="true"></a>').html('<i class="fas fa-anchor"></i>'));
});
$articleContent.on('click', '.anchor', function() {
$scroll.scrollToAnchor('#' + $(this).parent().attr('id'), 400);
});
});
});
})();
</script>
</div><section class="page__comments d-print-none"></section></article><!-- start custom main bottom snippet -->
<!-- end custom main bottom snippet -->
</div>
</div></div></div></div>
</div><script>(function() {
var SOURCES = window.TEXT_VARIABLES.sources;
window.Lazyload.js(SOURCES.jquery, function() {
var $body = $('body'), $window = $(window);
var $pageRoot = $('.js-page-root'), $pageMain = $('.js-page-main');
var activeCount = 0;
function modal(options) {
var $root = this, visible, onChange, hideWhenWindowScroll = false;
var scrollTop;
function setOptions(options) {
var _options = options || {};
visible = _options.initialVisible === undefined ? false : show;
onChange = _options.onChange;
hideWhenWindowScroll = _options.hideWhenWindowScroll;
}
function init() {
setState(visible);
}
function setState(isShow) {
if (isShow === visible) {
return;
}
visible = isShow;
if (visible) {
activeCount++;
scrollTop = $(window).scrollTop() || $pageMain.scrollTop();
$root.addClass('modal--show');
$pageMain.scrollTop(scrollTop);
activeCount === 1 && ($pageRoot.addClass('show-modal'), $body.addClass('of-hidden'));
hideWhenWindowScroll && window.hasEvent('touchstart') && $window.on('scroll', hide);
$window.on('keyup', handleKeyup);
} else {
activeCount > 0 && activeCount--;
$root.removeClass('modal--show');
$window.scrollTop(scrollTop);
activeCount === 0 && ($pageRoot.removeClass('show-modal'), $body.removeClass('of-hidden'));
hideWhenWindowScroll && window.hasEvent('touchstart') && $window.off('scroll', hide);
$window.off('keyup', handleKeyup);
}
onChange && onChange(visible);
}
function show() {
setState(true);
}
function hide() {
setState(false);
}
function handleKeyup(e) {
// Char Code: 27 ESC
if (e.which === 27) {
hide();
}
}
setOptions(options);
init();
return {
show: show,
hide: hide,
$el: $root
};
}
$.fn.modal = modal;
});
})();
</script><div class="modal modal--overflow page__search-modal d-print-none js-page-search-modal"><script>
(function () {
var SOURCES = window.TEXT_VARIABLES.sources;
window.Lazyload.js(SOURCES.jquery, function() {
// search panel
var search = (window.search || (window.search = {}));
var useDefaultSearchBox = window.useDefaultSearchBox === undefined ?
true : window.useDefaultSearchBox ;
var $searchModal = $('.js-page-search-modal');
var $searchToggle = $('.js-search-toggle');
var searchModal = $searchModal.modal({ onChange: handleModalChange, hideWhenWindowScroll: true });
var modalVisible = false;
search.searchModal = searchModal;
var $searchBox = null;
var $searchInput = null;
var $searchClear = null;
function getModalVisible() {
return modalVisible;
}
search.getModalVisible = getModalVisible;
function handleModalChange(visible) {
modalVisible = visible;
if (visible) {
search.onShow && search.onShow();
useDefaultSearchBox && $searchInput[0] && $searchInput[0].focus();
} else {
search.onShow && search.onHide();
useDefaultSearchBox && $searchInput[0] && $searchInput[0].blur();
setTimeout(function() {
useDefaultSearchBox && ($searchInput.val(''), $searchBox.removeClass('not-empty'));
search.clear && search.clear();
window.pageAsideAffix && window.pageAsideAffix.refresh();
}, 400);
}
}
$searchToggle.on('click', function() {
modalVisible ? searchModal.hide() : searchModal.show();
});
// Char Code: 83 S, 191 /
$(window).on('keyup', function(e) {
if (!modalVisible && !window.isFormElement(e.target || e.srcElement) && (e.which === 83 || e.which === 191)) {
modalVisible || searchModal.show();
}
});
if (useDefaultSearchBox) {
$searchBox = $('.js-search-box');
$searchInput = $searchBox.children('input');
$searchClear = $searchBox.children('.js-icon-clear');
search.getSearchInput = function() {
return $searchInput.get(0);
};
search.getVal = function() {
return $searchInput.val();
};
search.setVal = function(val) {
$searchInput.val(val);
};
$searchInput.on('focus', function() {
$(this).addClass('focus');
});
$searchInput.on('blur', function() {
$(this).removeClass('focus');
});
$searchInput.on('input', window.throttle(function() {
var val = $(this).val();
if (val === '' || typeof val !== 'string') {
search.clear && search.clear();
} else {
$searchBox.addClass('not-empty');
search.onInputNotEmpty && search.onInputNotEmpty(val);
}
}, 400));
$searchClear.on('click', function() {
$searchInput.val(''); $searchBox.removeClass('not-empty');
search.clear && search.clear();
});
}
});
})();
</script><div class="search search--dark">
<div class="main">
<div class="search__header">Recherche</div>
<div class="search-bar">
<div class="search-box js-search-box">
<div class="search-box__icon-search"><i class="fas fa-search"></i></div>
<input id="search-input" type="text" />
<div class="search-box__icon-clear js-icon-clear">
<a><i class="fas fa-times"></i></a>
</div>
</div>
<button class="button button--theme-dark button--pill search__cancel js-search-toggle">
Annuler</button>
</div>
<div id="results-container" class="search-result js-search-result"></div>
</div>
</div>
<!-- Script pointing to search-script.js -->
<script>/*!
* Simple-Jekyll-Search
* Copyright 2015-2020, Christian Fei
* Licensed under the MIT License.
*/
(function(){
'use strict'
var _$Templater_7 = {
compile: compile,
setOptions: setOptions
}
const options = {}
options.pattern = /\{(.*?)\}/g
options.template = ''
options.middleware = function () {}
function setOptions (_options) {
options.pattern = _options.pattern || options.pattern
options.template = _options.template || options.template
if (typeof _options.middleware === 'function') {
options.middleware = _options.middleware
}
}
function compile (data) {
return options.template.replace(options.pattern, function (match, prop) {
const value = options.middleware(prop, data[prop], options.template)
if (typeof value !== 'undefined') {
return value
}
return data[prop] || match
})
}
'use strict';
function fuzzysearch (needle, haystack) {
var tlen = haystack.length;
var qlen = needle.length;
if (qlen > tlen) {
return false;
}
if (qlen === tlen) {
return needle === haystack;
}
outer: for (var i = 0, j = 0; i < qlen; i++) {
var nch = needle.charCodeAt(i);
while (j < tlen) {
if (haystack.charCodeAt(j++) === nch) {
continue outer;
}
}
return false;
}
return true;
}
var _$fuzzysearch_1 = fuzzysearch;
'use strict'
/* removed: const _$fuzzysearch_1 = require('fuzzysearch') */;
var _$FuzzySearchStrategy_5 = new FuzzySearchStrategy()
function FuzzySearchStrategy () {
this.matches = function (string, crit) {
return _$fuzzysearch_1(crit.toLowerCase(), string.toLowerCase())
}
}
'use strict'
var _$LiteralSearchStrategy_6 = new LiteralSearchStrategy()
function LiteralSearchStrategy () {
this.matches = function (str, crit) {
if (!str) return false
str = str.trim().toLowerCase()
crit = crit.trim().toLowerCase()
return crit.split(' ').filter(function (word) {
return str.indexOf(word) >= 0
}).length === crit.split(' ').length
}
}
'use strict'
var _$Repository_4 = {
put: put,
clear: clear,
search: search,
setOptions: __setOptions_4
}
/* removed: const _$FuzzySearchStrategy_5 = require('./SearchStrategies/FuzzySearchStrategy') */;
/* removed: const _$LiteralSearchStrategy_6 = require('./SearchStrategies/LiteralSearchStrategy') */;
function NoSort () {
return 0
}
const data = []
let opt = {}
opt.fuzzy = false
opt.limit = 10
opt.searchStrategy = opt.fuzzy ? _$FuzzySearchStrategy_5 : _$LiteralSearchStrategy_6
opt.sort = NoSort
opt.exclude = []
function put (data) {
if (isObject(data)) {
return addObject(data)
}
if (isArray(data)) {
return addArray(data)
}
return undefined
}
function clear () {
data.length = 0
return data
}
function isObject (obj) {
return Boolean(obj) && Object.prototype.toString.call(obj) === '[object Object]'
}
function isArray (obj) {
return Boolean(obj) && Object.prototype.toString.call(obj) === '[object Array]'
}
function addObject (_data) {
data.push(_data)
return data
}
function addArray (_data) {
const added = []
clear()
for (let i = 0, len = _data.length; i < len; i++) {
if (isObject(_data[i])) {
added.push(addObject(_data[i]))
}
}
return added
}
function search (crit) {
if (!crit) {
return []
}
return findMatches(data, crit, opt.searchStrategy, opt).sort(opt.sort)
}
function __setOptions_4 (_opt) {
opt = _opt || {}
opt.fuzzy = _opt.fuzzy || false
opt.limit = _opt.limit || 10
opt.searchStrategy = _opt.fuzzy ? _$FuzzySearchStrategy_5 : _$LiteralSearchStrategy_6
opt.sort = _opt.sort || NoSort
opt.exclude = _opt.exclude || []
}
function findMatches (data, crit, strategy, opt) {
const matches = []
for (let i = 0; i < data.length && matches.length < opt.limit; i++) {
const match = findMatchesInObject(data[i], crit, strategy, opt)
if (match) {
matches.push(match)
}
}
return matches
}
function findMatchesInObject (obj, crit, strategy, opt) {
for (const key in obj) {
if (!isExcluded(obj[key], opt.exclude) && strategy.matches(obj[key], crit)) {
return obj
}
}
}
function isExcluded (term, excludedTerms) {
for (let i = 0, len = excludedTerms.length; i < len; i++) {
const excludedTerm = excludedTerms[i]
if (new RegExp(excludedTerm).test(term)) {
return true
}
}
return false
}
/* globals ActiveXObject:false */
'use strict'
var _$JSONLoader_2 = {
load: load
}
function load (location, callback) {
const xhr = getXHR()
xhr.open('GET', location, true)
xhr.onreadystatechange = createStateChangeListener(xhr, callback)
xhr.send()
}
function createStateChangeListener (xhr, callback) {
return function () {
if (xhr.readyState === 4 && xhr.status === 200) {
try {
callback(null, JSON.parse(xhr.responseText))
} catch (err) {
callback(err, null)
}
}
}
}
function getXHR () {
return window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP')
}
'use strict'
var _$OptionsValidator_3 = function OptionsValidator (params) {
if (!validateParams(params)) {
throw new Error('-- OptionsValidator: required options missing')
}
if (!(this instanceof OptionsValidator)) {
return new OptionsValidator(params)
}
const requiredOptions = params.required
this.getRequiredOptions = function () {
return requiredOptions
}
this.validate = function (parameters) {
const errors = []
requiredOptions.forEach(function (requiredOptionName) {
if (typeof parameters[requiredOptionName] === 'undefined') {
errors.push(requiredOptionName)
}
})
return errors
}
function validateParams (params) {
if (!params) {
return false
}
return typeof params.required !== 'undefined' && params.required instanceof Array
}
}
'use strict'
var _$utils_9 = {
merge: merge,
isJSON: isJSON
}
function merge (defaultParams, mergeParams) {
const mergedOptions = {}
for (const option in defaultParams) {
mergedOptions[option] = defaultParams[option]
if (typeof mergeParams[option] !== 'undefined') {
mergedOptions[option] = mergeParams[option]
}
}
return mergedOptions
}
function isJSON (json) {
try {
if (json instanceof Object && JSON.parse(JSON.stringify(json))) {
return true
}
return false
} catch (err) {
return false
}
}
var _$src_8 = {};
(function (window) {
'use strict'
let options = {
searchInput: null,
resultsContainer: null,
json: [],
success: Function.prototype,
searchResultTemplate: '<li><a href="{url}" title="{desc}">{title}</a></li>',
templateMiddleware: Function.prototype,
sortMiddleware: function () {
return 0
},
noResultsText: 'No results found',
limit: 10,
fuzzy: false,
debounceTime: null,
exclude: []
}
let debounceTimerHandle
const debounce = function (func, delayMillis) {
if (delayMillis) {
clearTimeout(debounceTimerHandle)
debounceTimerHandle = setTimeout(func, delayMillis)
} else {
func.call()
}
}
const requiredOptions = ['searchInput', 'resultsContainer', 'json']
/* removed: const _$Templater_7 = require('./Templater') */;
/* removed: const _$Repository_4 = require('./Repository') */;
/* removed: const _$JSONLoader_2 = require('./JSONLoader') */;
const optionsValidator = _$OptionsValidator_3({
required: requiredOptions
})
/* removed: const _$utils_9 = require('./utils') */;
window.SimpleJekyllSearch = function (_options) {
const errors = optionsValidator.validate(_options)
if (errors.length > 0) {
throwError('You must specify the following required options: ' + requiredOptions)
}
options = _$utils_9.merge(options, _options)
_$Templater_7.setOptions({
template: options.searchResultTemplate,
middleware: options.templateMiddleware
})
_$Repository_4.setOptions({
fuzzy: options.fuzzy,
limit: options.limit,
sort: options.sortMiddleware,
exclude: options.exclude
})
if (_$utils_9.isJSON(options.json)) {
initWithJSON(options.json)
} else {
initWithURL(options.json)
}
const rv = {
search: search
}
typeof options.success === 'function' && options.success.call(rv)
return rv
}
function initWithJSON (json) {
_$Repository_4.put(json)
registerInput()
}
function initWithURL (url) {
_$JSONLoader_2.load(url, function (err, json) {
if (err) {
throwError('failed to get JSON (' + url + ')')
}
initWithJSON(json)
})
}
function emptyResultsContainer () {
options.resultsContainer.innerHTML = ''
}
function appendToResultsContainer (text) {
options.resultsContainer.innerHTML += text
}
function registerInput () {
options.searchInput.addEventListener('input', function (e) {
if (isWhitelistedKey(e.which)) {
emptyResultsContainer()
debounce(function () { search(e.target.value) }, options.debounceTime)
}
})
}
function search (query) {
if (isValidQuery(query)) {
emptyResultsContainer()
render(_$Repository_4.search(query), query)
}
}
function render (results, query) {
const len = results.length
if (len === 0) {
return appendToResultsContainer(options.noResultsText)
}
for (let i = 0; i < len; i++) {
results[i].query = query
appendToResultsContainer(_$Templater_7.compile(results[i]))
}
}
function isValidQuery (query) {
return query && query.length > 0
}
function isWhitelistedKey (key) {
return [13, 16, 20, 37, 38, 39, 40, 91].indexOf(key) === -1
}
function throwError (message) {
throw new Error('SimpleJekyllSearch --- ' + message)
}
})(window)
}());
</script>
<!-- Configuration -->
<script>
SimpleJekyllSearch({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
noResultsText: '<p>Aucun résultat!</p>',
json: '/search.json',
searchResultTemplate: '<li><a href="{url}">{date}&nbsp;{title}</a>&nbsp;(Création {create})</li>'
})
</script>
</div></div>
<script>(function() {
var SOURCES = window.TEXT_VARIABLES.sources;
window.Lazyload.js(SOURCES.jquery, function() {
function scrollToAnchor(anchor, duration, callback) {
var $root = this;
$root.animate({ scrollTop: $(anchor).position().top }, duration, function() {
window.history.replaceState(null, '', window.location.href.split('#')[0] + anchor);
callback && callback();
});
}
$.fn.scrollToAnchor = scrollToAnchor;
});
})();
(function() {
var SOURCES = window.TEXT_VARIABLES.sources;
window.Lazyload.js(SOURCES.jquery, function() {
function affix(options) {
var $root = this, $window = $(window), $scrollTarget, $scroll,
offsetBottom = 0, scrollTarget = window, scroll = window.document, disabled = false, isOverallScroller = true,
rootTop, rootLeft, rootHeight, scrollBottom, rootBottomTop,
hasInit = false, curState;
function setOptions(options) {
var _options = options || {};
_options.offsetBottom && (offsetBottom = _options.offsetBottom);
_options.scrollTarget && (scrollTarget = _options.scrollTarget);
_options.scroll && (scroll = _options.scroll);
_options.disabled !== undefined && (disabled = _options.disabled);
$scrollTarget = $(scrollTarget);
isOverallScroller = window.isOverallScroller($scrollTarget[0]);
$scroll = $(scroll);
}
function preCalc() {
top();
rootHeight = $root.outerHeight();
rootTop = $root.offset().top + (isOverallScroller ? 0 : $scrollTarget.scrollTop());
rootLeft = $root.offset().left;
}
function calc(needPreCalc) {
needPreCalc && preCalc();
scrollBottom = $scroll.outerHeight() - offsetBottom - rootHeight;
rootBottomTop = scrollBottom - rootTop;
}
function top() {
if (curState !== 'top') {
$root.removeClass('fixed').css({
left: 0,
top: 0
});
curState = 'top';
}
}
function fixed() {
if (curState !== 'fixed') {
$root.addClass('fixed').css({
left: rootLeft + 'px',
top: 0
});
curState = 'fixed';
}
}
function bottom() {
if (curState !== 'bottom') {
$root.removeClass('fixed').css({
left: 0,
top: rootBottomTop + 'px'
});
curState = 'bottom';
}
}
function setState() {
var scrollTop = $scrollTarget.scrollTop();
if (scrollTop >= rootTop && scrollTop <= scrollBottom) {
fixed();
} else if (scrollTop < rootTop) {
top();
} else {
bottom();
}
}
function init() {
if(!hasInit) {
var interval, timeout;
calc(true); setState();
// run calc every 100 millisecond
interval = setInterval(function() {
calc();
}, 100);
timeout = setTimeout(function() {
clearInterval(interval);
}, 45000);
window.pageLoad.then(function() {
setTimeout(function() {
clearInterval(interval);
clearTimeout(timeout);
}, 3000);
});
$scrollTarget.on('scroll', function() {
disabled || setState();
});
$window.on('resize', function() {
disabled || (calc(true), setState());
});
hasInit = true;
}
}
setOptions(options);
if (!disabled) {
init();
}
$window.on('resize', window.throttle(function() {
init();
}, 200));
return {
setOptions: setOptions,
refresh: function() {
calc(true, { animation: false }); setState();
}
};
}
$.fn.affix = affix;
});
})();
(function() {
var SOURCES = window.TEXT_VARIABLES.sources;
window.Lazyload.js(SOURCES.jquery, function() {
function toc(options) {
var $root = this, $window = $(window), $scrollTarget, $scroller, $tocUl = $('<ul class="toc toc--ellipsis"></ul>'), $tocLi, $headings, $activeLast, $activeCur,
selectors = 'h1,h2,h3', container = 'body', scrollTarget = window, scroller = 'html, body', disabled = false,
headingsPos, scrolling = false, hasRendered = false, hasInit = false;
function setOptions(options) {
var _options = options || {};
_options.selectors && (selectors = _options.selectors);
_options.container && (container = _options.container);
_options.scrollTarget && (scrollTarget = _options.scrollTarget);
_options.scroller && (scroller = _options.scroller);
_options.disabled !== undefined && (disabled = _options.disabled);
$headings = $(container).find(selectors).filter('[id]');
$scrollTarget = $(scrollTarget);
$scroller = $(scroller);
}
function calc() {
headingsPos = [];
$headings.each(function() {
headingsPos.push(Math.floor($(this).position().top));
});
}
function setState(element, disabled) {
var scrollTop = $scrollTarget.scrollTop(), i;
if (disabled || !headingsPos || headingsPos.length < 1) { return; }
if (element) {
$activeCur = element;
} else {
for (i = 0; i < headingsPos.length; i++) {
if (scrollTop >= headingsPos[i]) {
$activeCur = $tocLi.eq(i);
} else {
$activeCur || ($activeCur = $tocLi.eq(i));
break;
}
}
}
$activeLast && $activeLast.removeClass('active');
($activeLast = $activeCur).addClass('active');
}
function render() {
if(!hasRendered) {
$root.append($tocUl);
$headings.each(function() {
var $this = $(this);
$tocUl.append($('<li></li>').addClass('toc-' + $this.prop('tagName').toLowerCase())
.append($('<a></a>').text($this.text()).attr('href', '#' + $this.prop('id'))));
});
$tocLi = $tocUl.children('li');
$tocUl.on('click', 'a', function(e) {
e.preventDefault();
var $this = $(this);
scrolling = true;
setState($this.parent());
$scroller.scrollToAnchor($this.attr('href'), 400, function() {
scrolling = false;
});
});
}
hasRendered = true;
}
function init() {
var interval, timeout;
if(!hasInit) {
render(); calc(); setState(null, scrolling);
// run calc every 100 millisecond
interval = setInterval(function() {
calc();
}, 100);
timeout = setTimeout(function() {
clearInterval(interval);
}, 45000);
window.pageLoad.then(function() {
setTimeout(function() {
clearInterval(interval);
clearTimeout(timeout);
}, 3000);
});
$scrollTarget.on('scroll', function() {
disabled || setState(null, scrolling);
});
$window.on('resize', window.throttle(function() {
if (!disabled) {
render(); calc(); setState(null, scrolling);
}
}, 100));
}
hasInit = true;
}
setOptions(options);
if (!disabled) {
init();
}
$window.on('resize', window.throttle(function() {
init();
}, 200));
return {
setOptions: setOptions
};
}
$.fn.toc = toc;
});
})();
/*(function () {
})();*/
</script><script>
/* toc must before affix, since affix need to konw toc' height. */(function() {
var SOURCES = window.TEXT_VARIABLES.sources;
var TOC_SELECTOR = window.TEXT_VARIABLES.site.toc.selectors;
window.Lazyload.js(SOURCES.jquery, function() {
var $window = $(window);
var $articleContent = $('.js-article-content');
var $tocRoot = $('.js-toc-root'), $col2 = $('.js-col-aside');
var toc;
var tocDisabled = false;
var hasSidebar = $('.js-page-root').hasClass('layout--page--sidebar');
var hasToc = $articleContent.find(TOC_SELECTOR).length > 0;
function disabled() {
return $col2.css('display') === 'none' || !hasToc;
}
tocDisabled = disabled();
toc = $tocRoot.toc({
selectors: TOC_SELECTOR,
container: $articleContent,
scrollTarget: hasSidebar ? '.js-page-main' : null,
scroller: hasSidebar ? '.js-page-main' : null,
disabled: tocDisabled
});
$window.on('resize', window.throttle(function() {
tocDisabled = disabled();
toc && toc.setOptions({
disabled: tocDisabled
});
}, 100));
});
})();
(function() {
var SOURCES = window.TEXT_VARIABLES.sources;
window.Lazyload.js(SOURCES.jquery, function() {
var $window = $(window), $pageFooter = $('.js-page-footer');
var $pageAside = $('.js-page-aside');
var affix;
var tocDisabled = false;
var hasSidebar = $('.js-page-root').hasClass('layout--page--sidebar');
affix = $pageAside.affix({
offsetBottom: $pageFooter.outerHeight(),
scrollTarget: hasSidebar ? '.js-page-main' : null,
scroller: hasSidebar ? '.js-page-main' : null,
scroll: hasSidebar ? $('.js-page-main').children() : null,
disabled: tocDisabled
});
$window.on('resize', window.throttle(function() {
affix && affix.setOptions({
disabled: tocDisabled
});
}, 100));
window.pageAsideAffix = affix;
});
})();
</script><!---->
</div>
<script>(function () {
var $root = document.getElementsByClassName('root')[0];
if (window.hasEvent('touchstart')) {
$root.dataset.isTouch = true;
document.addEventListener('touchstart', function(){}, false);
}
})();
</script>
</body>
</html>