- Видео 48
- Просмотров 62 322
Brock Cochran
Добавлен 25 фев 2009
Here I post videos about Linux and free and open source software.
Grading Spanish compositions with Vim leader keys
Sorry I forgot to zoom in in this video!
Просмотров: 86
Видео
Dual booting Fedora and Debian (and sharing $HOME between them too)
Просмотров 15010 месяцев назад
I also discuss my SSH setup for these two.
Nextcloud Talk (F-Droid version) notifications using ntfy (ntfy.sh)
Просмотров 32111 месяцев назад
Script: brockcochran.com/1/talk-notify
Set up RAID 1 for the root partition after your OS install
Просмотров 284Год назад
Guide: brockcochran.com/1/steps-raid-1-post-install.htm
SSH Media Remote
Просмотров 163Год назад
I discuss the Bash script I use to control media via SSH from my phone to my desktop computer. I also briefly talk about my volume script. - brockcochran.com/1/rc - brockcochran.com/1/volumen
A useful pipe sequence in Bash
Просмотров 159Год назад
Correction (2:41): It is the most upvoted answer (instead of accepted answer).
Using dnsmasq on a Debian laptop for parental controls
Просмотров 163Год назад
Use dnsmasq on Debian to only allow specific websites and block all others. Notes: brockcochran.com/1/dnsmasq-for-parental-controls.txt Update: The directives in dnsmasq.conf each need to be on their own line. (The previous config shown in my video worked at the time but then stopped working.) Please see my notes linked above.
My multi-user setup on Linux with startx
Просмотров 419Год назад
Notes: brockcochran.com/1/my-multiple-user-graphical-setup.txt
Why I use PHP for my syllabi
Просмотров 114Год назад
The thumbnail is of me in 2007 in front of the Teatro Degollado in Guadalajara, Mexico.
How I use the khal command line calendar
Просмотров 656Год назад
Here I walk through the Bash script I use for adding in calendar entries and give my reasons for using a command line calendar. Bash script: brockcochran.com/1/bcal
Using dictionaries on the Linux command line
Просмотров 1952 года назад
Script: brockcochran.com/1/diccionario Thanks to @ThanassisTsiodras, here is an improved version: brockcochran.com/1/diccionario-updated
A real world example of an associative array in Bash
Просмотров 4972 года назад
A real world example of an associative array in Bash
Why I use URxvt and how I configure it
Просмотров 3,9 тыс.2 года назад
~/.Xdefaults: brockcochran.com/1/Xdefaults (19 May 2023): For the scrollback buffer fix, the 'yes' command was causing issues on version 9.30-2 (Debian Bookworm). So, I am using this instead which is better anyways: [ "$TERM" "rxvt-unicode-256color" ] && bind -x '"\C-l":"seq 2 $LINES; clear"'
Nextcloud crontab script for off-site and local backup
Просмотров 5392 года назад
At 11:44, I misspoke and meant to say 'mailutils' instead of 'sendmail.' My Nextcloud server is running on Debian Stable. Script: brockcochran.com/1/backup-script-for-posting
Stream over the LAN using PulseAudio - command line only
Просмотров 1 тыс.2 года назад
Guide: brockcochran.com/1/steps-for-streaming-with-pulseaudio.htm
Create a LUKS encrypted $HOME directory
Просмотров 3,6 тыс.2 года назад
Create a LUKS encrypted $HOME directory
Nextcloud - Switch from Snap package to manual install
Просмотров 4152 года назад
Nextcloud - Switch from Snap package to manual install
Using a clipboard manager on the Linux command line
Просмотров 1,7 тыс.2 года назад
Using a clipboard manager on the Linux command line
Automatically mounting a LUKS volume inside an eCryptfs home directory at login
Просмотров 3102 года назад
Automatically mounting a LUKS volume inside an eCryptfs home directory at login
Booting an NVMe drive on older hardware with legacy boot - Linux
Просмотров 2,7 тыс.2 года назад
Booting an NVMe drive on older hardware with legacy boot - Linux
And the fastest terminal emulator is...
Просмотров 1 тыс.3 года назад
And the fastest terminal emulator is...
Awesome Window Manager - My Workflow and rc.lua
Просмотров 9 тыс.3 года назад
Awesome Window Manager - My Workflow and rc.lua
Installing and using Debian on the Pinebook Pro
Просмотров 8983 года назад
Installing and using Debian on the Pinebook Pro
Installing OpenWRT from Debian - TFTP - TP Link Archer C7 v2
Просмотров 12 тыс.3 года назад
Installing OpenWRT from Debian - TFTP - TP Link Archer C7 v2
Pinebook Pro - NVMe with root filesystem (Armbian)
Просмотров 8703 года назад
Pinebook Pro - NVMe with root filesystem (Armbian)
Using Bash to maximize in-person attendance for hybrid classes
Просмотров 1634 года назад
Using Bash to maximize in-person attendance for hybrid classes
Using a Vim macro to edit 1,189 files
Просмотров 4874 года назад
Using a Vim macro to edit 1,189 files
My thoughts on the latest and greatest in hardware and software
Просмотров 774 года назад
My thoughts on the latest and greatest in hardware and software
Are tiling window managers just for people who want to look cool on the internet?
Просмотров 2564 года назад
Are tiling window managers just for people who want to look cool on the internet?
Did this work for you and your son? No internet yet for my kids but they love GCompris.
Yes, it has worked really nicely, just as intended. It was a bit challenging though to find all the needed domains for Minecraft, but that works fine as well.
Thank u so much. I could deploy it on my ubuntu machine.
I highly recommend you learn more about vim. For instance, you can do. 5j Instead of hitting J 5 times. Or use ctrl+d to go down a page. You can also do xset r rate 300 50 in your bashrc to change the char speed
I did not know about that xset option. Thanks. In the video, I was not really thinking at all about navigation efficiency, etc. but was just focused on making sure I clearly communicated what was in my configuration.
@BrockCochran1 NP I do the same thing lol
heres a cam command if you wanna just use ffplay. you may need to tweak it based on where your cam is located. alias cam="ffplay -input_format mjpeg -fast -fflags +nobuffer -i -framerate 30 -max_delay 100 -max_probe_packets 0 -analyzeduration 0 -flags +low_delay /dev/video0"
Nice. I did not know about that. Works really well. Thanks
if you want something a bit smaller for terminal file browser. see lf
Thanks for the suggestion.
To distinguish between computers instead of using a file, use your hostname.
Yeah. That makes good sense as well especially if the file got deleted. But, also the hostname could change.
@@BrockCochran1 how? Never had the host name change on me. I always had to set it in /etc/hostname
@@iceyrazor I only meant that as I could change my hostname and forget to update where the name may have been hard-coded.
If you like lua configs you might like wezterm
This is the feature that more terminal emulators need, the ability to copy text from the shell output using only the keyboard. wezfurlong.org/wezterm/copymode.html I am very fond of vi selection mode in urxvt. As far as I know, only Alacritty and the suckless terminal have that possibility as well. Thanks!
Thanks for help
I use the foot terminal on wayland, its rock solid
The foot terminal certainly does seem to have a whole lot of configuration options. Maybe one day I can switch to Wayland...
Nice video, helped me build a script with rofi and khal
So glad it was helpful! I hope to create a video soon on my reminder script. It is really nice to have its efficiency because I set a lot of reminders. brockcochran.com/1/b-reminder
Thank you for video! As I'm not a program developer it's not easy for me to customize AwesomeWM. I've already took the non_bank_tag function from you - thanks again. And just wandering, does anyone made use of Keygrabber class from Awesome?
Yes, it is a time investment learning sufficient Lua to modify things exactly to your liking. However, the community on Reddit has been very helpful toward me. Were you referring to this section of code? -- Create a taglist widget s.mytaglist = awful.widget.taglist { screen = s, -- There is no point in showing an empty tag. filter = awful.widget.taglist.filter.noempty, -- filter = awful.widget.taglist.filter.all, buttons = taglist_buttons, } I had never heard of the keygrabber class. I am not surprised it exists. Awesome WM has a treasure trove of functionality. I recently researched even making fake screens because my work has ultra-wide monitors.
Pretty similar to my Thinkstation P300, including also a Quadro P600, stock AVC cooler, Xeon E3-1276 v3 (I got an E3-1246 v3 by stock, I upgraded basically from 4c/4t to 4c/8t, so isn't a bad purchase), 32GB DD3 1600 ECC unbuffered, 5TB Toshiba X300, ... I think is a little big monster during how outdated/cheap is it, still decent to rockin' in.
¿Cambia el nuevo formato de archivo la sintaxis y/o los comandos? .toml
Hola, No encuentro nada en internet acerca del uso de .toml para configure Awesome WM. La única forma que sé yo sería con Lua. A mí me sirvió mucho invertir un poco de tiempo para aprender los básicos de Lua.
Quedó linda la configuración profe, gracias x compartirlo !
Excelente. ¡Qué gusto oírlo!
Awesome! Thanks for sharing.
Every now and then I used to open your channel in hope of new video. And here it is. Quite unexpected. Somehow it was buried underneath these RUclips shorts. Anyways, I am at such a point, that I made this comment even prior to watching this video.
Somee good info here. Thank you.
I appreciate it!
Nice video I am interested in implementing on which computer I am I now how to do it on rc.lua but I am missing the bash part is possible can you help me or any suggestions thanks and muchas gracias
I have four installs: - home desktop - work desktop - portable, USB-connected SSD install - laptop I have the following files in each home directory for each install: ~/.myhomecomputer ~/.myworkcomputer ~/.myssd ~/.mylaptop Then in my ~/.bashrc, ~/.xinitrc, ~/.profile, etc. I have if statements such as the following to do certain things only on certain installs. For example in my ~/.xinitrc, I run an xrandr script only at work because I use both Intel and AMD graphics there: if [ -e /home/brock/.myworkcomputer ]; then # xrandr script layout-work fi If I do a new install, I copy over my entire home directory, but I only change the one file which serves to distinguish it from the others. So, essentially, every one of my home directories has the exact same configuration and files (which all sync via Nextcloud) except for the one distinguishing file. ¡Muy buena suerte con todo!
@@BrockCochran1 muchísimas gracias por compartir su conocimiento conmigo la verdad me ayudó a solucionar algunos problemas que tenía con awesome wm, le escribo en español porque se que usted lo entiende. Sigua creando contenido la verdad son muy interesante. Saludos
I'd like to thank you for the useful video it's just what I needed. but do you mind me asking why you look so tired it's almost like you're on some kind of drug or something smh
really good video
Thank you for this video. I found it enormously helpful in getting 98% of the way there. During boot I am dropped to emergency shell with the error "mount: /boot can't find UUID=xxxx". Yet when I execute 'mount -a' from emergency shell, the /boot partition from USB mounts successfully. This tells me the UUID is correct. What might I have done wrong here?
You may need to chroot back into the system and run update-initramfs -u
Nice video. I don't believe it only has 1,300 views.
And only 20 likes.
can u do for windows please
Sorry, I do not use Windows.
I didn't know that you can setup a regular file as a Luks container. I assume that the intention is to freely resize it later without having to split the disk into fixed partitions.
Yes, you can certainly resize it (either shrink or expand it). This is also a very easy thing to test out before doing so on your actual home directory. If you want me to post steps for this, I would be glad to do so.
@@BrockCochran1 This is really smart, thank you for sharing. What about ssh? Have you tried pam_mount to work via remote logins? Either via password or authorized_keys file in the mountpoint user/.ssh folder? I just tested it and there doesn't seem to be any easy way to set it up, perhaps other than modifying pam.d configuration files (which looks complicated).
@@danielkrajnik3817 I have never tried using it over the network. Perhaps though you could just use passwordless ssh key authentication and use an sshfs command to mount it at login. The ssh key would be encrypted in LUKS. Side note, I have to "ping" my mounted drives though regularly so they do not disconnect. crontab: */10 * * * * ls $HOME/mnt/mounted-drive > /dev/null 2>&1 Another cool thing is that you can mount multiple drives / block files. For example, on one machine, I mount my LUKS home directory, and then a LUKS drive within my home directory mounts.
@@BrockCochran1 thanks, I've seen this sshfs mount method mentioned, but I don't know why not just run "sudo cryptsetup luksOpen /home/.bob bob && sudo mount /dev/mapper/bob /home/bob" on each login (and then logout and login again). That's what I'm doing now and it seems fairly fast, maybe not as convenient as pam_mount if it worked, but at least you don't have to ping them - home just stays opened until you shutdown or luksClose it.
@@BrockCochran1 Yeah, using files as LUKS containers provides you with a lot of flexibility. I think that it will come in handy on the cloud as well.
maybe use find -L <options> to follow symlinks... or with sed -i --follow-symlinks
Correction: My syntax was not correct in /etc/initramfs-tools/conf.d/resume. I have now set RESUME=none since the system will not be in suspend. manpages.debian.org/bookworm/initramfs-tools-core/initramfs.conf.5.en.html
Please see the bottom of my guide linked above in the description for what has changed since I upgraded to Debian 12.
I'm not sure what you mean by the scrollback buffer needing fixing. Do you mean that you want it cleared and it wasn't clearing it with just `clear`? Because if so I had the exact same issue with konsole and I aliased cls as "clear; printf '\e[3J'" and it fixed that problem for me. The one issue I still have with konsole that no other terminal emulator seems to have is when I'm scrolling down from some ways up I'll see a tiny block of error in the upper left corner that won't disappear until either I alt-tab to a different window or scroll up, even just one line. Weirdly, that bug has persisted for me on multiple versions and for years on even different distros.
If command output fills at least the entire screen and then I do `clear` or ctrl+l, then I can still scroll up and see the command output. However, if the command output only takes up part of the screen and then I do `clear` or ctrl+l and later scroll up, the command output is gone. So, what I talked about in the video fixes that issue. I wonder if that Konsole bug has been reported.
@@BrockCochran1 And you want the command output to be persistent so you can scroll up and read the history, even after clearing the screen? That just sounds weird to me, but to each their own, I guess.
@@anon_y_mousse If I clear the screen, then it gives me a clean slate to look at when typing the next command. However, I still might want to see previous output later. To remove scrollback output, I would use the `reset` command.
@@BrockCochran1 One final thought, to print the number of blank lines you need to push the current screen of text up, is it more efficient to call `yes` and `head` versus using a for loop and the built-in echo? Also, should you not subtract 2 since you're accounting for your prompt with the -1 but you're not accounting for the enter key being pressed to initiate the command? I use a two line prompt, partly because it can get lengthy and go back and forth and I'd rather have my focus always right where I need it, and when I was testing out your solution I found I needed to account for each newline or I'd have extra lines in the scrollback. cl() { for (( i=0; i<LINES-3; i++ )); do echo; done; print '\e[H\e[3J'; }
@@anon_y_mousse If I subtract two, it removes the last line of my output. I actually changed this since making the video because the `yes` command was causing issues after I upgraded to Debian 12. I use the `seq` command instead and posted what I use in the video description.
You still using urxvt , what's your thoughts on Terminator.
I used Terminator a lot a few years ago. It has some great features such as split screen and "Broadcast all" (which I have never used personally). However, I like how lightweight URxvt is and that is has a daemon option with clients or a new instance option with a different PID. The key feature for me is vi selection mode to copy to the clipboard. I really do not like having to go to the mouse to copy text when in a terminal. Enjoy the journey.
@@BrockCochran1 sadly the legend is no more with the community. Does it require config modification to get that vi selection feature.
@@muudus_tv Yes, I was sad to hear of the passing of Bram Moolenaar. It is a Perl script called keyboard-select, and details on enabling it are here: github.com/xyb3rt/urxvt-perls
pretty cool stuff. I wonder if I can run a similar script for macOS
My friend, Kris Occhipinti, mentioned to me a nice alternative to using xdotool with mpv: pastebin.com/XpyMdALj
Cool
Only issue I see is that if the value has a space in it, this might fail. So I would change it so something like: cat books |sed 's/value=/ value=/g'|grep value|cut -d\" -f2|tr ' ' ' '
I like this option. When I used the data, I checked it by piping into wc -w to make sure it resulted in 66. Thanks
It's interesting seeing others' perspectives on these things. I've been thinking about using dwm or some similar WM, but there's a lot of functionality that I use with KDE that just isn't there, at least by default, in a WM and I'd have to implement a lot myself.
With a WM, get ready to get down into the nuts and bolts. If you have the time, interest and know how it will be beneficial over your current setup, then go for it. I only went for Awesome WM over Xfce because I knew fairly certainly ahead of time how it would specifically benefit my workflow. It was fun though figuring out all of that stuff in Lua.
@@BrockCochran1 How specifically did it benefit your workflow? Do you use it with a job, and if so what job, or just at home?
@@anon_y_mousse There are three main things that come to mind. One, Awesome WM has tags which is basically like workspaces but on a per-screen basis. Using one workspace at a time for all three monitors never worked for me. Therefore, when I used Xfce, it felt like my desktop was cluttered and disorganized. Two, it allows me to spend more time on the keyboard for better efficiency and ergonomics. Three, having the extremely high level of customization is very nice. (I tend to be particular with how I want things to be on my desktop.) I sync all of my config files via Nextcloud. So, my desktop setup is cloned on my work PC, home PC, laptop, and my bootable SSD. (I have if statements to adjust for each install.) I teach Spanish and manage the language lab (computer lab) for my department.
@@BrockCochran1 I hear that complaint a lot about multi-monitor setups. I only have one and just shift things to various desktops as needed. Generally I'll split the screen left/right or top/bottom when editing code and use multiple tabs for files and have documentation on adjacent desktops. Maybe I'm just old, but I find it easier to concentrate on what I'm doing if I only use one monitor.
@@anon_y_mousse The key thing is having enough pixels to be able to do split screen.
The directives in dnsmasq.conf each need to be on their own line. (The previous config shown in my video worked at the time but then stopped working.) Please see my notes linked in the video description.
you should have more subscriber. Your explications are pretty clear. Thank you.
Sorry if I may have missed. my question is that you have different desktop environments running but don't you get the issue of applications from different desktop environments mixing in? I mean certain applications from cinnamon might not respect the theme and looks of awesome wm and vice-versa? If yes then do you cope with that?
The theme of each graphical environment is configured (or can be) in each user's home directory. For example, in Awesome, I use Thunar (Xfce) and Eye of Mate (from Mate desktop which isn't even installed), and these all follow my user's theme. As a general rule, the user configuration overrides the equivalent system configuration. So, ~/.local/share/themes/Arc-Dark takes precedent over /usr/share/themes/Arc-Dark. None of us has had any theming issues. Every GUI application I use is consistent with my theme just how I want it. :)
Thanks
Ok I'm dumping systemd-homed. Thanks!
This is why no language is "useless" or not worth learning. just a little knowledge can have so many uses.
hi sir...can u give me archer c7 v2 router full backup file pls....because my router is breaked...so i can't find ,pls can u provide backup bin file pls😢
The OpenWRT firmware and a link to the stock firmware can be found here, openwrt.org/toh/hwdata/tp-link/tp-link_archer_c7_ac1750_v2.0. Best of luck with it.
@@BrockCochran1 i tryed but its not working sir,after flashing only power led working 🥲 so I am trying with the ch341a programmer... so a full backup bin of the router is required to program the flash ic again...
@@ravindurangana7745 On Luci, where you go to backup/upgrade, you can select to "Save mtdblock contents" with the options of u-boot, firmware, kernel, rootfs, rootfs_data, or art. Which do you need?
@@ravindurangana7745 Here is the latest OpenWRT for the Archer C7 v2 (system defaults). Be sure to see the readme.txt. brockcochran.com/misc/openwrt-22.03.3-ath79-generic-tplink_archer-c7-v2/
@@BrockCochran1 thank u sir...now i am going to try,❤️
I tried awesome 3 years ago, and wanted to use it on 3 monitors. But i couldn't find a solution how to fit it to my workflow. It seems you have a similar workflow. I think i will try awesome again, as i am not fully satisfied with my current setup.
Nice. I invested a lot of time in this initially. Now it is just a blast and makes my all-day computing experience so very nice. Recently, I have started customizing some naughty.notify scripts for teaching purposes. It is a lot of fun all along to do whatever you want in the Lua. The Awesome Reddit community has been great as well. They have helped me on a few occasions when problems are over my head. I just posted an updated rc.lua above if of benefit. Feel free to send me an email too if questions come up. It is listed on my website. Good luck with it and enjoy!
@@BrockCochran1 I just realized that you answered on a my post on reddit how to have a good multi monitor workflow. I am happy you kept your word, this really helps me!
@@HR-ve7mc Yes, being a man of my word is very important to me. So glad it was helpful.
Thanks for sharing. I don't know the answer, but I also wonder what the "F" is for. I'm going to guess "Field".
That was my guess before looking and I just checked the man page. -F fs --field-separator fs Use fs for the input field separator (the value of the FS predefined variable).
@@DigitalMetal Thanks. I would have opened the man page in the video but did not take the time to do so.
Hi Brock. Nice way to strip the info and condense it to exactly what you need! My only suggestion: instead of using grep twice to find the lines you want, you can instead do a single pass with awk. Something along these lines: awk 'if (/Consultar/) { inside=1;} else if (/Academia/) { inside=0;} else { if(inside) { print; }}'. Try using this as a base and you'll see your script will run much faster - because awk will do a single pass over the lines. Once you get to that point, just pipe the output of w3m to awk - and you'll be able to do everything in one step.
I would be interested to see reference documentation on this functionality with awk. I have seen echo "$page" | awk '/StartPattern/,/EndPattern/' but not what you mention above. The issue with what I found is that it prints the start and end patterns as well. As always, I appreciate your comments.
@@BrockCochran1 Perhaps an example is best. Assume you have a list of 5 lines, and you want to start printing AFTER you find line containing 1, and stop printing when you find line 4 (NOT including 4). I think this matches what you wanted to do in your video - so here's a way: echo -e "1 2 3 4 5 " | awk '{ if (/1/) { inside=1; } else if (/4/) {inside=0;} else if (inside) {print;}}' This will only show lines 2 and 3 - not the delimiting lines (1 and 4) and not 5. I believe this matches your requirements - replace "1" with "Consultar" and "4" with "Academia" and you have the functionality you demo-ed in your video. As for documentation, the "if (/regex/)" syntax is documented in the manpage - it means "search the current line for this regex". Hope this helps!
@@ThanassisTsiodras What an improvement! Here is my updated script, brockcochran.com/1/diccionario-updated. On the original post, the opening curly brace had been left out, and I did not catch it. I look forwarding to digging into this further and learning awk better. I appreciate it! :)
I don't think urxvt can show glyphs in nerd fonts. That's why I'm not using it.
I guess I am so TUI oriented that the thought of glyphs has never occurred to me. I could see it being beneficial both functionally and aesthetically. Someone here claims to have gotten it working in urxvt, unix.stackexchange.com/questions/643488/urxvt-doesnt-show-glyphs-on-arch-linux-new-install.
@@BrockCochran1 thanks. I couldn't find any solutions for this earlier. Maybe will give it a try again
Hello, thanks for sharing. I would be grateful if you could also share a readable pars method of the Nextcloud audit log information.
This seemed to make it easier to read for me. cat nextcloud.log | tr '{' ' ' | tr -d '}' | tr ',' '\t' | tr -d '"' | sed 's/\\/ /g;s/^$/------------------------------/' | fmt | less or perhaps while :; do tail nextcloud.log | tr '{' ' ' | tr -d '}' | tr ',' '\t' | tr -d '"' | sed 's/\\/ /g;s/^$/------------------------------/' | fmt; sleep 4; clear; done I used the while loop because tail -f did not work with multiple levels of piping.
Thanks for sharing.
I appreciate your support of the channel.
Brock have you ever looked at nimdow WM ? you may like a play
It looks like it has tags as well and provides a high level of customization. I wonder how it compares with Awesome WM in customization.
Thanks for documenting everything! Just one comment - you go through disabling the launch of PA so you can launch manually with "-D".... But isn't that equivalent to just changing "no" to "yes" in the --daemonize option of the configuration file? If so, this will simplify your process a bit.
Good to hear from you, Thanassis. If I were to change the /usr/lib/systemd/user/pulseaudio.service file to say, --daemonize=yes, then PulseAudio would not work for the graphical user on my system. I therefore opted to exclude my user from that command, and I start pulseaudio -D from my ~/.profile instead.
@@BrockCochran1 understood! Thx.
I knew PulseAudio could do this but I never looked into how to do it, Thanks for sharing.
It was a lot of fun putting it together. I also appreciate that you helped me to catch that I had not capitalized the 'a' in PulseAudio.
Nice, I can relate so much to first moments of the video. I don't use clipboards that much, but I also sometimes have to reopen programs etc. I think I'm going to use that script and create a dmenu version of it!