Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MVP of Oh My Zsh on TailsOS #5

Closed
fititnt opened this issue Oct 19, 2020 · 8 comments
Closed

MVP of Oh My Zsh on TailsOS #5

fititnt opened this issue Oct 19, 2020 · 8 comments

Comments

@fititnt
Copy link
Owner

fititnt commented Oct 19, 2020

Refs:


Document (or maybe do some shell scripting) of an minimum viable product (MVP) of Oh My Zsh on TailsOS.

@fititnt
Copy link
Owner Author

fititnt commented Oct 20, 2020

Oh My Zsh (not surprisely) needs zsh

amnesia@amnesia:~/Persistent/TailsOS-for-non-whistleblowers$ sudo apt install zsh
[sudo] password for amnesia: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libpcre2-posix0
Use 'sudo apt autoremove' to remove it.
Suggested packages:
  zsh-doc
The following NEW packages will be installed:
  zsh
0 upgraded, 1 newly installed, 0 to remove and 34 not upgraded.
Need to get 0 B/881 kB of archives.
After this operation, 2,459 kB of additional disk space will be used.
[INFO] Saving package changes
Selecting previously unselected package zsh.
(Reading database ... 139886 files and directories currently installed.)
Preparing to unpack .../archives/zsh_5.7.1-1_amd64.deb ...
Unpacking zsh (5.7.1-1) ...
Setting up zsh (5.7.1-1) ...
Processing triggers for man-db (2.8.5-2) ...
[INFO] Examining package changes
amnesia@amnesia:~/Persistent/TailsOS-for-non-whistleblowers$ [INFO] New packages manually installed: {'zsh'}
[INFO] Adding to additional packages list: {'zsh'}
amnesia@amnesia:~/Persistent/TailsOS-for-non-whistleblowers$ 

@fititnt
Copy link
Owner Author

fititnt commented Oct 20, 2020

zsh

amnesia@amnesia:~/Persistent/TailsOS-for-non-whistleblowers$ sudo apt install zsh
[sudo] password for amnesia: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libpcre2-posix0
Use 'sudo apt autoremove' to remove it.
Suggested packages:
  zsh-doc
The following NEW packages will be installed:
  zsh
0 upgraded, 1 newly installed, 0 to remove and 34 not upgraded.
Need to get 0 B/881 kB of archives.
After this operation, 2,459 kB of additional disk space will be used.
[INFO] Saving package changes
Selecting previously unselected package zsh.
(Reading database ... 139886 files and directories currently installed.)
Preparing to unpack .../archives/zsh_5.7.1-1_amd64.deb ...
Unpacking zsh (5.7.1-1) ...
Setting up zsh (5.7.1-1) ...
Processing triggers for man-db (2.8.5-2) ...
[INFO] Examining package changes
amnesia@amnesia:~/Persistent/TailsOS-for-non-whistleblowers$ [INFO] New packages manually installed: {'zsh'}
[INFO] Adding to additional packages list: {'zsh'}

oh-my-zsh

amnesia@amnesia:~/Persistent/TailsOS-for-non-whistleblowers$ sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
--2020-10-20 00:30:08--  https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh
Resolving raw.github.com (raw.github.com)... 151.101.36.133
Connecting to raw.github.com (raw.github.com)|151.101.36.133|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh [following]
--2020-10-20 00:30:10--  https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.112.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.112.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8910 (8.7K) [text/plain]
Saving to: ‘STDOUT’

-                                                    100%[=====================================================================================================================>]   8.70K  42.2KB/s    in 0.2s    

2020-10-20 00:30:13 (42.2 KB/s) - written to stdout [8910/8910]

Cloning Oh My Zsh...
Cloning into '/home/amnesia/.oh-my-zsh'...
remote: Enumerating objects: 1174, done.
remote: Counting objects: 100% (1174/1174), done.
remote: Compressing objects: 100% (1143/1143), done.
remote: Total 1174 (delta 20), reused 1097 (delta 15), pack-reused 0
Receiving objects: 100% (1174/1174), 795.45 KiB | 303.00 KiB/s, done.
Resolving deltas: 100% (20/20), done.

Looking for an existing zsh config...
Using the Oh My Zsh template file and adding it to ~/.zshrc.

Time to change your default shell to zsh:
Do you want to change your default shell to zsh? [Y/n] y
Changing the shell...
Password: 
Shell successfully changed to '/usr/bin/zsh'.

         __                                     __
  ____  / /_     ____ ___  __  __   ____  _____/ /_
 / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \
/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / /
\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/
                        /____/                       ....is now installed!


Before you scream Oh My Zsh! please look over the ~/.zshrc file to select plugins, themes, and options.

• Follow us on Twitter: https://twitter.com/ohmyzsh
• Join our Discord server: https://discord.gg/ohmyzsh
• Get stickers, shirts, coffee mugs and other swag: https://shop.planetargon.com/collections/oh-my-zsh

➜  TailsOS-for-non-whistleblowers git:(main) ✗ 

@fititnt
Copy link
Owner Author

fititnt commented Oct 20, 2020

I know that the default theme of oh-my-zsh already is not great, but with white background it really get's shitty. This is something to look later

Screenshot from 2020-10-20 00-33-52

@fititnt
Copy link
Owner Author

fititnt commented Oct 20, 2020

Hummmmmm.... interesting. One way to change the background colors of the terminal is go to Terminal > Edit > Preferences > Profile > Colors and disable "Use colors from the system theme".

Maybe this alone could be somewhat acceptable instead of use the full zsh. But for now I will just do the bare minimum and keep going. Anyway is documented here on this issue for everyone search later at least know some cosmetic changes

Terminal > Edit > Preferences > Profile > Colors

Default ( Terminal Options + screen with default oh-my-zsh theme)

Screenshot from 2020-10-20 01-03-39

Removing "Use colors from system theme" ( Terminal Options + screen with default oh-my-zsh theme)

Screenshot from 2020-10-20 01-04-03

@fititnt
Copy link
Owner Author

fititnt commented Oct 20, 2020

humm... ok. Now one problem is how to persist the terminal profiles. This does not seems to be saved betwen sessions.

@fititnt
Copy link
Owner Author

fititnt commented Oct 20, 2020

Ok. The terminal options seems to not be saved some type of filesystem file, but can be accessed via dconf command.

If is this, even if Tails do not support "save" betwen sessions, would be possible to run some startup script that would do the trick.

amnesia@amnesia:~$ dconf dump /org/gnome/terminal/
[legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9]
use-theme-colors=false
visible-name='custom-profile-theme'

https://dimitar.me/how-to-export-import-gnome-terminal-profiles/

Screenshot from 2020-10-20 05-00-56

@fititnt
Copy link
Owner Author

fititnt commented Oct 21, 2020

While not fully well documented, since this is just an MVP, I think we could close.

About the change on the terminal background, see Persistance of cosmetic changes on TailsOS terminal #9.

@fititnt fititnt closed this as completed Oct 21, 2020
@fititnt
Copy link
Owner Author

fititnt commented Oct 21, 2020

Note: the documentation is at docs/oh-my-zsh-setup.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant