@ -0,0 +1,27 @@ | |||
--- | |||
title: Live What You Learn | |||
toc: false | |||
--- | |||
## Recent Posts | |||
{{< cards >}} | |||
{{< card link="/posts/mapping-of-physical-usb-ports-to-device-names/" title="Mapping of Physical USB ports to device filename on GNU/Linux" icon="arrow-circle-right" >}} | |||
{{< card link="/posts/debian-maintainer/" title="Debian Maintainer Now!! " icon="arrow-circle-right" >}} | |||
{{< card link="/posts/contributing-to-debian/" title="Contributing to Debian !!" icon="arrow-circle-right" >}} | |||
{{< /cards >}} | |||
## Explore | |||
{{< cards >}} | |||
{{< card link="about" title="About" icon="user" >}} | |||
{{< card link="docs" title="Docs" icon="book-open" >}} | |||
{{< card link="blog/" title="Blog" icon="document-text" >}} | |||
{{< card link="/captures" title="Captures" icon="camera" >}} | |||
{{< card link="index.xml/" title="RSS" icon="rss" >}} | |||
{{< /cards >}} | |||
{{< callout type="info" >}} | |||
Except where otherwise noted, content on this site is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International license.](http://creativecommons.org/licenses/by-sa/4.0/) | |||
{{< /callout >}} | |||
@ -0,0 +1,13 @@ | |||
--- | |||
title: About | |||
type: about | |||
--- | |||
![vinay](/images/vinay.png) | |||
Hello, I'm Vinay a FOSS enthusiast and a undergraduate, currently Intern'ing at [Deeproot GNU/Linux](https://deeproot.in/). | |||
I'm a Debian Maintainer,maintaining & working on ruby and golang packages of GitLab and its components on [Debian](https://debian.org). | |||
Please feel free to hit me up if you want to get in contact or want to know about me. I go by the handle vinay-keshava across the web. | |||
Email/XMPP: vinaykeshava [AT] disroot.org |
@ -0,0 +1,15 @@ | |||
--- | |||
title: Blog Post's | |||
toc: false | |||
--- | |||
{{< cards >}} | |||
{{< card link="/posts/mapping-of-physical-usb-ports-to-device-names/" title="Mapping of Physical USB ports to device filename on GNU/Linux" icon="arrow-circle-right" >}} | |||
{{< card link="/posts/debian-maintainer/" title="Debian Maintainer Now!! " icon="arrow-circle-right" >}} | |||
{{< card link="/posts/contributing-to-debian/" title="Contributing to Debian !!" icon="arrow-circle-right" >}} | |||
{{< card link="/posts/software-freedom-camp-2021/" title="Software Freedom Camp 2021" icon="arrow-circle-right" >}} | |||
{{< card link="/posts/git-fosscommunity-in-update/" title="git.fosscommunity.in Server Update" icon="arrow-circle-right" >}} | |||
{{< /cards >}} | |||
@ -0,0 +1,6 @@ | |||
--- | |||
title: Documentation | |||
next: /interception-vimproved.md | |||
--- | |||
I try to hack around a lot of stuff,but lazy to document, but trying to document 'em all |
@ -0,0 +1,127 @@ | |||
--- | |||
title: Interception Vimproved | |||
next: /docs/selfhosting/nextcloud | |||
--- | |||
### Setting up Interception Vimproved on Debian Bookworm | |||
I started learning vim few months ago and wanted to try vim key bindings like shortcuts on my laptop after trying a mechanical hackable keyboard. | |||
[Interception Vimproved](https://github.com/maricn/interception-vimproved) is a plugin for [interception-tools](https://gitlab.com/interception/linux/tools) which combines both caps2esc and space on hold work as special ```fn``` key. | |||
This blog post shows how to setup [interception-vimproved](https://github.com/maricn/interception-vimproved) using interception-tools on Debian Bookworm. | |||
#### Step 1: Dependencies | |||
Installing Dependencies to build interception-vimproved on Debian Bookworm GNU/Linux | |||
```bash | |||
$ sudo apt install interception-tools meson libyaml-cpp-dev cmake | |||
``` | |||
interception-tools is a small set of tools for input events of devices,that can be used to customize the behaviour of input keyboard mappings. | |||
The advantage of interception-tools operates at lower level compared to xmodmap by using libevdev and libudev. | |||
#### Step 2: Clone & Build | |||
Clone interception-vimproved repository and build | |||
```bash | |||
$ git clone "https://github.com/maricn/interception-vimproved" | |||
$ cd interception-vimproved | |||
$ sudo make install | |||
``` | |||
Clone the git repository and change the directory, and then launch a ```make install``` command to build. | |||
#### Step 3: Configuration | |||
Create a new file called udevmon.yaml in /etc/interception and paste the following contents into the file /etc/interception/udevmon.yaml | |||
```bash | |||
- JOB: "interception -g $DEVNODE | interception-vimproved /etc/interception-vimproved/config.yaml | uinput -d $DEVNODE" | |||
DEVICE: | |||
NAME: ".*((k|K)(eyboard|EYBOARD)).*" | |||
``` | |||
```udevmon.yaml``` is like a job specification for ```udevmon```,specifying that it matches with ```(k|K)(eyboard|EYBOARD))``` input device. | |||
{{< callout type="info" >}} | |||
I haven't tested this for an External Keyboard Input device,but works fine for the built-in keyboard of the laptop. | |||
{{< /callout >}} | |||
#### Step 4: Reload udevmon | |||
Reload udevmon using systemctl | |||
```bash | |||
$ sudo systemctl restart udevmon | |||
``` | |||
#### Hack around the config | |||
To change any keybindings or to add new mappings the config file is present in config.yaml located in /etc/interception-vimproved/ when a ```sudo make install``` is launched the config file is | |||
copied to ```/etc/interception-vimproved/config.yaml```. | |||
my config.yaml has the below shortcuts | |||
```bash{filename="/etc/interception-vimproved/config.yaml"} | |||
- intercept: KEY_CAPSLOCK | |||
ontap: KEY_ESC | |||
onhold: KEY_LEFTCTRL | |||
- intercept: KEY_ENTER | |||
# not necessary: ontap: KEY_ENTER is inferred if left empty | |||
onhold: KEY_RIGHTCTRL | |||
# this is a layer. hold space (onhold) contains several remappings | |||
- intercept: KEY_SPACE | |||
onhold: | |||
# special chars | |||
- from: KEY_E | |||
to: KEY_ESC | |||
# alternative syntax | |||
- {from: KEY_D, to: KEY_DELETE} | |||
- {from: KEY_B, to: KEY_BACKSPACE} | |||
# vim home row | |||
- {from: KEY_H, to: KEY_LEFT} | |||
- {from: KEY_J, to: KEY_DOWN} | |||
- {from: KEY_K, to: KEY_UP} | |||
- {from: KEY_L, to: KEY_RIGHT} | |||
# vim above home row | |||
- {from: KEY_Y, to: KEY_HOME} | |||
- {from: KEY_U, to: KEY_PAGEDOWN} | |||
- {from: KEY_I, to: KEY_PAGEUP} | |||
- {from: KEY_O, to: KEY_END} | |||
# number row, to F keys | |||
- {from: KEY_1, to: KEY_F1} | |||
- {from: KEY_2, to: KEY_F2} | |||
- {from: KEY_3, to: KEY_F3} | |||
- {from: KEY_4, to: KEY_F4} | |||
- {from: KEY_5, to: KEY_F5} | |||
- {from: KEY_6, to: KEY_F6} | |||
- {from: KEY_7, to: KEY_F7} | |||
- {from: KEY_8, to: KEY_F8} | |||
- {from: KEY_9, to: KEY_F9} | |||
- {from: KEY_0, to: KEY_F10} | |||
- {from: KEY_MINUS, to: KEY_F11} | |||
- {from: KEY_EQUAL, to: KEY_F12} | |||
# xf86 audio | |||
- {from: KEY_M, to: KEY_MUTE} | |||
- {from: KEY_COMMA, to: KEY_VOLUMEDOWN} | |||
- {from: KEY_DOT, to: KEY_VOLUMEUP} | |||
# mouse navigation | |||
- {from: BTN_LEFT, to: BTN_BACK} | |||
- {from: BTN_RIGHT, to: BTN_FORWARD} | |||
``` | |||
[Interception-tools](https://tracker.debian.org/pkg/interception-tools) is packaged on debian,interception-vimproved is not, | |||
that is the reason we are building the source of interception-vimproved,hopefully i'll try packaging it !. | |||
Arch has interception-tools already packaged here is the [link](https://wiki.archlinux.org/title/Interception-tools) | |||
```bash | |||
:wq #until next time | |||
``` | |||
@ -0,0 +1,9 @@ | |||
--- | |||
title: Self Hosting | |||
type: docs | |||
next: docs/selfhosting/nextcloud | |||
sidebar: | |||
open: true | |||
--- | |||
Self Hosting |
@ -0,0 +1,8 @@ | |||
--- | |||
title: NextCloud | |||
type: docs | |||
prev: docs/selfhosting/ | |||
--- | |||
Coming Soon. | |||
@ -0,0 +1,46 @@ | |||
--- | |||
title: "Contributing to Debian" | |||
date: 2022-07-30T20:01:24+05:30 | |||
weight: 10 | |||
description: "Contributing to Debian through packaging " | |||
type: post | |||
--- | |||
# Debian | |||
Debian is a GNU/Linux distribution completely inclinded towards Free Software philosophy, maintained by the community. | |||
Before talking about how i started contributing to debian, i would like to talk about the camp organized by FSCI | |||
It is an online free mentorship programme organized by [Free Software Community of India](https://fsci.in) ,introducing people | |||
to Free Software.[Ravish](https://ravish0007.github.io) introduced me to 2021 [FSCI's camp](https://camp.fsci.in), and there i | |||
got introduced to Debian Packaging through [Debian Developers](https://wiki.debian.org/DebianDeveloper) and [Debian Maintainers](https://wiki.debian.org/DebianMaintainer). | |||
During the project phase of the camp, i choosed to work on Debian Packaging and System Administration(here is my | |||
[Project Proposal](https://git.fosscommunity.in/community/camp/-/wikis/Proposals/Debian-Packaging-and-System-Administration/Vinay-Keshava)) | |||
# Debian Packages and my Story !! | |||
Debian has roughly over 51,000 packages, these packages are installable through apt, just like "sudo apt install nano". | |||
I always wanted to know how "sudo apt install nano" works !. | |||
During the project phase of the camp [Praveen](https://social.masto.host/@praveen) my mentor of the project,a [Debian Developer](https://wiki.debian.org/DebianDeveloper) himself | |||
suggested to get started by packaging node packages(dependencies of [Gitlab](https://tracker.debian.org/pkg/gitlab)). | |||
A big Thanks to praveen for teaching packaging from scratch, also answering my useless questions and also sponsoring my packages to debian. | |||
Initially i found it very difficult to understand it,but the community was so welcoming, they were helping and assisting me by clearing all my doubts through matrix. | |||
I took a lot of time to learn,tried to spend more time in learning during hectic schedule of college and also i gave up hope many times and restarted it. | |||
So initial task was to setup the [Debian Unstable environment ](https://wiki.debian.org/DebianUnstable) and rebuilding the existing simple node-pretty-ms package, and then tried a simple | |||
package update and then went to continue packaging few node modules. | |||
I currently [maintain](https://qa.debian.org/developer.php?login=vinaykeshava@disroot.org) around two node modules as of today, looking forward to maintain more packages in debian. | |||
All the communication happens mainly through mailing list or irc of respective [teams](https://wiki.debian.org/Teams). | |||
# Further Development | |||
Looking forward to contribute and hangout with the awesome debian community and learn more. | |||
``` | |||
:wq | |||
``` | |||
@ -0,0 +1,29 @@ | |||
--- | |||
title: "Debian Maintainer Now !!!!" | |||
date: 2023-03-28T20:01:24+05:30 | |||
weight: 10 | |||
description: "a debian maintainer now !!!" | |||
tags: ["gitlab", "debian", "debian-maintainer" , "ruby"] | |||
type: post | |||
--- | |||
I am excited to share with you all that I have recently become a [Debian maintainer](https://nm.debian.org/process/1173/)!! | |||
Thanks to amazing debian community. | |||
It all started with [Software Freedom Camp](https://camp.fsci.in), [ravish](https://ravish0007.github.io/) my college super senior (we were a part of college linux club) introduced me to software freedom camp organized by FSCI, since then i was a noob hopping between various distro's from kali linux to other debian based distros to arch ! | |||
I had previously written my experience of attending software freedom camp [here](https://vinay-keshava.gitlab.io/posts/softwarefreedomcamp2021snikket/). | |||
I started with packaging node modules initially without any knowledge of javascript/nodejs, before packaging new module i tried to upgrade few node packages to new upstream,it was difficult at first understanding the packaging process. [node-prosemirror-view](https://tracker.debian.org/pkg/node-prosemirror-view) was the first node module i packaged, cut to 20'23, i maintain few ruby and golang packages most of them which are gitlab dependencies, here is the [list](https://qa.debian.org/developer.php?login=vinaykeshava@disroot.org) of packages i maintain.Special thanks to [praveen](https://social.masto.host/@praveen) for his mentoring, who is my package sponsorer. | |||
Over the past six months, I have been packaging Ruby gems and GitLab dependencies. For this gitlab update, I took on the challenge of building GitLab 15.8.4 and its major components, including [Gitlay](https://salsa.debian.org/go-team/packages/gitaly/-/tree/upstream/15.8.4+dfsg1) and [GitLab-shell](https://salsa.debian.org/go-team/packages/gitlab-shell/-/tree/upstream/14.15.0). | |||
Thanks to Praveen and Bilal for their help and support during gitlab package upgrade to 15.8.4. | |||
The first package as DM uploaded was [ruby-et-orbi](https://salsa.debian.org/ruby-team/ruby-et-orbi/-/tree/debian/1.2.7-1). | |||
We are also preparing GitLab for bookworm, the next release of Debian. | |||
@ -0,0 +1,24 @@ | |||
--- | |||
title: "git.fosscommunity.in Server Update" | |||
date: 2021-12-10T20:01:24+05:30 | |||
weight: 10 | |||
description: "Updating git.fosscommunity.in" | |||
tags: ["git.fosscommunity.in", "debian", "fsci"] | |||
type: post | |||
--- | |||
Ahh, my first blog post. Good Beginnings (: | |||
Excited!! | |||
This blog post is dedicated to sharing my experience with updating the FSCI’s GitLab instance [git.fosscommunity.in](https://git.fosscommunity.in/) update.<br> | |||
[FSCI](https://fsci.in/) runs a free instance of GitLab Community Edition at [git.fosscommunity.in](https://git.fosscommunity.in) for collaborative software development.<br> | |||
FSCI also hosts and maintains a lot of services for the community, you can check out the services [here](https://fsci.in/#poddery), these services are managed by volunteers. | |||
After joining [**Software Freedom Camp 2021 Diversity Edition**](https://camp.fsci.in)( Online mentorship programme organized by Free Software Community of India(FSCI) ) as a learner and I met a bunch of people who discuss about [Free/Libre/Open Source Software](https://ravidwivedi.in/posts/free-software-explained-simply/) and educate people about why it is important to use free software in our life maintaining freedom and privacy in this era of technology. | |||
<br> | |||
Along with [Ravish](https://ravish0007.github.io) and [Sahilister](https://blog.sahilister.in) we all updated it from GitLab v14.4.2 to Gitlab v14.4.4 it was a Security update, it took a lot of my time to update and upgrade the instance. | |||
All thanks to [Ravish](https://ravish0007.github.io) and [Sahilister](https://blog.sahilister.in) for helping and teaching me. | |||
@ -0,0 +1,111 @@ | |||
--- | |||
title: "Interception Vimproved" | |||
date: 2023-09-18T11:23:17+05:30 | |||
weight: 10 | |||
description: "Setting up Interception Vimproved on Debian Bookworm GNU/Linux" | |||
tags: ["vim", "interception-tools", " gnu/linux" , "gnu","keyboard"] | |||
draft: true | |||
type: post | |||
--- | |||
## Setting up Interception Vimproved on Debian Bookworm | |||
I started learning vim few months ago and wanted to vim key bindings like shortcuts on my laptop after trying a mechanical hackable keyboard. | |||
This blog post shows how to setup interception-vimproved using interception-tools on Debian Bookworm. | |||
Step 1: Install the dependencies to build interception-vimproved on Debian Bookworm GNU/Linux | |||
``` | |||
$ sudo apt install interception-tools meson libyaml-cpp-dev cmake | |||
``` | |||
interception-tools is a small set of tools for input events of devices,that can be used to customize the behaviour of input keyboard mappings. | |||
The advantage of interception-tools operates at lower level compared to xmodmap by using libevdev and libudev. | |||
Step 2: Clone interception-vimproved repository and build | |||
``` | |||
$ git clone "https://github.com/maricn/interception-vimproved" | |||
$ cd interception-vimproved | |||
$ sudo make install | |||
``` | |||
Step 3: Create a file called udevmon.yaml in /etc/interception and paste the following contents into the file /etc/interception/udevmon.yaml | |||
``` | |||
- JOB: "interception -g $DEVNODE | interception-vimproved /etc/interception-vimproved/config.yaml | uinput -d $DEVNODE" | |||
DEVICE: | |||
NAME: ".*((k|K)(eyboard|EYBOARD)|TADA68).*" | |||
``` | |||
Step 4: Reload udevmon using systemctl | |||
``` | |||
$ sudo systemctl restart udevmon | |||
``` | |||
To change any keybindings or to add new mappings the config file is present in config.yaml located in /etc/interception-vimproved/ | |||
my config.yaml has the below shortcuts | |||
``` | |||
- intercept: KEY_CAPSLOCK | |||
ontap: KEY_ESC | |||
onhold: KEY_LEFTCTRL | |||
- intercept: KEY_ENTER | |||
# not necessary: ontap: KEY_ENTER is inferred if left empty | |||
onhold: KEY_RIGHTCTRL | |||
# this is a layer. hold space (onhold) contains several remappings | |||
- intercept: KEY_SPACE | |||
onhold: | |||
# special chars | |||
- from: KEY_E | |||
to: KEY_ESC | |||
# alternative syntax | |||
- {from: KEY_D, to: KEY_DELETE} | |||
- {from: KEY_B, to: KEY_BACKSPACE} | |||
# vim home row | |||
- {from: KEY_H, to: KEY_LEFT} | |||
- {from: KEY_J, to: KEY_DOWN} | |||
- {from: KEY_K, to: KEY_UP} | |||
- {from: KEY_L, to: KEY_RIGHT} | |||
# vim above home row | |||
- {from: KEY_Y, to: KEY_HOME} | |||
- {from: KEY_U, to: KEY_PAGEDOWN} | |||
- {from: KEY_I, to: KEY_PAGEUP} | |||
- {from: KEY_O, to: KEY_END} | |||
# number row, to F keys | |||
- {from: KEY_1, to: KEY_F1} | |||
- {from: KEY_2, to: KEY_F2} | |||
- {from: KEY_3, to: KEY_F3} | |||
- {from: KEY_4, to: KEY_F4} | |||
- {from: KEY_5, to: KEY_F5} | |||
- {from: KEY_6, to: KEY_F6} | |||
- {from: KEY_7, to: KEY_F7} | |||
- {from: KEY_8, to: KEY_F8} | |||
- {from: KEY_9, to: KEY_F9} | |||
- {from: KEY_0, to: KEY_F10} | |||
- {from: KEY_MINUS, to: KEY_F11} | |||
- {from: KEY_EQUAL, to: KEY_F12} | |||
# xf86 audio | |||
- {from: KEY_M, to: KEY_MUTE} | |||
- {from: KEY_COMMA, to: KEY_VOLUMEDOWN} | |||
- {from: KEY_DOT, to: KEY_VOLUMEUP} | |||
# mouse navigation | |||
- {from: BTN_LEFT, to: BTN_BACK} | |||
- {from: BTN_RIGHT, to: BTN_FORWARD} | |||
``` | |||
Arch has interception-tools already packaged here is the [link](https://wiki.archlinux.org/title/Interception-tools) | |||
``` | |||
:wq | |||
``` | |||
@ -0,0 +1,116 @@ | |||
--- | |||
title: "Mapping of Physical USB ports to Device Name on GNU/Linux" | |||
date: 2023-08-29T11:19:15+05:30 | |||
weight: 10 | |||
description: "Mapping of Physical USB ports to Device Names (/dev/sda) on GNU/Linux" | |||
tags: ["usb", "linux", "gnu/linux" , "gnu"] | |||
type: post | |||
--- | |||
## How to Map Physical USB ports to Device Names on GNU/Linux | |||
```bash{filename="lsusb command"} | |||
$ lsusb | |||
Bus 002 Device 004: ID 04b3:3025 IBM Corp. NetVista Full Width Keyboard | |||
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | |||
Bus 003 Device 123: ID 0951:1666 Kingston Technology DataTraveler 100 G3/G4/SE9 G2/50 | |||
Bus 003 Device 002: ID 2109:0815 VIA Labs, Inc. USB3.0 Hub | |||
$ lsusb -t | |||
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M | |||
|__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/7p, 5000M | |||
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M | |||
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M | |||
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M | |||
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M | |||
|__ Port 4: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M | |||
|__ Port 2: Dev 123, If 0, Class=Mass Storage, Driver=usb-storage, 5000M | |||
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M | |||
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M | |||
|__ Port 3: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M | |||
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M | |||
|__ Port 4: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M | |||
``` | |||
"lsusb" is a utility of "usbutils" in GNU/Linux to display information about the USB Buses and the USB's attached to the buses.The output of the command displays the VendorID:ProductID and to which bus it is attached,the "Kingston Technology DataTraveler" bearing the VendorID:ProductID (0951:1666) attached to bus 003, the lsusb command with option "-t" provides a tree like output in a hierarchial structure. | |||
"lsblk" is a tree-like structure to identify devices and their partitions,and also displays device name (/dev/sd* if its a hard disk,/dev/nvme0n1 in case of SSD),size of the drive/partition, whether it is a disk/partition and the device's mountpoints,here the /dev/sda* is the hard disk and sda1/2/5 are the partitions of the hard disk and /dev/sdb is the Kingston USB drive connected. | |||
```bash | |||
$ lsblk | |||
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS | |||
sda 8:0 0 119.2G 0 disk | |||
├─sda1 8:1 0 118.3G 0 part / | |||
├─sda2 8:2 0 1K 0 part | |||
└─sda5 8:5 0 976M 0 part [SWAP] | |||
sdb 8:16 1 28.9G 0 disk | |||
sr0 11:0 1 1024M 0 rom | |||
``` | |||
## Suppose if there are multiple USB sticks attached to mutiple physical USB ports how to know which device names is mapped to which USB port ? | |||
If there are multiple USB's attached how do we get to know USB drive's device file and to which port that USB is connected ? | |||
The answer is by /dev/disk/* | |||
Everything in GNU/Linux is either a file or a directory,so even the disk are represented as files in GNU/Linux. | |||
```bash | |||
$ ls -ltrh /dev/disk/ | |||
total 0 | |||
drwxr-xr-x 2 root root 100 Aug 28 12:28 by-partuuid | |||
drwxr-xr-x 2 root root 100 Aug 29 09:49 by-uuid | |||
drwxr-xr-x 2 root root 260 Aug 29 09:49 by-path | |||
drwxr-xr-x 2 root root 60 Aug 29 09:49 by-label | |||
drwxr-xr-x 2 root root 160 Aug 29 09:49 by-id | |||
drwxr-xr-x 2 root root 260 Aug 29 09:49 by-diskseq | |||
``` | |||
The USB disks can be identified by the Partition UUID, UUID of the disk, by path, by label of the disk and also by disk sequence. | |||
### By UUID(Universally Unique Identifier) | |||
```bash{filename="by uuid"} | |||
$ cat /etc/fstab | |||
UUID=3341b336-0c26-4079-b3aa-faca8e2dd8b6 / ext4 errors=remount-ro 0 1 | |||
UUID=53b53d97-b5e4-43fe-b560-2a01f119b6cf none swap sw 0 0 | |||
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0 | |||
$ ls -ltrh /dev/disk/by-uuid/ | |||
total 0 | |||
lrwxrwxrwx 1 root root 10 Aug 22 10:40 3341b336-0c26-4079-b3aa-faca8e2dd8b6 -> ../../sda1 | |||
lrwxrwxrwx 1 root root 10 Aug 22 10:40 53b53d97-b5e4-43fe-b560-2a01f119b6cf -> ../../sda5 | |||
lrwxrwxrwx 1 root root 9 Aug 29 09:49 2010-10-06-11-43-04-00 -> ../../sdb | |||
``` | |||
The device /dev/disk/by-uuid/3341b336-0c26-4079-b3aa-faca8e2dd8b6 is simply a symbolic link to actual an device,the reason being this is device name may change depending whether disk is attached or not,whereas these links will point to the same drive,so henceforth safer to use. | |||
### By-Label | |||
```bash{filename="by-label"} | |||
$ ls -ltrh /dev/disk/by-label/ | |||
total 0 | |||
lrwxrwxrwx 1 root root 9 Aug 29 09:49 VINAY-USB -> ../../sdb | |||
``` | |||
Labels are easy, it avoids confusion in identifying disk, instead of remembering /dev/sda device file names. | |||
### By-Path | |||
```bash{filename="by-path"} | |||
$ ls -ltrh /dev/disk/by-path/ | |||
total 0 | |||
lrwxrwxrwx 1 root root 9 Aug 22 10:40 pci-0000:00:1f.2-ata-2.0 -> ../../sda | |||
lrwxrwxrwx 1 root root 9 Aug 22 10:40 pci-0000:00:1f.2-ata-2 -> ../../sda | |||
lrwxrwxrwx 1 root root 10 Aug 22 10:40 pci-0000:00:1f.2-ata-2-part2 -> ../../sda2 | |||
lrwxrwxrwx 1 root root 10 Aug 22 10:40 pci-0000:00:1f.2-ata-2.0-part2 -> ../../sda2 | |||
lrwxrwxrwx 1 root root 10 Aug 22 10:40 pci-0000:00:1f.2-ata-2-part1 -> ../../sda1 | |||
lrwxrwxrwx 1 root root 10 Aug 22 10:40 pci-0000:00:1f.2-ata-2.0-part1 -> ../../sda1 | |||
lrwxrwxrwx 1 root root 10 Aug 22 10:40 pci-0000:00:1f.2-ata-2-part5 -> ../../sda5 | |||
lrwxrwxrwx 1 root root 10 Aug 22 10:40 pci-0000:00:1f.2-ata-2.0-part5 -> ../../sda5 | |||
lrwxrwxrwx 1 root root 9 Aug 22 10:40 pci-0000:00:1f.2-ata-3.0 -> ../../sr0 | |||
lrwxrwxrwx 1 root root 9 Aug 22 10:40 pci-0000:00:1f.2-ata-3 -> ../../sr0 | |||
lrwxrwxrwx 1 root root 9 Aug 29 09:49 pci-0000:00:14.0-usb-0:4.2:1.0-scsi-0:0:0:0 -> ../../sdb | |||
``` | |||
Here /dev/sdb is the USB device attached and "pci-0000:00:14.0-usb-0:4.2:1.0-scsi-0:0:0:0" file which represents the USB device describes that the USB device is connected from PCI bus to SCSI adapter."by-path" is the pci path of the disk device. this device file name is created depending on the shortest physical path to the device. | |||
"/dev/sda" the first SCSI drive on the first SCSI bus,/dev/sdb is the second SCSI drive and /dev/sdc is the third SCSI drive and so on. | |||
``` | |||
:wq | |||
``` | |||
@ -0,0 +1,50 @@ | |||
--- | |||
title: "Software Freedom Camp 2021 Snikket" | |||
date: 2022-03-29T20:01:24+05:30 | |||
weight: 10 | |||
description: "Learnings from software freedom camp" | |||
tags: ["git.fosscommunity.in", "debian", "fsci"] | |||
type: post | |||
--- | |||
Back to writing after a 2-month long Semester End Exam !!!!. | |||
Everyone uses messaging platforms like WhatsApp, Facebook, Signal, Telegram, and various other applications to communicate with people, in this blog post I would like to introduce to XMPP Protocol( Extensible Messaging and Presence Protocol), **XMPP** is an open, decentralized universal messaging standard for instant messaging, voice/video calls. Many Applications or Clients are built using the XMPP protocol due to its open nature. Platforms like WhatsApp, Telegram, Signal impose vendor lock-in wherein the user using the product or service cannot transit to the competitor’s product/service. To overcome vendor lock-in issues and privacy issues one of the minimal, simple best solutions is to set up a Snikket server of your own, where you can own your data. | |||
# What is Snikket | |||
[Snikket](https://snikket.org/) is a simple, customized messaging platform that is different from other messaging apps like Whatsapp, Telegram. Snikket is a decentralized messaging platform which means anyone can host their snikket server on their cloud, it allows everyone to host their server. | |||
Snikket is free software, a privacy-friendly messaging platform based on XMPP protocol, it can be self-hosted by anyone. Snikket provides an android application client to connect to any XMPP servers and using a snikket account you choose any XMPP clients if you want to connect using android applications like monocles chat, blabber, Snikket app other desktop clients recommended are dino-im and gajim. | |||
# Experience of Running Snikket Server | |||
Snikket is my first self-hosted service, before talking about the experience of running the snikket server I would like to talk about [Software Freedom camp 2021 ](https://camp.fsci.in/),the camp is organized by the Free Software Community of India. As a part of the camp initially, learners were made to understand the philosophy and intention behind free software. Later during the project phase, learners were allowed to choose certain available topics proposed by the mentor. | |||
After joining the sfcamp as a learner, I choose to learn system administration and Debian packaging, under system administration one of the deliverables was to set up a Snikket server of my own. | |||
To run any snikket server basic requirements are a domain name and a VPS (Virtual Private Server )to run your snikket server. I had signed up for the Github Student Developer pack through the pack got the free domain from name.com and I choose Amazon Web Services Free Tier as my VPS. | |||
``` | |||
Snikket is all about the | |||
DNS | |||
Docker | |||
Daemons | |||
``` | |||
Snikket also has an option of creating circles, limiting users to that circle only, although any user can talk to any individual by providing an XMPP or Snikket username. Snikket uses an invite-based procedure for account creation on the server. Only the admin can have the authority to create an invite link. Snikket also supports audio and video calls of great speed, these are some of the [features](https://snikket.org/app/features/) of the snikket application. I have been using Snikket and invited most of my friends to my Snikket server. Initially, it took time to make them understand how it is completely different from other messaging platforms. Later educated them about how decentralization, vendor lock-in works and then introduced them to Snikket and other XMPP-based clients. | |||
The learning while setting up the snikket server was got introduced to Docker Container, Domain Name System( DNS ), how server logs are checked, and debugging the errors. | |||
# Guide to Setup Snikket Server | |||
Here is the quickstart guide to setup the [snikket server ](https://snikket.org/service/quickstart/), this is the official guide by Snikket to setup the snikket server . | |||
The detailed documentation is [here](https://github.com/snikket-im/snikket-server/tree/master/docs). | |||
Snikket requires few ports to be open for communication refer [this ](https://github.com/snikket-im/snikket-server/blob/master/docs/advanced/firewall.md) which clearly mentions the firewall rules and ports required. | |||
Snikket Source code [here](https://github.com/snikket-im). | |||
Thanks to [Ravish](https://ravish0007.github.io) and [Sahil](https://blog.sahilister.in) for helping to set up the Snikket server. | |||
<h1>Next Goals</h1> - Reverse Proxy by Nginx . | |||
Bye for now . | |||
``` | |||
:wq | |||
``` | |||