Last active
November 12, 2019 04:40
-
-
Save equwal/c44d88e6f73ecd5fb6dc8831947f79d2 to your computer and use it in GitHub Desktop.
Mount and ask to decrypt home on login, startx from the user persective after.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Startx only if logged in on the first tty (leave other TTYs open for TTY use.) | |
| # includes custom keymaps and startx | |
| if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then | |
| human-interface | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # If you want fish instead of bash. | |
| if isatty stdin | |
| if test "/dev/tty1" = (tty) | |
| cd ~ | |
| human-interface | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| cryptsetup luksOpen /dev/sda4 home | |
| mount /dev/mapper/home /home | |
| swapon /home/swapfile | |
| # The following is just in case I logged in as root. | |
| su jose # my username (picked because it is short) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/perl | |
| use warnings; | |
| use strict; | |
| `~/bin/keymaps/desired-map`; | |
| my $pid = fork(); | |
| if ($pid == 0) {`startx`} | |
| else{`/usr/bin/monitor`} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Goes at the bottom of your bash's /etc/profile or equivalent | |
| if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then | |
| /go #Custom script which calls cryptsetup. Change it if you want to | |
| #have a passcode flash drive, etc. | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment