PINE64
power button opens, but doesn't close svkbd - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: Sxmo on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=161)
+---- Thread: power button opens, but doesn't close svkbd (/showthread.php?tid=12816)



power button opens, but doesn't close svkbd - hiimtye - 01-17-2021

using the power button to pop out svkbd works, but pressing it again results in a second instance of svkbd opening. I suspect this is due to switching to svkbd-mobile-intl instead of the sxmo version, but I'm not positive. it just happens to correlate to when it was switched over.

further, the instance of svkbd that is started at boot to log in is owned by root, and requires sudo to kill it.


RE: power button opens, but doesn't close svkbd - hiimtye - 01-18-2021

so I've been working on fixing this. the command to open it in config.{def.}h is:
Code:
    {1,  0,  XF86XK_PowerOff, spawn, SHCMD("pkill -9 $KEYBOARD || $KEYBOARD") },
I've been testing manually running that in the shell and it also fails. it seems that pkill will not accept the defined variable as an input. pkill is known to not handle names as nicely as killall, so a workaround is to pass the -f variable to the pkill command, making the line:
Code:
    {1,  0,  XF86XK_PowerOff, spawn, SHCMD("pkill -9 -f $KEYBOARD || $KEYBOARD") },
this works for me, although it may not kill the first instance of the keyboard that's launched as root on the login screen.


RE: power button opens, but doesn't close svkbd - hiimtye - 02-15-2021

the root instance is closing after recent updates once again, but still no fix in the behaviour of the power button


RE: power button opens, but doesn't close svkbd - MungFuSensei - 02-22-2021

Are you in a non-busybox environment? As in, something like Arch instead of pmOS?

If so, make sure you have busybox installed, and then edit your dwm config to:

 
Code:
{1,  0,  XF86XK_PowerOff, spawn, SHCMD("busybox pkill -9 $KEYBOARD || $KEYBOARD") },

That worked for me on void. There are more than a couple such cases throughout the sxmo environment, and busybox is usually the answer.


RE: power button opens, but doesn't close svkbd - hiimtye - 02-23-2021

im using the pmos prebuilds of sxmo from the website. adding -f to pkill will fix it, just has to be done upstream


RE: power button opens, but doesn't close svkbd - hiimtye - 03-04-2021

as a workaround I added this to xinit
Code:
alias pkill="pkill -f"