issue217:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue217:c_c [2025/05/17 17:59] – créée philou511 | issue217:c_c [2025/06/03 14:11] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | CnC | ||
- | 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. |
- | Open a terminal and type nano .tmux.conf | + | Open a terminal and type: |
+ | nano .tmux.conf | ||
We will set an option with set-option, make it global with -g and tell it we want our prefix to be CTRL+a like screen. We will then unbind the CTRL+b key prefix. | We will set an option with set-option, make it global with -g and tell it we want our prefix to be CTRL+a like screen. We will then unbind the CTRL+b key prefix. | ||
Ligne 12: | Ligne 12: | ||
Now fire up tmux and test out the new settings. | Now fire up tmux and test out the new settings. | ||
- | 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: | ||
+ | |||
+ | set-option -g status-style bg=cyan | ||
- | Let’s do that quickly, open a terminal with tmux and open the tmux command line, now type: set-option -g status-style bg=cyan | ||
(To support older terminals, tmux supports black and white and six colours by default, but we can force it to use 256 with set -g default-terminal “screen-256color”.) | (To support older terminals, tmux supports black and white and six colours by default, but we can force it to use 256 with set -g default-terminal “screen-256color”.) | ||
+ | |||
You should see the information bar at the bottom go from green to cyan. Now press CTRL+b and & -If you had more than one pane, please close those too. Now tmux should have exited. Open tmux again. You will notice that the information bar is now green again. If you copy that command to the tmux.conf file, the change becomes permanent. The command is taken directly from the man page, so head over to the “COMMAND PARSING AND EXECUTION” section and try adding that second option to your configuration file. As I said in the last issue, I really like that the short-cut key combinations have command substitutions. Press: | You should see the information bar at the bottom go from green to cyan. Now press CTRL+b and & -If you had more than one pane, please close those too. Now tmux should have exited. Open tmux again. You will notice that the information bar is now green again. If you copy that command to the tmux.conf file, the change becomes permanent. The command is taken directly from the man page, so head over to the “COMMAND PARSING AND EXECUTION” section and try adding that second option to your configuration file. As I said in the last issue, I really like that the short-cut key combinations have command substitutions. Press: | ||
- | Now I don’t know about you, but this one command at a time does not do it for me, so let’s repeat the exercise and type this instead: neww; | + | Now I don’t know about you, but this one command at a time does not do it for me, so let’s repeat the exercise and type this instead: |
- | 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 neww -c /etc | + | |
+ | neww;splitw | ||
+ | |||
+ | 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; | ||
+ | |||
+ | 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 | ||
+ | |||
+ | neww -c /etc | ||
At this point, tmux just starts to become its own thing and you can get lost in the weeds as a newbie, so we will stay near the surface. | At this point, tmux just starts to become its own thing and you can get lost in the weeds as a newbie, so we will stay near the surface. | ||
+ | |||
As an alternative we also have tilix, but unlike tmux, the man page for tilix is empty by comparison. | As an alternative we also have tilix, but unlike tmux, the man page for tilix is empty by comparison. | ||
- | ***Note: The command: tilix -q will not work in a wayland session. | ||
- | 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. | + | Note: The command: tilix -q will not work in a wayland session. |
- | The power of byobu is in the configuration files. You will find them under: / | + | |
+ | 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: / | ||
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. |
Open a terminal and type byobu. (it defaults to byobu-tmux) If you don’t have byobu installed, type: sudo apt install byobu | Open a terminal and type byobu. (it defaults to byobu-tmux) If you don’t have byobu installed, type: sudo apt install byobu | ||
Ligne 48: | Ligne 106: | ||
echo “end” < | echo “end” < | ||
- | 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. | ||
+ | |||
+ | |||
+ | |||
+ | **Notice that we are doing the same as we did in earlier issues, but the work flow is a lot easier and simple with single key presses. | ||
- | Notice that we are doing the same as we did in earlier issues, but the work flow is a lot easier and simple with single key presses. | ||
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.** |
- | 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.) | + | 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.) | ||
That brings me to one more tip, if you mess up or do not like the results, simply delete the corresponding configuration file. | That brings me to one more tip, if you mess up or do not like the results, simply delete the corresponding configuration file. | ||
Ligne 66: | Ligne 159: | ||
Lets do that quickly. Press CTRL+SHIFT+F5 a few times until the information bar is well and truly ugly. You will notice that ending a session will not reset the ugly colours. Navigate to: / | Lets do that quickly. Press CTRL+SHIFT+F5 a few times until the information bar is well and truly ugly. You will notice that ending a session will not reset the ugly colours. Navigate to: / | ||
- | 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.1747497588.txt.gz · Dernière modification : 2025/05/17 17:59 de philou511