bug: With lightdm display manager (on my Debian host operating system + distro morphed into Kicksecure): ZDOTDIR environment variable missing
ok: Whonix Xfce for VirtualBox which is using gdm display manager: ZDOTDIR environment variable ok
ok: virtual consoles
Seems like DefaultEnvironment= isn’t as consistent / reliable as desired.
changing default shell is failing in Whonix Xfce for VirtualBox
debian/dist-base-files.postinst command chsh --shell /bin/zsh user is failing due to permission denied (seen during apt dist-upgrade). (The chsh command doesn’t require sudo because Debian maintainer scripts run as root anyhow.)
I don’t know any reliable way of setting system wide variables before the shell is sourced.
Last resort would be to patch the /etc/zsh scripts provided by debian, which I understand is also undesired.
If for example the variable was set in the zsh system files, then it would not need to be set externally, only will be used by zsh sourcing.
The answer there worked for me. First I typed in the zsh shell:
bindkey '^ ' forward-word
This was handy to test this so I didn’t have to edit the zsh config right away just to try that solution. Once entered, I could use
ctrl + space
Now, before we add bindkey '^ ' forward-word to the zsh config by default… Are there some common / popular / convention zsh shortcuts? Then perhaps we should use the same instead of inventing ones which are only used by Kicksecure / Whonix?
Once that’s done, the most common hotkeys should be documented unless it’s already documented somewhere good enough upstream.
Readline library is what shells uses. Every shell has their own implementation, Zsh used Bash readline in the beginning then startd doing their own version.
Bash reads /etc/inputrc and ~/.inputrc, Zsh does not.
As for typing style, Vi-style line editor is POSIX while Emacs is not.
Zsh does not have default keybindings, it comes clean and you design your keybindings, but it is better to follow preexisting standards:
The debian man page also has the table, but it is just a little bit more difficult to read without colors and column separation.
Order of precedence I will be using:
if Vi and Emacs keymap is empty, I will try to choose a non-used key
if one of the styles is empty, I will use the other style key.
if both are filled, I will prefer Vi because it is POSIX and not GNU only.
Another thing is that some controls, even not specified on the zsh file, are acting their default behavior.
Example is ^I, which is the same as tab. I will add those also because then I don’t overwrite the default behavior they already have with different mappings.
Edit: some can’t be mentioned
zsh-syntax-highlighting: unhandled ZLE widget 'complete'
zsh-syntax-highlighting: (This is sometimes caused by doing `bindkey <keys> complete` without creating the 'complete' widget with `zle -N` or `zle -C`.)
``
Now, before we add bindkey '^ ' forward-word to the zsh config by default
Didn’t find anything conflicting with ^ .
Are there some common / popular / convention zsh shortcuts? Then perhaps we should use the same instead of inventing ones which are only used by Kicksecure / Whonix?
Doing that following the readline man page (Arch or Debian, same thing)
Once that’s done, the most common hotkeys should be documented unless it’s already documented somewhere good enough upstream.
Just link to man page.
One default behavior I know that I changed is ^J to accept-search instead of the default accept-line.
^M is already accept-line, which equals to the Enter key.
Having ^J as accept-search is better for tab completion, you can select the option and type ^J to accept the search and continue typing.
I think this is the right way to go. macOS did this some time ago, but not for this reason.
Maybe with different colors/themes (I kinda like compartmentalization) in Whonix GW vs Whonix WS too, once again to prevent mistakes from happens, because they do, right?
Currently the prompt is workstation|gateway user PWD, where workstation or gateway depends on the vm you are on. I see a problem with this is that it makes the prompt too large, but ws|gw would not be a suitable alternative because they only differ by one letter. Maybe setting the terminal background differently for the GW or WS would help, but that would be on XFCE, not on ZSH.