google-chrome -no-sandbox --enable-features=UseSkiaRenderer --enable-gpu-rasterization --enable-hdr --start-fullscreen --kiosk --app=https://play.geforcenow.com
curl -sSL https://raw.githubusercontent.com/alacritty/alacritty/master/extra/alacritty.info | tic -x -
rc.local
files or crontab @reboot
solutions.
With systemd services you can also reliably access logs and see the status of your process. This is especially useful for Python projects on things like a Raspberry Pi which you use headless and want to start your script as soon as it boots.
Replace <YOUR-NAME>
with a name descriptive of your project. Make it memorable because you probably have to remember it at some point.
Find out the path to your python runtime with which
which python
This will return something like this /usr/bin/python
, use this later as <YOUR-PYTHON-PATH>
Create a service via:
sudo systemctl --force --full edit <YOUR-NAME>.service
And paste
[Unit]
Description=<(Optional) Description of your project>
After=network.target
[Service]
ExecStart=<YOUR-PYTHON-PATH> <PATH-TO-YOUR-SCRIPT>.py
[Install]
WantedBy=multi-user.target
Save it and reload all Systemd services via
sudo systemctl daemon-reload
Enable autostart on boot of your new service:\
sudo systemctl enable <YOUR-NAME>.service
The previous example assumes you want your script to start after the network interfaces were initialized and the OS is ready to use. You can change this behaviour by changing the values of the After=
and WantedBy=
parameters in the service file.
You can also start python scripts utilizing virtual environments this way by explicitly using the path to the python binary of your virtual environment like this:
ExecStart=/home/<PATH-TO-PROJECT>/venv/bin/python <PATH-TO-YOUR-SCRIPT>.py
You can also change the working directory for your service before you start your script. This is especially useful if you reference
relative paths in your code like machine learning models or asset folders.
You can do this by adding a WorkingDirectory
property to the service. Be aware that you
still have to use absolute paths to reference your python executable and your script.
[Service]
WorkingDirectory=/home/user/<PATH-TO-PROJECT>
ExecStart=/home/<PATH-TO-PROJECT>/venv/bin/python <PATH-TO-YOUR-SCRIPT>.py
Lastly you can execute your python script as specific Linux user and/or group e.g. as user “pi” if there are some specific permissions requiring this. For this to work you specify a user or group in the service part of the file. This is an example on how to do this for the user pi:
[Unit]
Description=<(Optional) Description of your project>
After=network.target
[Service]
ExecStart=<YOUR-PYTHON-PATH> <PATH-TO-YOUR-SCRIPT>.py
User=pi
Group=pi
[Install]
WantedBy=multi-user.target
You can stop your service by executing:
sudo systemctl stop <YOUR-NAME>.service
The same goes for restarting it via:
sudo systemctl restart <YOUR-NAME>.service
You can check if your service is running or crashed by typing:
sudo systemctl status <YOUR-NAME>.service
This will also show you the last few lines logged by your script (e.g. print statements).
You can disable autostart for your new service at any time by typing:\
sudo systemctl disable <YOUR-NAME>.service
Save with CTRL+K - Q / Help CTRL+K - H
services.msc - add in .bashrc / .zshrc
alias services.msc='systemctl list-units --type=service --state=active'
alias sudo='sudo '
alias duh='sudo du -h / 2>/dev/null | grep "[0-9\.]\+G"'
Swift 1 SF114-32
https://www.acer.com/ac/ro/RO/content/model/NX.GXUEX.005Download chromeos.tar.xz
https://github.com/sebanc/brunch#install-chromeos-on-hdd-from-chromeos
1. Install to USB
Use Etcher (https://www.balena.io/etcher/) to write the chromeos.img to the USB flash drive / SD card.
Reboot your computer and boot from the USB flash drive / SD card (refer to your computer manufacturer's online resources).
(Secure Boot only) A blue screen saying "Verfification failed: (15) Access Denied" will appear upon boot and you will have to enroll the secure boot key by selecting "OK->Enroll key from disk->EFI-SYSTEM->brunch.der->Continue". Reboot your computer and boot again from the USB flash drive / SD card.
The GRUB menu should appear, select ChromeOS and after a few minutes (the Brunch framework is building itself on the first boot), you should be greeted by ChromeOS startup screen. At this stage, your USB flash drive / SD card is incorrectly recognized as 14GB regardless of its actual capacity. To fix this:
At the ChromeOS startup screen, press CTRL+ALT+F2 to go into a shell session.
Login as root
Execute the below command:
sudo resize-data
Reboot your computer when requested and boot again from USB flash drive / SD card. You can now start using ChromeOS.
2. Install ChromeOS on HDD from ChromeOS
Boot your ChromeOS USB flash drive / SD card.
Open the ChromeOS shell (CTRL+ALT+T and enter shell at the invite)
Identify your HDD device name e.g. /dev/sdX (Be careful here as the installer will erase all data on the target drive)
Install ChromeOS to HDD:
sudo chromeos-install -dst < your HDD device. e.g. /dev/sdX >
Shutdown your computer and remove your ChromeOS USB flash drive / SD card.
Note: Even if you boot from GRUB on your HDD, if you have a ChromeOS USB flash drive / SD card inserted, the initramfs will boot from it in priority.
The GRUB menu should appear, select ChromeOS and after a few minutes (the Brunch framework is building itself on the first boot), you should be greeted by ChromeOS startup screen. You can now start using ChromeOS.
echo https://github.com`curl -L https://github.com/sebanc/brunch/releases/latest | grep ".tar.gz" | grep "releases" | grep -oP '(?<=").*("=?)' | cut -d '"' -f1`
curl https://cros-updates-serving.appspot.com/ | grep "octopus" | sed -n 's/.*href="\([^"]*\).*/\1/p'
curl -L https://github.com`curl -L https://github.com/sebanc/brunch-toolchain/releases/latest | grep ".tar.gz" | grep "releases" | cut -d '"' -f2` --output ~/Downloads/brunch.tar.gz
sudo rm -r /usr/local/*
sudo chown -R 1000:1000 /usr/local
tar zxf ~/Downloads/brunch.tar.gz -C /usr/local
source /usr/local/bin/start-toolchain
echo "source /usr/local/bin/start-toolchain" >> ~/.bashrc
sudo nano /etc/grub.d/99_brunch
brunch updated code
replace [your path to chromeos].img with
/home/[youruser]/path to chromeos
#!/usr/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "ChromeOS" --class "brunch" {
insmod part_gpt
insmod btrfs
rmmod tpm
img_part=/dev/sda3
img_path=[your path to chromeos].img
img_label=fedora_fedora
img_uuid=71e27d8a-7d3b-4b8a-bcc2-97b0e82a8f53
set root=(hd0,gpt3)
search --no-floppy --set=root --label $img_label --file $img_path
loopback loop $img_path
source (loop,12)/efi/boot/settings.cfg
if [ -z $verbose ] -o [ $verbose -eq 0 ]; then
linux (loop,7)$kernel boot=local noresume noswap loglevel=7 options=$options chromeos_bootsplash=$chromeos_bootsplash $cmdline_params \
cros_secure cros_debug loop.maxpart=16 img_label=$img_label img_part=$img_part img_path=$img_path \
console= vt.global_cursor_default=0 brunch_bootsplash=$brunch_bootsplash quiet
else
linux (loop,7)$kernel boot=local noresume noswap loglevel=7 options=$options chromeos_bootsplash=$chromeos_bootsplash $cmdline_params \
cros_secure cros_debug loop.maxpart=16 img_uuid=$img_uuid img_part=$img_part img_path=$img_path
fi
initrd (loop,7)/lib/firmware/amd-ucode.img (loop,7)/lib/firmware/intel-ucode.img (loop,7)/initramfs.img
}
menuentry "ChromeOS (settings)" --class "brunch-settings" {
insmod part_gpt
insmod btrfs
rmmod tpm
img_part=/dev/sda3
img_label=fedora_fedora
img_path=[your path to chromeos].img
search --no-floppy --set=root --label $img_label --file $img_path
loopback loop $img_path
source (loop,12)/efi/boot/settings.cfg
linux (loop,7)/kernel boot=local noresume noswap loglevel=7 options= chromeos_bootsplash= edit_brunch_config=1 \
cros_secure cros_debug loop.maxpart=16 img_part=$img_part img_label=$img_label img_path=$img_path
initrd (loop,7)/lib/firmware/amd-ucode.img (loop,7)/lib/firmware/intel-ucode.img (loop,7)/initramfs.img
}
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
you can boot in chromeos with [esc] at startup then select from grub
or with
sudo grub2-reboot 5 && systemctl reboot
from terminal
start linux container
sudo nano /etc/libvirt/qemu.conf
remember_owner = 0
getent group kvm
3rd item is guid
rightclick and stop linux
CTRL+ALT+T - to open crosh shell
vmc start termina
lxc config set penguin security.nesting true
lxc config device add penguin kvm unix-char path=/dev/kvm gid=??? from getent
exit
vmc stop termina
chrome-untrusted://terminal/html/nassh_preferences_editor.html
, set Text font family to 'MesloLGS NF'
(including the quotes) and Custom CSS (inline text) to the following:
@font-face {
font-family: "MesloLGS NF";
src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Regular.ttf");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "MesloLGS NF";
src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Bold.ttf");
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: "MesloLGS NF";
src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Italic.ttf");
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: "MesloLGS NF";
src: url("https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/MesloLGS%20NF%20Bold%20Italic.ttf");
font-weight: bold;
font-style: italic;
}
CAVEAT: If you open the normal terminal preferences these settings will be overwritten.
Run p10k configure to generate a new ~/.p10k.zsh. The old config may work incorrectly with the new font.
These files are not meant to be restore directly but here is a workaround.
Take backup of your current Enpass.
Uninstall and install again from windows store.
Create a new vault with any password.
Goto Settings->Advance Settings->Click on your data location. This data location will be having a vault.enpassdb and vault.json.
Quit Enpass and replace these two files with files you want to restore.
Restart Enpass and you should be able to login into restored vault.
Basically, when you pair your device, your Bluetooth service generates a unique set of pairing keys. First, your computer stores the Bluetooth device's MAC address and pairing key. Second, your Bluetooth device stores your computer's MAC address and the matching key. This usually works fine, but the MAC address for your Bluetooth port will be the same on both Linux and Windows (it is set on the hardware level). Thus, when you re-pair the device in Windows or Linux and it generates a new key, that key overwrites the previously stored key on the Bluetooth device. Windows overwrites the Linux key and vice versa.
Bluetooth LE Devices: These may pair differently. I haven't investigated myself, but this may help Dual Boot Bluetooth LE (low energy) device pairing
Using the instructions below, we'll first pair your Bluetooth devices with Ubuntu/Linux Mint, and then we'll pair Windows. Then we'll go back into our Linux system and copy the Windows-generated pairing key(s) into our Linux system.
Use psexec -s -i regedit.exe
from Windows (harder). You need psexec
as normal regedit doesn't have enough permissions to show this values.
cmd
, then right-click the CMD and click "Run as Administrator".)psexec -s -i regedit.exe
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BTHPORT\Parameters\Keys
.
If there is no CurrentControlSet
, try ControlSet001
. Keys\
Use chntpw
from your Linux distro (easier). Start in a terminal then:
sudo apt-get install chntpw
Mount your Windows system drive in read-write mode
sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
. Depending on how your dual boot is setup its usually the first ntfs
partition on the drive with /boot/efi
. Note the NAME
.sudo mkdir /mnt/c
sudo mount --read-only /dev/<NAME> /mnt/c
sudo umount /mnt/c
cd /[WindowsSystemDrive]/Windows/System32/config
chntpw -e SYSTEM
opens a console
Run these commands in that console:
> # If there is no ControlSet001, then try CurrentControlSet
> # on Windows 7, "services" below is lowercased.
> cd ControlSet001\Services\BTHPORT\Parameters\Keys
> ls
# shows you your Bluetooth port's MAC address
Node has 1 subkeys and 0 values
key name
<aa1122334455>
> cd aa1122334455 # cd into the folder
> ls
# lists the existing devices' MAC addresses
Node has 0 subkeys and 1 values
size type value name [value if type DWORD]
16 REG_BINARY <001f20eb4c9a>
> # Get the value of the REG_BINARY entry
> hex 001f20eb4c9a
=> :00000 XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX ...ignore..chars..
# ^ the XXs are the pairing key
Make a note of which Bluetooth device MAC address matches which pairing key. The Mint/Ubuntu one won't need the spaces in-between. Ignore the :00000
.
sudo edit /var/lib/bluetooth/[MAC address of Bluetooth]/linkkeys
- [the MAC address of Bluetooth] should be the only folder in that Bluetooth folder.
This file should look something like this:
[Bluetooth MAC] [Pairing key] [digits in pin] [0]
AA:11:22:33:44:55 XXXXXXXXxxXXxXxXXXXXXxxXXXXXxXxX 5 0
00:1D:D8:3A:33:83 XXXXXXXXxxXXxXxXXXXXXxxXXXXXxXxX 4 0
Change the Linux pairing key to the Windows one, minus the spaces.
Switch to root: sudo -i
(In old versions of Ubuntu, 'su -')
cd to your Bluetooth config location /var/lib/bluetooth/[bth port MAC addresses]
Here you'll find folders for each device you've paired with. The folder names being the Bluetooth devices' MAC addresses and contain a single file info
. In these files, you'll see the link key you need to replace with your Windows ones, like so:
[LinkKey]
Key=B99999999FFFFFFFFF999999999FFFFF
Ubuntu, Mint, Arch:
sudo systemctl restart bluetooth
Alternatively, reboot your machine into Linux.