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

Provision a new Chromebook linux environment #383

Open
coding-to-music opened this issue Nov 15, 2022 · 0 comments
Open

Provision a new Chromebook linux environment #383

coding-to-music opened this issue Nov 15, 2022 · 0 comments

Comments

@coding-to-music
Copy link
Owner

coding-to-music commented Nov 15, 2022

Copy the following into the Downloads directory save-files

# files
.bash_history
.bashrc
.gitconfig
.bash_alias

.ssh (directory)

using Chromebook settings remove and create a linux environment

using Chromebook settings remove and create a linux environment

Go into the new linux and back up files

mv .bashrc to .bashrc_original

Copy the Downloads/save-file contents to the root

Copy the Downloads/save-file contents to the root

# copy the dot files
cp ap/save-files/.* .

# copy the .ssh directory
cp -r ap/save-files/.ssh .

Change the permissions as needed of the .ssh files

    # Set public/private key permissions

    # Octal form
    chmod 600 ~/.ssh/id_rsa
    chmod 600 ~/.ssh/id_rsa.pub

    # Equivalent literal form
    chmod u=rw,go= ~/.ssh/id_rsa ~/.ssh/id_rsa.pub

    # Optional: make public key readable
    chmod 644 ~/.ssh/id_rsa.pub # chmod a=r,u+w ~/.ssh/id_rsa.pub

    # Set directory permissions
    chmod 700 ~/.ssh # chmod u=rwx,go= ~/.ssh

    # Legend for literal form
    # +: allow       -: deny         =: reset and allow
    # u: user        r: read
    # g: group       w: write
    # o: others      x: execute
    # a: all

verify can connect to GitHub

Check space used BEFORE installing vscode

df -h

Output

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdb        4.5G  1.7G  2.5G  41% /
none            492K  4.0K  488K   1% /dev
/dev/vdb        4.5G  1.7G  2.5G  41% /dev/wl0
tmpfs           100K     0  100K   0% /dev/lxd
run             1.4G   32K  1.4G   1% /dev/.host_ip
/dev/root       421M  288M  124M  70% /dev/.ssh/sshd_config
9p              1.9G  784K  1.9G   1% /mnt/chromeos
tmpfs           1.4G     0  1.4G   0% /mnt/external
/dev/vda         57M   57M     0 100% /opt/google/cros-containers
fonts           2.8G  2.4G  337M  88% /usr/share/fonts/chromeos
tmpfs           100K     0  100K   0% /dev/.lxd-mounts
devtmpfs        1.4G     0  1.4G   0% /dev/tty
tmpfs           1.4G     0  1.4G   0% /dev/shm
tmpfs           556M  116K  556M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           4.0M     0  4.0M   0% /sys/fs/cgroup
tmpfs           278M   16K  278M   1% /run/user/1000

install vscode

https://code.visualstudio.com/blogs/2020/12/03/chromebook-get-started

install gnome-keyring for use by vscode

sudo apt-get update
sudo apt-get install -y gnome-keyring

download vscode .deb install file

https://code.visualstudio.com/download

Follow instructions https://code.visualstudio.com/blogs/2020/12/03/chromebook-get-started

run vscode with verbose output

code --verbose

see what is running via systemctl

sudo systemctl status

Output

● penguin
    State: running
     Jobs: 0 queued
   Failed: 0 units
    Since: Tue 2022-11-15 01:26:32 EST; 1min 23s ago
   CGroup: /
           ├─user.slice 
           │ └─user-1000.slice 
           │   └─[email protected] 
           │     ├─app.slice 
           │     │ ├─app-sommelier.slice 
           │     │ │ ├─[email protected] 
           │     │ │ │ └─173 /opt/google/cros-containers/bin/../lib/ld-linux-x86-64.so.2 --argv0 /usr/bin/sommelier --library-path /opt/google/cros-containers/bi>
           │     │ │ └─[email protected] 
           │     │ │   └─165 /opt/google/cros-containers/bin/../lib/ld-linux-x86-64.so.2 --argv0 /usr/bin/sommelier --library-path /opt/google/cros-containers/bi>
           │     │ ├─app-sommelier\x2dx.slice 
           │     │ │ ├─[email protected] 
           │     │ │ │ ├─170 /opt/google/cros-containers/bin/../lib/ld-linux-x86-64.so.2 --argv0 /usr/bin/sommelier --library-path /opt/google/cros-containers/bi>
           │     │ │ │ └─193 /opt/google/cros-containers/bin/../lib/ld-linux-x86-64.so.2 --argv0 /opt/google/cros-containers/bin/Xwayland --library-path /opt/goo>
           │     │ │ └─[email protected] 
           │     │ │   ├─171 /opt/google/cros-containers/bin/../lib/ld-linux-x86-64.so.2 --argv0 /usr/bin/sommelier --library-path /opt/google/cros-containers/bi>
           │     │ │   └─194 /opt/google/cros-containers/bin/../lib/ld-linux-x86-64.so.2 --argv0 /opt/google/cros-containers/bin/Xwayland --library-path /opt/goo>
           │     │ ├─cros-garcon.service 
           │     │ │ ├─245 /opt/google/cros-containers/bin/../lib/ld-linux-x86-64.so.2 --argv0 /opt/google/cros-containers/bin/garcon --library-path /opt/google/>
           │     │ │ ├─258 /usr/lib/openssh/sftp-server
           │     │ │ ├─260 /opt/google/cros-containers/bin/../lib/ld-linux-x86-64.so.2 --argv0 /opt/google/cros-containers/bin/vshd --library-path /opt/google/cr>
           │     │ │ ├─266 -bash
           │     │ │ ├─550 sudo systemctl status
           │     │ │ ├─551 systemctl status
           │     │ │ └─552 less
           │     │ └─dbus.service 
           │     │   └─206 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
           │     └─init.scope 
           │       ├─135 /lib/systemd/systemd --user
           │       └─137 (sd-pam)
           ├─init.scope 
           │ └─1 /sbin/init
           └─system.slice 
             ├─packagekit.service 
             │ └─261 /usr/libexec/packagekitd
             ├─systemd-udevd.service 
             │ └─71 /lib/systemd/systemd-udevd
             ├─networking.service 
             │ └─104 /sbin/dhclient -4 -v -i -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -I -df /var/lib/dhcp/dhclient6.eth0.leases eth0
             ├─polkit.service 
             │ └─188 /usr/libexec/polkitd --no-debug
             ├─rtkit-daemon.service 
             │ └─184 /usr/libexec/rtkit-daemon
             ├─systemd-journald.service 
             │ └─62 /lib/systemd/systemd-journald
             ├─console-getty.service 
             │ └─132 /sbin/agetty -o -p -- \u --noclear --keep-baud console 115200,38400,9600 vt220
             ├─cros-sftp.service 
             │ └─134 sshd: /usr/sbin/sshd -D -f /dev/.ssh/sshd_config [listener] 0 of 10-100 startups
             ├─dbus.service 
             │ └─85 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
             └─systemd-logind.service 
               └─87 /lib/systemd/systemd-logind

Check space used AFTER installing vscode and syncing settings for extensions etc - 1.4 gb of space used

vscode and syncing settings for extensions etc -

1.7 gb before
3.1 gb after
--------------
1.4 gb of space used
df -h

Output

Filesystem      Size  Used Avail Use% Mounted on
/dev/vdb        4.5G  3.1G  1.2G  72% /
none            492K  4.0K  488K   1% /dev
/dev/vdb        4.5G  3.1G  1.2G  72% /dev/wl0
tmpfs           100K     0  100K   0% /dev/lxd
run             1.4G   32K  1.4G   1% /dev/.host_ip
/dev/root       421M  288M  124M  70% /dev/.ssh/sshd_config
9p              1.9G  784K  1.9G   1% /mnt/chromeos
tmpfs           1.4G     0  1.4G   0% /mnt/external
/dev/vda         57M   57M     0 100% /opt/google/cros-containers
fonts           2.8G  2.4G  337M  88% /usr/share/fonts/chromeos
tmpfs           100K     0  100K   0% /dev/.lxd-mounts
devtmpfs        1.4G     0  1.4G   0% /dev/tty
tmpfs           1.4G   32M  1.4G   3% /dev/shm
tmpfs           556M  124K  556M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           4.0M     0  4.0M   0% /sys/fs/cgroup
tmpfs           278M   64K  278M   1% /run/user/1000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant