issue217:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue217:c_c [2025/06/02 07:24] – d52fr | issue217:c_c [2025/06/03 14:11] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | |||
**Last issue we looked at tmux after screen. I was going to move onto something else this month, but I realised that I left out a few things. The first being how to change the horrible CTRL+b to CTRL+a or CTRL+l depending on the side of the keyboard you prefer. This will not disable CTRL+b, but it will add your key binding of choice as an alternative or you can disable it with unbind. | **Last issue we looked at tmux after screen. I was going to move onto something else this month, but I realised that I left out a few things. The first being how to change the horrible CTRL+b to CTRL+a or CTRL+l depending on the side of the keyboard you prefer. This will not disable CTRL+b, but it will add your key binding of choice as an alternative or you can disable it with unbind. | ||
Ligne 12: | Ligne 13: | ||
That brings me to: CTRL+b and : -This is the other place you can type commands that are valid for the current session only, unlike our conf-file.** | That brings me to: CTRL+b and : -This is the other place you can type commands that are valid for the current session only, unlike our conf-file.** | ||
+ | |||
+ | Dans le dernier numéro, nous avons abordé tmux après screen. J' | ||
+ | |||
+ | Ouvrez un terminal et saisissez : | ||
+ | |||
+ | nano .tmux.conf | ||
+ | |||
+ | Nous allons définir une option avec set-option, la rendre globale avec -g et lui indiquer que nous voulons que notre préfixe soit CTRL+a, comme screen. Nous allons ensuite dissocier le préfixe de la touche CTRL+b. | ||
+ | |||
+ | Une fois terminé, écrivez et quittez ou quittez et enregistrez. Tmux affiche les messages d' | ||
+ | |||
+ | Démarrez maintenant tmux et testez les nouveaux paramètres. | ||
+ | |||
+ | Cela m' | ||
+ | |||
**Let’s do that quickly, open a terminal with tmux and open the tmux command line, now type: | **Let’s do that quickly, open a terminal with tmux and open the tmux command line, now type: | ||
Ligne 26: | Ligne 42: | ||
on the command line. Do not insert spaces as the man page has or the command will fail.** | on the command line. Do not insert spaces as the man page has or the command will fail.** | ||
+ | |||
+ | Pour le faire rapidement, ouvrez un terminal avec tmux et ouvrez la ligne de commande tmux. Saisissez : | ||
+ | |||
+ | set-option -g status-style bg=cyan - et appuyez sur < | ||
+ | |||
+ | (Pour prendre en charge les terminaux plus anciens, tmux prend en charge le noir et blanc et six couleurs par défaut, mais vous pouvez le forcer à utiliser 256 couleurs avec set -g default-terminal “screen-256color”.) | ||
+ | |||
+ | La barre d' | ||
+ | |||
+ | Je ne sais pas pour vous, mais ce fonctionnement avec une commande à la fois ne me convient pas. Répétons donc l' | ||
+ | |||
+ | neww;splitw | ||
+ | |||
+ | sur la ligne de commande. N' | ||
+ | |||
**There are options to these commands as well, for instance, you could open a window in a folder that you want to work in. Open the tmux command line and type | **There are options to these commands as well, for instance, you could open a window in a folder that you want to work in. Open the tmux command line and type | ||
Ligne 40: | Ligne 71: | ||
I use Byobu as my wrapper for screen and tmux. You can specify what you want to work with when starting byobu, by typing byobu-screen or byobu-tmux or just byobu if you set up a configuration file. I find this a lot easier when I have to do things remotely that require screen and something locally, that I use tmux for. ** | I use Byobu as my wrapper for screen and tmux. You can specify what you want to work with when starting byobu, by typing byobu-screen or byobu-tmux or just byobu if you set up a configuration file. I find this a lot easier when I have to do things remotely that require screen and something locally, that I use tmux for. ** | ||
+ | |||
+ | Ces commandes offrent également des options. Par exemple, vous pouvez ouvrir une fenêtre dans un dossier que vous souhaitez utiliser. Ouvrez la ligne de commande tmux et saisissez : | ||
+ | |||
+ | neww -c /etc | ||
+ | |||
+ | À ce stade, tmux commence à prendre son indépendance et, en tant que débutant, vous risquez de vous perdre dans les détails ; nous allons donc rester à la surface. | ||
+ | |||
+ | Nous avons également tilix comme alternative, | ||
+ | |||
+ | Remarque : La commande tilix -q ne fonctionne pas dans une session Wayland. | ||
+ | |||
+ | J' | ||
+ | |||
**The power of byobu is in the configuration files. You will find them under: / | **The power of byobu is in the configuration files. You will find them under: / | ||
Here you can tweak how tmux or screen behaves as well as how they look. Yes, that’s right we can rice our sessions! | Here you can tweak how tmux or screen behaves as well as how they look. Yes, that’s right we can rice our sessions! | ||
- | |||
Tip: do not run byobu as root (don’t use sudo byobu) as it will change the ownership of your configuration files to the root user. There is a way to do it, but just rule-of-thumb this. | Tip: do not run byobu as root (don’t use sudo byobu) as it will change the ownership of your configuration files to the root user. There is a way to do it, but just rule-of-thumb this. | ||
Ligne 64: | Ligne 107: | ||
press F3, now press F4.** | press F3, now press F4.** | ||
+ | |||
+ | La puissance de byobu réside dans ses fichiers de configuration. Vous les trouverez sous : / | ||
+ | |||
+ | Là, vous pouvez modifier le comportement et l' | ||
+ | |||
+ | Conseil : n' | ||
+ | |||
+ | Ouvrez un terminal et saisissez byobu (la valeur par défaut est byobu-tmux). Si byobu n'est pas installé, saisissez : | ||
+ | |||
+ | Vous saurez que byobu est en cours d' | ||
+ | |||
+ | echo “start” < | ||
+ | |||
+ | appuyez sur F2 | ||
+ | |||
+ | echo “middle” < | ||
+ | |||
+ | appuyez sur F2 | ||
+ | |||
+ | echo “end” < | ||
+ | |||
+ | appuyez sur F3, puis sur F4. | ||
+ | |||
Ligne 70: | Ligne 136: | ||
Our modifiers are CTRL and SHIFT. | Our modifiers are CTRL and SHIFT. | ||
- | We can now do the same with F3 and F4 and modify it with SHIFT. Give that a go. Now use CTRL+b and so like we did in the previous issue. Try CTRL+F6 and then finally, | + | We can now do the same with F3 and F4 and modify it with SHIFT. Give that a go. Now use CTRL+b and so like we did in the previous issue. Try CTRL+F6 and then finally, |
Since we did all this in the previous three issues, I’m not going to explain each one, suffice to say, I’m showing you how easy it is with byobu. | Since we did all this in the previous three issues, I’m not going to explain each one, suffice to say, I’m showing you how easy it is with byobu. | ||
If you start byobu again, it will attach itself automatically to the last open session, you don’t need to do anything. In byobu, if you want to rename a window, you simply press F8 and start typing.** | If you start byobu again, it will attach itself automatically to the last open session, you don’t need to do anything. In byobu, if you want to rename a window, you simply press F8 and start typing.** | ||
+ | |||
+ | Notez que nous procédons de la même manière que dans les numéros précédents, | ||
+ | |||
+ | Nos touches de modification sont Ctrl et Maj. Appuyez sur Maj+F2. Nous avons divisé notre fenêtre en deux volets, le nouveau volet étant situé sous l' | ||
+ | |||
+ | Nous pouvons maintenant faire la même chose avec F3 et F4 et modifier le résultat avec Maj. Essayez. Utilisez maintenant Ctrl+b, comme dans le numéro précédent. Essayez Ctrl+F6, puis enfin Maj+F6. (F6 étant la touche la plus puissante, héhéhéhé) | ||
+ | |||
+ | Comme nous avons fait tout cela dans les trois numéros précédents, | ||
+ | |||
+ | Si vous redémarrez byobu, il se rattachera automatiquement à la dernière session ouverte ; vous n'avez rien à faire. Dans byobu, pour renommer une fenêtre, appuyez simplement sur F8 et commencez à saisir du texte. | ||
+ | |||
**There are lots of resources out on the internet regarding ricing, so I will not repeat them here. (Also I usually leave mine as default as it serves my needs, but if you spend a lot of time in it, you may want to start editing the configuration files.) | **There are lots of resources out on the internet regarding ricing, so I will not repeat them here. (Also I usually leave mine as default as it serves my needs, but if you spend a lot of time in it, you may want to start editing the configuration files.) | ||
Ligne 83: | Ligne 160: | ||
As per usual, any errors, report them to: misc@fullcirclemagazine.org** | As per usual, any errors, report them to: misc@fullcirclemagazine.org** | ||
+ | |||
+ | Il existe de nombreuses ressources sur Internet concernant la configuration et la personnalisation ; je ne les répéterai donc pas ici. (Je laisse généralement les valeurs par défaut, car cela me convient, mais si vous y passez beaucoup de temps, vous pourriez commencer à modifier les fichiers de configuration.) | ||
+ | |||
+ | Ceci m' | ||
+ | |||
+ | Faisons-le rapidement. Appuyez plusieurs fois sur Ctrl+Maj+F5 jusqu' | ||
+ | |||
+ | Comme d' | ||
issue217/c_c.1748841895.txt.gz · Dernière modification : 2025/06/02 07:24 de d52fr