I had a script that when I run as my user – it could find all commands. This was in a Fedora environment. The solution was to wrap it in shell like this [jon2allen@jons-bad-ass-fedora-server-37 python]$ cat run_news.sh #!/bin/bash source /home/jon2allen/.bashrc python3 /home/jon2allen/python/news1_test.py sourcing the .bashrc The command has several subprocess shell. before I sourced .bashrc – yt-dlp could not […]
python subprocess not finding command in cron.
Creating a new NAT network in virt-manager
I created a new network – called virbr1 <network connections=”1″> <name>virbr1</name> <uuid>a4ca0fc9-06e7-4ad6-8fad-e8b1865a6877</uuid> <forward mode=”nat”> <nat> <port start=”1024″ end=”65535″/> </nat> </forward> <bridge name=”virbr1″ stp=”on” delay=”0″/> <mac address=”52:54:00:b7:af:d0″/> <domain name=”virbr1″/> <ip address=”192.168.100.1″ netmask=”255.255.255.0″> <dhcp> <range start=”192.168.100.128″ end=”192.168.100.254″/> </dhcp> </ip> </network>allow virbr0<br />allow br0<br />allow virbr1 Note: in order to add a network with virt-manager gui one must run as root. When I connected a VM to this […]
Using copilot to create toml reader class
Still learning about these generative AI tools. My assessment is that it is a Hugh leap in Natural Language Processing. And for programming, might enable us to weave generated pieces into a coherent product faster. It will also allow program creation that might not otherwise happen. Here is a prompt that I gave Bing copilot – no thrills With the […]
Helix – no true color support for themes
I installed Helix code editor on my freebsd 14 system. When I tried to change the theme – I got “No True Color support” command is ‘:theme autumn-night’ Well, I am using putty and it has loads of color support so what gives. So, after many searches found this gem to just tell you have true-color in the $HOME/.config/helix/config.toml: theme=”edge_aura” […]
Fedora 37 server – cron email notification not working
So, you got email working. However, when cronie or crond is running you see no email. journalctl -f shows the script executing, but nothing in email. answer is check that crond has “inotify” message. If crond is started without an active mailserver MTA – it needs to be restarted. r 04 19:46:01 jons-bad-ass-fedora-server-37 CROND[3012]: (jon2allen) CMD (/home/jon2allen/every_two.sh) Apr 04 19:46:01 […]
VirtManager/KVM – Security Driver Module not available.
I had a problem with a VM image I created with Gnome boxes. It had SELinux enabled. I was able to get around it by taking out this line in the XML. You can do this in VirtManager. It was the last entry </video> <redirdev bus=”usb” type=”spicevmc”> <address type=”usb” bus=”0″ port=”3″/> </redirdev> <redirdev bus=”usb” type=”spicevmc”> <address type=”usb” bus=”0″ port=”4″/> […]
FreeBSD – repository contains packages for wrong OS version
Not sure why this happens, but I think it is a change of the upstream repository run “pkg update” since you are likely down-level – set the IGNORE_OSVERSION=yes select Y for ignore mismatch. root@freebsd12_3:/home/jon2allen/test27/weather_obs # pkg search pico pkg: repository FreeBSD contains packages for wrong OS version: FreeBSD:12:amd64 root@freebsd12_3:/home/jon2allen/test27/weather_obs # pkg -v 1.20.8 root@freebsd12_3:/home/jon2allen/test27/weather_obs # pkg update Updating FreeBSD repository […]
Bing Chat – use a class as a template prompt
Here is my now goto prompt for when I am working on a project – have a class that I need to mimic the interfaces. use the following class as a template. Call the new class “MainframeExcelText” The init take file and sheet and sets row and column location to 0. 1 function – write_text will take a row,col and […]
ChatGPT prompt for in depth language learning – Chinese/Mandarin
Here is sample of a prompt that gave results that impressed me. Prompt: can you define 漫长 in English and give possible meaning by likely occurrence in Chinese text. The term “漫长” (màncháng) in Chinese can be defined in English as “lengthy,” “protracted,” or “prolonged.” It describes something that is enduring or lasting for a long time. Here are some […]
How to display Chinese characters in Matplotlib with Windows/Jupyter
I asked ChatGPT to generate a sample list of Tang Dynasty Poets from the book of 300 poems. It gave me this – it had some duplicates and one Song Dynasty poet in it. import pandas as pd data = [ {“English Name”: “Li Bai”, “Chinese Name”: “李白”, “Dates”: “701-762”}, {“English Name”: “Du Fu”, “Chinese Name”: “杜甫”, “Dates”: “712-770”}, {“English […]