Automatically start an application during desktop startup in Linux

To auto-start a executable during desktop startup, add a .desktop file to $HOME/.config/autostart. Based on the FreeDesktop spec. # ~/.config/autostart/rescuetime.desktop [Desktop Entry] Version=1.0 Name=RescueTime Exec=rescuetime Terminal=false Type=Application

Fernando Costa Bertoldi

checkinstall: create a Linux package file (.deb, .rpm) from a Makefile

checkinstall tracks installation of local software, and produces a binary manageable with your package management software. Instead of sudo make install, you will use sudo checkinstall to install. This will automatically create a package files, which you can use to uninstall the files: sudo dpkg -r <packagename> https://help.ubuntu.com/community/CheckInstall

Fernando Costa Bertoldi

Chrome dev tools: filter for failing requests

Use negative filters (-) to filter for error status codes, i.e. -status-code:200 -status-code:201 -status-code:202 -status-code:204 https://developer.chrome.com/docs/devtools/network/reference/#filter https://stackoverflow.com/a/55777656/2634595

Fernando Costa Bertoldi

compgen: bash built-in for auto-completion

# List all commands that you could run: compgen -c # List all aliases compgen -a # Find all command with "fetch" in the name (all *fetch* variants) compgen -c | grep fetch

Fernando Costa Bertoldi

Consensus decision-making

https://en.wikipedia.org/wiki/Consensus_decision-making It is a decision-making process where participants develop and decide proposals with the goal of acceptance by at least the majority. Basic model: Collaboratively generating a proposal Identifying unsatisfied concerns Modifying the proposal to generate as much agreement as possible

Fernando Costa Bertoldi

Core dumps in Linux

https://www.baeldung.com/linux/managing-core-dumps https://wiki.archlinux.org/title/Core_dump Core dumps in systems with systemd are managed by the service systemd-coredump. This is a service that acquires the core dump, then processes it to extract metadata out of it. It then stores this information under /var/lib/systemd/coredump/. We can check if the system is configured by checking the kernel attribute kernel.core_pattern $ sysctl -n kernel.core_pattern |/lib/systemd/systemd-coredump %P %u %g %s %t 9223372036854775808 %h To remove dump file size limits in the current shells, run ulimit -c unlimited...

Fernando Costa Bertoldi

Download videos from X (Twitter)

X.com does not allow downloading videos without credentials anymore. Use the option --cookies-from-browser <browser>, which extracts cookies from the browser session. yt-dlp --cookies-from-browser firefox https://twitter.com/sovietvisuals/status/1715204231383093750

Fernando Costa Bertoldi

Expand the last argument of previous command with $_

Last monday I learned that $_ in a script expands to the last argument of the previous command

Fernando Costa Bertoldi

File Hierarchy Standard (FHS) locally as a man page

man hier, pretty much it

Fernando Costa Bertoldi

Installing .desktop files in Linux

sudo desktop-file-install <program.desktop> sudo update-desktop-database Use desktop-file-edit FILE to edit the files.

Fernando Costa Bertoldi