¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

More GPS Winlink Bookworm woes


 

I have found another issue with Pat winlink, and it also appears to be GPS related. When I try to search for gateways. the distance and azimuth columns are missing (see attachment) I am guessing that more variables are pointing to an incorrect config.json file.

For context, Kelly you suggested the following: "patmenu2 will not work until its re-factored for bookworm.
specifically PATCONFIG=$XDG_CONFIG_HOME/pat/config.json
is invalid giving you: Could not open file /pat/config.json: No such file or directory

you could edit the something like PATCONFIG=~/.config/pat/config.json"

I edited line 8 in the manage-pat-functions file, and Pat appeared to get the grid square - except not always as in this particular case when doing a gateway search.

Kelly, in my previous issue, you also mention: "line 47 on the pat menu file will correct the other instance here". Which might be my fix, as I haven't made this change because I looked at line 47 of the manage-pat-functions file, and it didn't make sense to me.

Here is what my manage-pat-functions file looks like in that area:

41: RCALL=$(echo $REMOVE | awk -F "|" '{print $1}')
42: RCALL1=$(echo "\"$RCALL\"")
43: #check something was selected
44: if [ -z "$RCALL" ]; then
45: yad --title="No Selection" --width=300 --height=100 \
46: --image $LOGO --window-icon=$LOGO --image-on-top \
47: --center --form --text="No station was selected\r Please try again" \
48: --button=gtk-ok
49: $MAIN &
51: exit
fi

======

Thanks in advance


-- Mike WB8ERJ

Geeze! What is he up to now?


 

patmenu2/patmenu line 47
patmenu2/manage-pat-functions line 8

you could also set a bash string into the app for $XDG_CONFIG_HOME="~/.config" which would get any others missed.

k


 

Thanks Kelly for the reply. I took your second suggestion:

"you could also set a bash string into the app for $XDG_CONFIG_HOME="~/.config" which would get any others missed."

In the patmenu file this is what I added:


export MYPATH=$HOME/patmenu2
LOGO=$MYPATH/pmlogo.png
MAIN=$MYPATH/./patmenu

XDG_CONFIG_HOME=$XDG_CONFIG_HOME=~/.config? ?<-- Just this line

Next, I set the manage-pat-functions file back to the original ( seemed like the thing to do...)?PATCONFIG=$XDG_CONFIG_HOME/pat/config.json

I started pat and yes, azimuth and distance appeared ( see attached). but when I tried to select an alias, none were shown.

-- Mike WB8ERJ

Geeze! What is he up to now?



On Fri, Feb 23, 2024 at 8:13?PM Kelly K7MHI via <kellykeeton=[email protected]> wrote:
patmenu2/patmenu line 47
patmenu2/manage-pat-functions line 8

you could also set a bash string into the app for $XDG_CONFIG_HOME="~/.config" which would get any others missed.

k


 

Is this working?
Open Pat Menu->Find Winlink Gateways->Search for gateway. Set your search criteria. Once the list is populated, highlight one of the stations and click "Add Alias"

I don¡¯t use PAT myself so I don¡¯t have anything setup with it at the moment?

k


 

Yes, with the exception that it either doesn't get saved, or the Pat client isn't picking up the aliases.

You mentioned previously that you don't use pat. In spite of that you have been a great help! I appreciate that a lot.

Perhaps someone else that uses Pat could chime in.
?
-- Mike WB8ERJ

Geeze! What is he up to now?



On Fri, Feb 23, 2024 at 10:17?PM Kelly K7MHI via <kellykeeton=[email protected]> wrote:
Is this working?
Open Pat Menu->Find Winlink Gateways->Search for gateway. Set your search criteria. Once the list is populated, highlight one of the stations and click "Add Alias"

I don¡¯t use PAT myself so I don¡¯t have anything setup with it at the moment?

k


 

haha, well check line 6 on patmenu2/FA-functions

k


 

OK finally getting back to the issue of winlink gateways not being shown in Pat when I'm in the Pat mailbox and click on Connect, then select Alias, none of my pre-selected aliases are shown.

To recap, in the previous email you suggested: "well check line 6 on patmenu2/FA-functions"

I have made what I **think** are the correct changes, but I still have the same issue.

Here is the original and the changed line 6 that you mention:


Original:
CONFIG=$XDG_CONFIG_HOME/pat/config.json

Changed to:
CONFIG=$XDG_CONFIG_HOME/.config/pat/config.json

I have attached a screenshot of my alias select list.

Thank you!!
?
-- Mike WB8ERJ

Geeze! What is he up to now?



On Sat, Feb 24, 2024 at 12:32?AM Kelly K7MHI via <kellykeeton=[email protected]> wrote:
haha, well check line 6 on patmenu2/FA-functions

k


 

fix line 6 patmenu2/FA-functions?.. CONFIG=~/.config/pat/config.json

the environment variable $XDG_CONFIG_HOME is empty in bookworm's environment its supposed to point to ~/.config using the ~ is fine in Debian's Bash it resolves to your home user folder. The hidden directory .config is inside of. its a scratch spot commonly used for configs. So if you incorrectly use CONFIG=$XDG_CONFIG_HOME/.config/pat/config.json it actually returns the value of /.config/pat/config.json which is no folder in / for .config

k


 

Thanks Kelly for the input. Since I have made several changes to various pat files, I uninstalled and re-installed it for no other reason than to make sure I didn't inadvertently?mess things up.

You mention the XDG_CONFIG_HOME variable and I googled around to educate myself a bit. It appears to be an environment variable that is initialized at login. If I understand you correctly, its not set in the pi environment so it seems to me that I should set it somewhere.?

Further googling found that it could be set in the /etc/profile?file. Is this something you would recommend??

Also, to help debugging, I started running patmenu from a terminal window. This is the output?when I run? /home/pi/patmenu2/patmenu

?/home/pi/patmenu2/patmenu
/home/pi/patmenu2/patmenu: line 27: [: =: unary operator expected
/home/pi/patmenu2/patmenu: line 45: /home/pi/patmenu2/.currentconf: No such file or directory
grep: /pat/config.json: No such file or directory

(yad:34545): Gdk-CRITICAL **: 13:50:59.167: gdk_x11_window_get_xid: assertion 'GDK_IS_X11_WINDOW (window)' failed

===========

This is a copy of my /etc/profile file:

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "$(id -u)" -eq 0 ]; then
? PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
? PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games"
fi
export PATH

if [ "${PS1-}" ]; then
? if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then
? ? # The file bash.bashrc already sets the default PS1.
? ? # PS1='\h:\w\$ '
? ? if [ -f /etc/bash.bashrc ]; then
? ? ? . /etc/bash.bashrc
? ? fi
? else
? ? if [ "$(id -u)" -eq 0 ]; then
? ? ? PS1='# '
? ? else
? ? ? PS1='$ '
? ? fi
? fi
fi

if [ -d /etc/profile.d ]; then
? for i in /etc/profile.d/*.sh; do
? ? if [ -r $i ]; then
? ? ? . $i
? ? fi
? done
? unset i
fi



On Sat, Mar 2, 2024 at 10:53?AM Kelly K7MHI via <kellykeeton=[email protected]> wrote:
fix line 6 patmenu2/FA-functions?.. CONFIG=~/.config/pat/config.json

the environment variable $XDG_CONFIG_HOME is empty in bookworm's environment its supposed to point to ~/.config using the ~ is fine in Debian's Bash it resolves to your home user folder. The hidden directory .config is inside of. its a scratch spot commonly used for configs. So if you incorrectly use CONFIG=$XDG_CONFIG_HOME/.config/pat/config.json it actually returns the value of /.config/pat/config.json which is no folder in / for .config

k


 

its an environment variable, its empty it should be replaced with the ~ character IMO so you could do any number of things, like find and replace and correct the code for more universal functionality?

or set the environment variable by placing this in the shell or profile to launch with shell

export XDG_CONFIG_HOME="$HOME/.config"

k


 

Thanks Kelly,

I was able to edit my .bashrc file and added the line you suggested. I rebooted, and did an env command with a snippet of the results below:

===========

SHELL=/bin/bash
QT_ACCESSIBILITY=1
COLORTERM=truecolor
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_MENU_PREFIX=lxde-pi-
QT_WAYLAND_DISABLE_WINDOWDECORATION=1
LANGUAGE=en_US.UTF-8
SSH_AUTH_SOCK=/tmp/ssh-XXXXXXjTA5ce/agent.983
WLR_XWAYLAND=/usr/bin/xwayland-xauth
XDG_CONFIG_HOME=/home/pi/.config

So I now have an XDG_CONFIG_HOME variable.

I ran?/home/pi/patmenu2/patmenu and got the following error:

/home/pi/patmenu2/patmenu: line 45: /home/pi/patmenu2/.currentconf: No such file or directory

This is line 45 in patmenu:
source $MYPATH/.currentconf

Seems to me that its looking for either a file or directory called .currentconf

There isn't one that I can find. My first thought was that it would be in /home/pi/patmenu2/ but there is no file or directory there with that name.

-- Mike WB8ERJ

Geeze! What is he up to now?



On Sat, Mar 2, 2024 at 2:04?PM Kelly K7MHI via <kellykeeton=[email protected]> wrote:
its an environment variable, its empty it should be replaced with the ~ character IMO so you could do any number of things, like find and replace and correct the code for more universal functionality?

or set the environment variable by placing this in the shell or profile to launch with shell

export XDG_CONFIG_HOME="$HOME/.config"

k


 

that is a bigger looking issue, there are a few branches of code did this get repaired in one of them?

try a different branch??


 

if you go into $HOME/patmenu2?

you can copy the config to .currentconf

cp config .currentconf

to get around that issue

k


 

Kelly thanks for the reply.

I did as you suggested, and I have the same result - sort of..

I thought all was well when I ran /home/pi/patmenu2/patmenu from the terminal as I got no errors, I was able to add aliases, and my grid square showed up on the main menu and elsewhere.

So I then clicked on the pat menu icon from the menu drop down, and I still had the same problem. No grid square, my aliases don't show up etc.

It's almost as if patmenu is being run from a different location when started from the Ham Radio menu as opposed to starting it in the HOME directory from a terminal window.
?
-- Mike WB8ERJ

Geeze! What is he up to now?



On Sat, Mar 2, 2024 at 6:25?PM Kelly K7MHI via <kellykeeton=[email protected]> wrote:
if you go into $HOME/patmenu2?

you can copy the config to .currentconf

cp config .currentconf

to get around that issue

k


 

set the menu-item working directory to /home/pi/patmenu2/

k


 

Kelly,

Thanks for the suggestion, but it didn't work. I also tried set the menu-item working directory to /home/pi/ and that didn't work.

I also wrote a quick script and placed it in both the home directory and in the desktop directory. It didn't work either. The only thing that works is if I am in the nome directory and give it the full path name /home/pi/patmenu2/patmenu

#!/bin/bash
cd $HOME
$HOME/patmenu2/patmenu
exit 0
?
-- Mike WB8ERJ

Geeze! What is he up to now?



On Sat, Mar 2, 2024 at 11:01?PM Kelly K7MHI via <kellykeeton=[email protected]> wrote:
set the menu-item working directory to /home/pi/patmenu2/

k


 

OK more banging my head against a wall - er troubleshooting.

I am actually making a bit of progress. Kelly, per your recommendation, I changed my shell script to the following:

#!/bin/bash
cd $HOME/patmenu2
./patmenu
exit 0

As I said previously, this is the only way for me to get Pat to work.

This seems to work - sort of.? For reference, I am (for now...) using Ardop, but I don't think it will make a difference.

When I start the Ardop modem all seems well until I "Select Alias". When I do, it selects the callsign, but not the frequency to send to flrig. If I manually type in the correct frequency in the "Freq:" dialog, then click on the "Target" (gateway callsign) it properly sends the freq to FLrig.?

Also if I click "Show RMS list" and select a gateway, it properly fills in the frequency and gateway callsign in Pat and merrily sends the frequency on to FLrig.

At least at this point I can finagle things to make it work.

Kelly, I know you don't use pat, but I thought it worthwhile to document what I have found so far.

Thanks again for your help!!

-- Mike WB8ERJ

Geeze! What is he up to now?



On Sun, Mar 3, 2024 at 10:53?PM Mike Thompson via <wb8erj=[email protected]> wrote:
Kelly,

Thanks for the suggestion, but it didn't work. I also tried set the menu-item working directory to /home/pi/ and that didn't work.

I also wrote a quick script and placed it in both the home directory and in the desktop directory. It didn't work either. The only thing that works is if I am in the nome directory and give it the full path name /home/pi/patmenu2/patmenu

#!/bin/bash
cd $HOME
$HOME/patmenu2/patmenu
exit 0
?
-- Mike WB8ERJ

Geeze! What is he up to now?



On Sat, Mar 2, 2024 at 11:01?PM Kelly K7MHI via <kellykeeton=[email protected]> wrote:
set the menu-item working directory to /home/pi/patmenu2/

k