From ffb175c22ebf8b5972df671e7f2a83128ddfd117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Wed, 11 Dec 2019 14:32:28 +0100 Subject: [PATCH] add surface go --- config.toml | 8 ++ content/cheatsheet/linux.md | 33 ++++- content/cheatsheet/python.md | 2 - content/page/.#todo2.md | 1 - content/page/todo.md | 3 +- content/post/2019-05-01-surface-go.md | 79 ++++++++++++ themes/balkian/layouts/_default/baseof.html | 2 +- themes/balkian/layouts/index.html | 2 +- themes/balkian/layouts/partials/latest.html | 4 +- .../layouts/partials/sidebar-entries.html | 40 +++--- themes/balkian/static/css/main.css | 117 ++++++++++++------ themes/balkian/theme.toml | 5 + 12 files changed, 225 insertions(+), 71 deletions(-) delete mode 120000 content/page/.#todo2.md create mode 100644 content/post/2019-05-01-surface-go.md diff --git a/config.toml b/config.toml index 285d209..0e8f670 100644 --- a/config.toml +++ b/config.toml @@ -154,3 +154,11 @@ copyright = "This work is licensed under a Creative Commons Attribution-ShareAli twitter_domain = "" twitter = "balkian" email = "" + +[markup] + [markup.tableOfContents] + endLevel = 3 + startLevel = 1 + +[markup.goldmark.renderer] +unsafe= true \ No newline at end of file diff --git a/content/cheatsheet/linux.md b/content/cheatsheet/linux.md index 1a83621..bb97194 100644 --- a/content/cheatsheet/linux.md +++ b/content/cheatsheet/linux.md @@ -12,7 +12,7 @@ tags: Add this to your /etc/lightdm/lightdm.conf file: -``` +```cfg [LightDM] logind-check-graphical=true ``` @@ -25,7 +25,8 @@ In addition to editing a single line (which you can also do with `C-x C-e`), it You use it like this: List previous commands -``` + +```shell $ fc -l 10259 nvim deploy.sh 10260* cd .. @@ -35,7 +36,7 @@ $ fc -l List commands with date (in zsh) -``` +```shell $ fc -ld 10260* 19:38 cd .. 10261* 19:38 nvim content/cheatsheet/linux.md @@ -45,7 +46,7 @@ $ fc -ld You can add the date too: -``` +```shell $ fc -fld 10262 1/10/2019 19:40 cd 10263 1/10/2019 19:40 fc -l @@ -54,17 +55,37 @@ $ fc -fld You can edit a range of commands -``` +```shell $ fc 10262 10264 ``` The range can be relative to the current position, so the previous command is equivalent to: -``` +```shell $ fc -3 -1 ``` If you save and exit, all commands are executed as a script, and it will be added to your history. Source: https://shapeshed.com/unix-fc/ + +# Prevent logoff from killing tmux sessions + +Lately I've noticed that logging out of i3, intentionally or when i3 fails, would also kill any tmux or emacs sessions. +This is extremely annoying. + +This is caused by a new default in logind (systemd's login) to kill user process on logoff. +You can revert this setting in your logind.conf (`/etc/systemd/logind.conf`): + +```cfg +KillUserProcesses=no +``` + +Or only for a specific process (e.g., tmux): + +```shell +systemd-run --scope --user tmux +``` + +Source: https://unix.stackexchange.com/questions/490267/prevent-logoff-from-killing-tmux-session diff --git a/content/cheatsheet/python.md b/content/cheatsheet/python.md index 7b1371f..e66deb7 100644 --- a/content/cheatsheet/python.md +++ b/content/cheatsheet/python.md @@ -17,5 +17,3 @@ From tqdm's github repository: ![TQDM in action](https://raw.githubusercontent.com/tqdm/tqdm/master/images/tqdm.gif) - -# diff --git a/content/page/.#todo2.md b/content/page/.#todo2.md deleted file mode 120000 index 56726f0..0000000 --- a/content/page/.#todo2.md +++ /dev/null @@ -1 +0,0 @@ -j@panther.18281:1546943267 \ No newline at end of file diff --git a/content/page/todo.md b/content/page/todo.md index 3f602f3..e389e31 100644 --- a/content/page/todo.md +++ b/content/page/todo.md @@ -9,7 +9,7 @@ menu: main - [x] Write my first journal paper - [x] Write my first book chapter - [x] Chair a W3C Community Group -- [ ] Collaborate in a W3C recommendation +- [x] Collaborate on a W3C recommendation - [ ] Become a doctor! ### Technical @@ -17,6 +17,7 @@ menu: main - [x] Write my first Django Application - [ ] Develop a distributed LibP2P golang application - [ ] Github repo with +100 stars +- [ ] Build a custom LineageOS image ### Languages - [x] English diff --git a/content/post/2019-05-01-surface-go.md b/content/post/2019-05-01-surface-go.md new file mode 100644 index 0000000..7ddb6e3 --- /dev/null +++ b/content/post/2019-05-01-surface-go.md @@ -0,0 +1,79 @@ +--- +title: Linux on the Microsoft Surface Go +date: 2019-06-01 00:00:01 +tags: + - linux + - surface go + - config +--- + +Believe it or not, Surface tablets have pretty good linux support, except for the webcams in newer models. +These are some useful notes to get Ubuntu installed in your surface go, as of Summer 2019. + + + + +## Installing the kernel + + +```shell +git clone --depth 1 https://github.com/jakeday/linux-surface.git ~/linux-surface +cp -a ~/linux-surface /media/ +``` + +```shell +cp -a /media//linux-surface ~/ +cd ~/linux-surface/ +sudo sh setup.sh +``` + + +## Booting ubuntu first + +Switch out of Windows S mode. + + +Boot into the "Command Prompt". + +From Windows go to "change advanced startup options" and select "restart now". + +When it reboots, choose the "Troubleshoot" option, then choose the "Advanced options" option, and finally choose the "Command Prompt" option. + +After the device reboots, login to the command prompt and then you should see a terminal with X:\windows\system32> + +At the prompt, check your UEFI entries: + +```shell +bcdedit /enum firmware +``` + +Copy UEFI entry of "Windows Boot Manager" to create a new entry for Ubuntu: bcdedit /copy {bootmgr} /d "Ubuntu" + +Copy the printed GUID number including the braces {} using Ctrl+C + +Set file path for the new Ubuntu entry. Replace {guid} with the returned GUID of the previous command (Ctrl+V). bcdedit /set {guid} path \EFI\ubuntu\grubx64.efi + +Set Ubuntu as the first/ entry in the boot sequence. Again replace {guid} with the returned GUID of the copy command. + +```shell +bcdedit /set {fwbootmgr} displayorder {guid} /addfirst +``` + +Check your UEFI entries again: bcdedit /enum firmware You should see something like this: + + +```shell + +Firmware Boot Manager +--------------------- +identifier {fwbootmgr} +displayorder {3510232e-f8eb-e811-95ce-9ecab3f9d1c4} + {bootmgr} + {2148799b-f8eb-e811-95ce-9ecab3f9d1c4} + {312e8a67-c2f6-e811-95ce-3c1ab3f9d1de} + {312e8a68-c2f6-e811-95ce-3c1ab3f9d1de} +timeout 0 +``` + +Make sure the GUID you copied is the first one listed in displayorder. Then type exit, turn off the PC and turn it back on. After this my surface go is automatically booting to the grub bootloader which lets me choose between Windows and Ubuntu but defaults to Ubuntu after ten seconds. + diff --git a/themes/balkian/layouts/_default/baseof.html b/themes/balkian/layouts/_default/baseof.html index f947099..9101b55 100644 --- a/themes/balkian/layouts/_default/baseof.html +++ b/themes/balkian/layouts/_default/baseof.html @@ -24,7 +24,7 @@