Mepo - Minimalist and hackable OSM map viewer for mobile linux
#11
(03-27-2022, 03:09 PM)fdlamotte Wrote: mepo is really great ! Thanks !

love the scriptability, here is a quick and dirty one to center map on the position given by pp gps  you just have to name it mepo_something.sh and place it in your path and it will be automagically available from the main menu ;)


#!/bin/bash
DISPLAYNAME=" Relocate : gpspipe 5s"

gpspipe -w -x 5 | grep TPV | tail -n 1 | jq '"\(.lat) \(.lon)"' | sed "s/\"/center_on_coords /" | sed s/\"/\;/

Nice ! You found the undocumented but implemented and already usable feature for userscripts :D

And for centering map based on GPS we'll have something like this OOTB in mepo 0.5 - but that's an excellent hack in the meantime.
  Reply
#12
@mil - I've tried to run this in Mobian, but getting a few issues:
* Running mepo by default seems to show no map window
* Running "export SDL_VIDEODRIVER=x11" before running mepo does show the map.
* Pressing on any of the buttons at the bottom of the screens just show errors such as "Relocate" just shows a debug error "Blank search query".

Otherwise with the X11 driver I can smoothly scroll around New York!

(04-14-2022, 10:00 PM)scott_VYuCAbn3k1NFK Wrote: @mil - I've tried to run this in Mobian, but getting a few issues:
* Running mepo by default seems to show no map window
* Running "export SDL_VIDEODRIVER=x11" before running mepo does show the map.
* Pressing on any of the buttons at the bottom of the screens just show errors such as "Relocate" just shows a debug error "Blank search query".

Otherwise with the X11 driver I can smoothly scroll around New York!

Oops, was missing dependency bemenu. With that installed the menus are now working.
The wayland driver is still not working for me though.

I was able to plot a route between two places but found the following quirks:
* I have to select bike or walk, selecting car throws an error
* I have to have the map zoomed out to cover the entire route to be able to search for places

but I guess mepo is WIP so ..

It is pretty cool though, and scrolling and downloading are really smooth, so great work.
  Reply
#13
(04-14-2022, 10:00 PM)scott_VYuCAbn3k1NFK Wrote: I was able to plot a route between two places but found the following quirks:
* I have to select bike or walk, selecting car throws an error

Hi @scott_VYuCAbn3k1NFK , I ran into the same issue on my desktop PC that runs Debian. And strangely, the first options from the menus have an -e at the begining

It turns out that by default, debian uses dash as sh shell and that in dash, the "-e" option is not recognized for the "echo" command.

There are two possible workarounds : 
* change globally the link from /usr/bin/sh so that it points to bash instead of dash
* modify all the mepo_*.sh files to use bash instead of sh
  Reply
#14
(04-14-2022, 10:56 PM)fdlamott Wrote: Hi @scott_VYuCAbn3k1NFK , I ran into the same issue on my desktop PC that runs Debian. And strangely, the first options from the menus have an -e at the begining

It turns out that by default, debian uses dash as sh shell and that in dash, the "-e" option is not recognized for the "echo" command.

There are two possible workarounds : 
* change globally the link from /usr/bin/sh so that it points to bash instead of dash
* modify all the mepo_*.sh files to use bash instead of sh

Thanks for that.

I executed this in the zig-out/bin directory and it fixed all the menus.
`find -name "*.sh" -exec sed -E -i  "s\$\#\!/usr/bin/env sh\$\#\!/usr/bin/env bash\$g" {} \;`

I've also installed it on my desktop now, and I have the same issue with no window displaying under wayland, but the x11 driver SDL driver works fine.
  Reply
#15
(04-15-2022, 05:13 AM)scott_VYuCAbn3k1NFK Wrote: I've also installed it on my desktop now, and I have the same issue with no window displaying under wayland, but the x11 driver SDL driver works fine.

I think that I had the same issue on my desktop with git master branch, last week it stopped working after pulling last version and it worked when reverting to 4.1

I've just tested with SDL_VIDEODRIVER=x11 and it now works with git master. Don't know which is best, master with x11 or 4.1 with wayland Wink

On my phone I just use the version packaged for pmos Wink
  Reply
#16
(04-15-2022, 05:13 AM)scott_VYuCAbn3k1NFK Wrote: Thanks for that.

I executed this in the zig-out/bin directory and it fixed all the menus.
`find -name "*.sh" -exec sed -E -i  "s\$\#\!/usr/bin/env sh\$\#\!/usr/bin/env bash\$g" {} \;`

I've also installed it on my desktop now, and I have the same issue with no window displaying under wayland, but the x11 driver SDL driver works fine.
(04-15-2022, 05:27 AM)fdlamotte Wrote: I think that I had the same issue on my desktop with git master branch, last week it stopped working after pulling last version and it worked when reverting to 4.1

I've just tested with SDL_VIDEODRIVER=x11 and it now works with git master. Don't know which is best, master with x11 or 4.1 with wayland Wink

On my phone I just use the version packaged for pmos Wink


In regards to the issue with `echo -e` not working under dash shell; thanks for flagging this. I've updated scripts to use printf which is more portable. Also I'm now shellchecking all bundled scripts which should help with cross-platform issues for the next release and releases going forward. (Indeed using bash instead of sh would be a workaround in the meantime)

About the wayland SDL video driver not working under mobian, that's not good to hear. I've largely tested under Alpine/pmOS and have also had reports in NixOS and Arch of wayland video driver in mepo working a-ok there. So I'd be curious if you could provide any more detailed information about wayland driver not working. If you could post a log of running `mepo -e` that would be useful for debugging.
  Reply
#17
(04-15-2022, 06:42 PM)mi Wrote: In regards to the issue with `echo -e` not working under dash shell; thanks for flagging this. I've updated scripts to use printf which is more portable. Also I'm now shellchecking all bundled scripts which should help with cross-platform issues for the next release and releases going forward. (Indeed using bash instead of sh would be a workaround in the meantime)

About the wayland SDL video driver not working under mobian, that's not good to hear. I've largely tested under Alpine/pmOS and have also had reports in NixOS and Arch of wayland video driver in mepo working a-ok there. So I'd be curious if you could provide any more detailed information about wayland driver not working. If you could post a log of running `mepo -e` that would be useful for debugging.

I think I know what the issue is anyway - main.zig line 46 was changed from `mepo.sdl_event_loop()` to ` mepo.event_loop_and_read_stdin()`. Changing just that line back shows the window again.

Speculation:
The change moves a bunch of SDL code into a thread. In particular SDL_PumpEvents can only be called in the thread that initialized the video system (https://wiki.libsdl.org/SDL_PumpEvents). HTH and is somewhere near correct!
  Reply
#18
(04-15-2022, 07:21 PM)scott_VYuCAbn3k1NFK Wrote:
(04-15-2022, 06:42 PM)mi Wrote: In regards to the issue with `echo -e` not working under dash shell; thanks for flagging this. I've updated scripts to use printf which is more portable. Also I'm now shellchecking all bundled scripts which should help with cross-platform issues for the next release and releases going forward. (Indeed using bash instead of sh would be a workaround in the meantime)

About the wayland SDL video driver not working under mobian, that's not good to hear. I've largely tested under Alpine/pmOS and have also had reports in NixOS and Arch of wayland video driver in mepo working a-ok there. So I'd be curious if you could provide any more detailed information about wayland driver not working. If you could post a log of running `mepo -e` that would be useful for debugging.

I think I know what the issue is anyway - main.zig line 46 was changed from `mepo.sdl_event_loop()` to ` mepo.event_loop_and_read_stdin()`. Changing just that line back shows the window again.

Speculation:
The change moves a bunch of SDL code into a thread. In particular SDL_PumpEvents can only be called in the thread that initialized the video system (https://wiki.libsdl.org/SDL_PumpEvents). HTH and is somewhere near correct!

Ok so I was able to replicate this issue with the window not appearing & indeed the way things were setup with SDL video initialization code vs main loop code being in different threads was the root cause of this issue. This issue only affected the wayland driver. Your investigation on this is very much appreciated.

Have pushed a change in the git repository tip so this issue should be resolved (!) as now all SDL video code gets run from the same thread.

Ofcourse tagged versions (e.g. latest 0.4) will be in general more stable then bleeding edge. Regression testing happens before tagged releases but ofcourse help testing on git latest commit vs tagged versions is appreciated too. With the latest changes on git the reason for moving this stuff into a thread is that also mepo now reads from STDIN from console and can be used interactively to debug mepolang configuration/code this way.
  Reply
#19
Did you do dev work on Maemo5 apps? This name looks like an updated app I remember from my N900.
Are you considering distributing via flatpak?
  Reply
#20
(04-17-2022, 09:37 AM)biketool Wrote: Did you do dev work on Maemo5 apps?  This name looks like an updated app I remember from my N900.
Are you considering distributing via flatpak?

Ah no that must have been something different on Maemo5.

And I would surely support a flatpak for mepo - if someone would want to do the work to create the packaging currently I could help out / guide re-dependencies / build. If not I may look into it myself (depending on demand / user interest).
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Genode- Sculpt OS for the PinePhone (non Linux) Surehand53 1 1,598 11-04-2023, 07:23 PM
Last Post: tllim
  Abiword as a office mobile word processor for the Pinephone? Peter Gamma 11 4,281 10-24-2023, 08:57 AM
Last Post: Peter Gamma
  Proximity lock on Plasma Mobile alpineduck 0 1,291 08-14-2023, 05:51 PM
Last Post: alpineduck
Information Quick&dirty VPN quick setting button for Plasma Mobile Kevin Kofler 0 1,257 04-06-2023, 02:40 PM
Last Post: Kevin Kofler
  Arch Linux on PinePhone Rocky-IV 4 10,674 12-21-2022, 04:35 AM
Last Post: gregb49
  Control HBIAS through a linux OS twiclo 0 1,227 10-04-2022, 03:20 PM
Last Post: twiclo
  difference between android and linux? vanja 3 2,723 09-16-2022, 07:43 PM
Last Post: TRS-80
  meet franz! (whatsapp,telegram,etc linux client) vanja 0 1,338 09-15-2022, 01:23 AM
Last Post: vanja
  HowTo: Get a passcode from DUO Mobile working on the Pinephone kop316 2 4,329 01-16-2022, 03:46 PM
Last Post: michel_luc
Bug My experience running desktop Linux on PinePhone Subsentient 5 6,021 12-31-2021, 05:41 PM
Last Post: Subsentient

Forum Jump:


Users browsing this thread: 1 Guest(s)