Posts

WordRefAnkiNoteCreate - a python command line utility to automate Anki Note creation

Image
GitHub Repo for WordRefAnkiNoteCreate: https://github.com/jglotzer/WordRefAnkiNoteCreate As a committed user of both Anki  as well as wordreference.com  I've always wanted to have an easy way to create new Anki Cards. Creating Anki Cards (or more accurately, Anki Notes, as a Note consists of two sides while a Card is only one side.) can be a laborious, manual process, depending on how complicated or aesthetic you want the card to be. Most of the information one might want can be found at  wordreference.com , it's just not organized and/or formatted in a way that makes sense for the way I happen to use Anki. This is because, quite commonly, words have multiple meanings and I want each meaning to be listed once on each side of the created Note. Also, having appealing fonts and colors is a plus. Anything you can do to make the information "stick" in your brain is going to be helpful with this sort of memorization. Here's an example of what the  wordreference.com  s...

Wake on LAN settings Screws up Wifi - Disable your "Wake on" Features

Long story short - have a windoze PC for Zwift (gaming) and the WiFi got progressively worse - went from intermittently working to never working. Sometimes the windoze dialogs would show the wifi adapter as disabled, other times not disabled but the network center would say "no internet" access.  Really no reason at all to suspect the wifi signal (all other devices in house work) or really the PC hardware.  Solution is to disable the  Wake on LAN feature in the wireless adapter but especially Wake on Magic Packet Wake on Pattern   (Can look here to see what these settings look like).  When I clicked disable on the last two I could see the internet spring to life in real time.  Interestingly, many, many years ago I wrote a blog post on Wake on LAN (this was for wired not wireless) that was also a problem. My take is if you see "Wake on ..." when it comes to Networking - be afraid, be very afraid. It's maybe useful in some specific use cases but for "normal...

Linux/Airpods Pro Headset mode not working of Fedora38 - Don't forget about Bluetooth adapter firmware! Also fix helvum breakage.

After getting a pair of Airpods Pro and connecting them to Fedora 38 computer I found that I could use them as "headphones" but not as a "handset". Pairing was easy using the utility bluetoothctl - put the airpods in pairing mode, run bluetoothctl and then issue the "pair" command giving the proper hex string e.g. as in  https://meroupatate.github.io/posts/airpods/ . Once this is done, the "headphone" device as well as the "handsfree" device shows up in the Sound section of "Settings" and can be selected but the this doesn't result in the airpods being able to do anything useful in handsfree mode. In theory, the problem could be in the Linux Software Sound stack (some combination of  Pipewire, Pulse Audio, Alsa),  or with the various codecs installed on the system.  Most of the resources on the internet focus here. Since I'm on Fedora 38 Pipewire is well established. One other wrinkle about this is that somewhere in ...

Zwift - Power Stuck in Workout Mode

I've been using Zwift for years now. The one problem that I've been plagued with and have up until now failed to find a soution for is this - When in Erg Mode aka Workout Mode, very often the power setting gets "stuck". This means that despite the Zwift platform raising the power setting as the workout progresses the trainer remains stuck on some particular power setting. When this happens the whole point of Erg Mode is completely defeated. I've faced this situation literally dozens of times and like all "first world problems" it can be very annoying! Online forums suggest that you toggle Erg Mode when this happens either by stopping/resuming pedaling or by using the companion app on your phone. Other more extreme measures include disconnecting the trainer from power and plugging it back in or worst case just starting the workout completely over. Recently I've hit upon a theory and a fix that seem to be holding up. Time will tell if this is indeed th...

Android (Pixel II) - Can no longer swipe right to get to news feed.

Settings Apps & Notifications See All Apps Pixel Launcher Advanced Additional Settings in the App Display Google app (To the left of the main Home Screen)

Infinality breaks Fedora 25 to 26 upgrade

Very much like a previous blog post . In that case the bootchart package borked the F21 to F22 upgrade. Here to make a long story short in going from F25 to F26 this time it was infinality. How did I figure it out? Most of the init sequence would execute but couldn't get to gdm so startup only got so far. Booted into single user mode and then did     init 4 Did a dnf distro-sync but that didn't help. But when I looked in /var/log/messages I saw the error message regarding libharfbuzz mentioned here . /usr/lib/libharfbuzz.so.0: undefined reference to 'FT_Get_Var_Blend_Coordinates' That link mentioned infinality.  dnf remove infinality-repo dnf remove freetype-infinality  did the trick. Then I could do     init 5 So infinality seemed to break F25 to F26 upgrade.

USB drive in dmesg, lsusb, but not in lsblk

This was puzzling me for awhile. Found the answer on the arch linux wiki which is to do a reboot. Apparently if there is skew between the latest kernel and the running kernel, things won't work. After a reboot it moutned find using MTD stuff.

Fedora 23 Calendar PopDown in DarkGlass Gnome Shell Theme is cut off

In Gnome Shell 3 (3.18 actually) if I chose DarkGlass as my Shell theme and I clicked on the date at the top the calendar that "pops down" would be cut off at the right side. Actually it was there but the background color was missing. The fix is to find either the file /usr/share/themes/Dark-Glass/gnome-shell/gnome-shell.css or ~/.themes/Dark-Glass/gnome-shell/gnome-shell.css and change width: to min-width like so: /* Calendar popup */                                                                                                                                                           ...

Synergy - Avoid stuck modifier keys when undocking and redocking a laptop

Synergy  is a very useful piece of software that allows two (or I suppose more) computers to share a keyboard and a mouse. One computer is configured as a server, one as a client, and the client computer can be then controlled with the server computer's input devices. In my typical setup at work I have two Ubuntu computers (although I'm a Fedora user at home) - a desktop and a laptop with a dock. The desktop is configured as the server and the client is the laptop. Everything basically would work until such time as I undocked and redocked the laptop . Without thinking too much about what I was doing or why - when it came time to go to a meeting I would simply undock the laptop and go. Usually undocking wasn't too much of an issue but when I returned to my desk on redocking the laptop it would sometimes (but not always) behave incorrectly. The laptop would act as if some modifier key were permanently pressed. And up-arrow press might show "3A" on the termi...

Protect Google Chrome against Logjam Vulnerability

Image
Determine if you're vulnerable to the Logjam Attack - go to  https://weakdh.org/  with your chrome browser and see if you get a blue bar (good) or a red one (bad). When I tried this Firefox was OK, Google Chrome was not. I fixed this by editing /usr/bin/google-chrome and adding the --cipher-suite-blacklist parameter. # Make sure that the profile directory specified in the environment, if any, # overrides the default. if [[ -n "$CHROME_USER_DATA_DIR" ]]; then   # Note: exec -a below is a bashism.   exec -a "$0" "$HERE/chrome"  --user-data-dir="$CHROME_USER_DATA_DIR"  --cipher-suite-blacklist=0xcc15,0x009e,0x0039,0x0033 "$@" else   exec -a "$0" "$HERE/chrome" --cipher-suite-blacklist=0xcc15,0x009e,0x0039,0x0033 "$@" fi as shown above. https://cc.dcsec.uni-hannover.de/  will tell you which ciphers your browser currently supports.

OBI drops outbound calls - setup sysloging to help figure it out

My OBI-100 drops outbound calls usually right at 16 minutes. First thing I noticed there was some stale config on the OBI device. When I thought Google Voice (free) was going away I paid for another VOIP provider. Today I noticed there was some stale config related to the old VOIP provider related to keepalive server config. I restored all of that to default. So hopefully that will fix the problem. But then I wanted to setup syslog for my obi device and also to direct those logs to their own file. On Linux host which is on same LAN open up /etc/rsyslog.conf and uncomment the below lines: # Provides UDP syslog reception # $ModLoad imudp # $UDPServerRun 514 # Provides TCP syslog reception # $ModLoad imtcp # $InputTCPServerRun 514 (i.e. remove the hashes in red ).   2. In /etc/ryslog.conf add the following lines just before the indicated lines (assuming that OBI is at 192.168.1.2). Notice that the & ~ line will discard the message so it won't also end...

Fedora 22 upgrade - Kernel Panic - not syncing: VFS Unable to mount root FS on unknown-block(0 0)

Image
After upgrading from Fedora 21 to Fedora 22 I experienced a kernel panic on booting into the new, 4.0.2 kernel with the message given in the title "VFS Unable to mount root FS on unknown-block(0,0)". Long story short - looking into /boot there was the vmlinuz kernel, vmlinuz-4.0.2-300.fc22.x86_64 , but no corresponding initramfs-4.0.2-300.fc22.x86_64.img file. Also in the grub.cfg stanza there was a missing reference to the .img file i.e.    initrd16 /initramfs-4.0.2-300.fc22.x86_64.img was missing. Again, in the interest of brevity, I ran dracut manually on the 4.0.2 kernel and it errored - complaining about "no module bootchart found". (Bootchart is a package I had installed previously that attempts to measure or profile time spent during booting - I'm assuming that F22 dracut does not have the needed support.) Fortunately Dracut has an option to ignore arbitrary modules e.g. bootchart with the parameter -o. So the fix was ultimately to do somet...

Outlook email search returns no results

Indexing borked so you get no results when you type in the search box. What I found to do: Search | Search Tools | Search Options | Indexing Options Remove the "Outlook" file and then replace it which forces the index to rebuild. Elsewhere there is an option to "rebuild the index" but it doesn't seem to have any effect. The above procedure will cause the index to rebuild. While it is rebuilding you can see its status and as it rebuilds a search will start returning more and more results.

OBI 100 - Outbound 400 errors - Content Length Mismatch - Culprit is SIP ALG on Netgear Router

Image
I couldn't make outgoing calls with my OBI 100. On the phone you'd hear the high pitched three tones that signify an error and hear something like " The number you dialed, was rejected by the service provider, error 4 0 0".  Incoming calls worked OK.  A test call to  **9 222 222 222 which is the OBI echo service worked fine. A check of the call history at the OBI device web interface at 192.168.1.x shows the outgoing call log as shown below. The 400 error was more specifically a Content Length Mismatch which is a mismatch between the content as given by the SIP header and that given by the UDP header. Examples of the Content Length Mismatch in the OBI call log are shown below. This onion had three layers to peel back. The layers were: First I saw that resetting my Netgear router would temporarily allow outgoing calls to go through. It was a start, but the next time I would go to use the phone the errors would return and I would then have to reset the router...

Install Pipelight on Fedora 21

IMPORTANT - Pipelight works as a Firefox plugin but doesn't work for Chrome. So we're going to be basing this on Firefox only. Some Helpful Links - but there's a caveat - stay away from the DarkPlayer Pipelight Repo - it will cause you to descend into dependency hell! http://pipelight.net/cms/install/installation-fedora.html http://pipelight.net/cms/installation.html https://ask.fedoraproject.org/en/question/62171/fedora-21-pipelight-pipelight-selinux-error/ If you were to install the DarkPlayer Pipelight yum repo for fedora 21 i.e. sudo wget http://download.opensuse.org/repositories/home:/DarkPlayer:/Pipelight/Fedora_21/home:DarkPlayer:Pipelight.repo -O /etc/yum.repos.d/pipelight.repo that looks like it should work but it didn't for me. Some of the above links advise to do this but if you go that route you will end up in dependency hell, something like --> Processing Conflict: wine-1.7.36-2.1.x86_64 conflicts wine-wow(x86-32) = 1.7.36-2.1 --> Finished...

Samsung BD-P1600 Blu Ray player doesn't play nicely with Netflix Personal Queues ("My List")

The Samsung BD-P1600 Blu Ray player streams Netflix albeit with one restriction - you either need a direct  (wired) Ethernet connection or if you want to use WiFi you need a Samsung Wifi "dongle". But OK - this player is about 3 or 4 years old and it used to work great with Netflix. You added a movie to your Netflix "Instant Queue" then you could browse your "Instant Queue" (on the device) and watch your movie. So ...  Life was Good. Flash forward to about 2 years ago - Netflix changed the "Instant Queue" that was globally associated with a single account, to the idea of "My List" such that each Netflix user had their "own" queue. So given a single Netflix account and 3 users e.g. "Moe", "Larry", and "Curly". Moe would have his own list, Larry his own etc. Now when Moe wants to add a movie to a queue it doesn't go to the global "Instant Queue" associated with the account it goe...

Fedora 21 Nautilus missing "Restore Missing Files..." context menu (Deja Dup Integration)

sudo yum install deja-dup-nautilus log out/log back in

Hit failing alternator with a hammer to confirm diagnosis of failing alternator due to bad brushes

Hitting something with a hammer often feels good but does nothing useful. Here's one case where it actually helps. On my 2004 Ford Explorer the alternator light came on. I brought it to the auto parts store and they put a volt meter on it. The alternator needs to put out a voltage that is higher than the battery's full charged voltage in order to properly function - somewhere in the 14 volt range. Mine came in low - probably below 13.5 volts. So the guy at the auto parts store took a rubber mallet to the alternator and just briefly, for a period of 10 seconds or maybe less the voltage jumped up into the normal range before falling back to where it was before. This confirmed the diagnosis of a bad alternator in general and worn brushes in particular. The brushes are spring loaded, are located in the are a wearable item and must make contact with the fixed part of the alternator. Tapping the alternator with the hammer temporarily changes spatial relationships between the brushes ...

3ware 3dm2 web interface (linux) - use Konqueror to get around Firefox and Chrome "connection reset" error.

The web interface for 3ware's RAID controller, 3dm2 uses a self signed certificate when you connect via https://localhost:888.  Firefox and Chrome will not accept such a certificate (even if you configure a "security exception), so you cannot administer your RAID controller via the web interface.  All you get is a "connection reset" screen. (tw_cli and BIOS utility still work, however). Someone on the web suggested using the Konqueror browser and sure enough this worked. You still need to create a security exception in Konqueror, but once that is done you can get back to your 3dm2 web interface.

Fedora 19: Swap left and right pulseaudio channels

Why would anyone want to swap left and right pulseaudio channels? After some web searching I found that I am hardly alone. The classic problem is that your computer is on one side or the other, the audio-in cable goes to one speaker or the other, and the audio cable is too short. But this is linux, after all, so most things if not all things are possible, right? The first fix I came across was simple enough except sadly it didn't work. This called for editing /etc/pulse/deamon.conf and uncommenting the lines ; default-sample-channels = 2 ; default-channel-map = front-left,front-right to appear as default-sample-channels = 2 default-channel-map = front-right,front-left and then restarting pulseaudio with pulseaudio -k Seemed very clean and elegant except that it didn't work. :( The next answer from  here  and this worked great. The steps (reproduced here) are: cat /proc/asound/cards and use the name string for the device you wish to use (the one in squ...