Launched apps through i3blocks in a auto-hide enabled i3bar are not responding to mouse/keyboard - i3

I'm using (Linux) i3 window manager and in my settings I hold down the mod key to see my auto-hide enabled i3bar and then I click on an i3block to launch an app, then when I release the mod and i3bar is back to hidden state, the launched app isn't responding to mouse/keyboard anymore, the launched app responds to mouse/keyboard while I'm holding down the mod key and making the i3bar visible though.
I've tried launching the apps using nohup, disown, & and none of them made the process responsive to mouse/keyboard.
My settings could be found here:
i3blocks.conf: https://github.com/Faham/personal-linux-config/blob/master/.i3blocks.conf
i3.config: https://github.com/Faham/personal-linux-config/blob/master/.i3/config

Related

How does a developer reset CLLocationManager authorization status for Mac Catalyst apps?

I would like to reset Location Permissions during development of a Mac Catalyst app.
When working on iOS simulators, one only need "reset simulator."
On an iOS device, it's possible to "Reset Location & Priacy" from the Settings app.
I've looked in the Security & Privacy pane of System Preferences on macOS 10.15.7, but my app doesn't show there.
I've also used tccutil to try and reset - tccutil reset ALL my.bundle.id. This presents a success message "Successfully reset All approval status for my.bundle.id," but subsequent launches of the Mac Catalyst app have CLLocationManager with an .approved status.
The only solution I've found is to create a new User on the computer. I've put the .app in the Shared folder so that it can quickly be started from the other session.

Stop/Kill a running Azure Function

I noticed I have multiple functions running but never ending because they never get to the context.done() call. (This is a NodeJS function).
How can I stop these running functions without having to delete the entire function?
Disabling the function in the Manage tab prevents it from starting more, but doesn't end existing instances.
Kudu doesn't give me access to TASKKILL.
You have the ability to simply restart the Function App site, which will kill any functions (Function App Settings > Go To App Service Settings > Restart).
If you are running on a dynamic plan, please make sure you have upgraded to the latest version of the runtime, as a timeout feature is now in effect and will prevent functions from executing indefinitely.
For automation purposes, you can use the Azure CLI 2.0 (local azure shell) which makes this so much easier than clicking around in the portal blades.
This also works in the portal cloud shell if so desired.
Option #1: Restart Entire Function App (via Azure CLI)
az functionapp restart --name <functionappName> --resource-group <resourceGroup>
You can also restart the function app by killing the running w3wp.exe process - there is a watchdog that will automatically restart it.
Option #2: Restart IIS Worker Process (via Powershell)
#powershell kill -name w3wp
Kudu will allow you to do this manually via Debug Console and entering the command above or clicking thru Process Explorer->Properties->Kill.
Note: Killing the IIS worker process is all that is required as any spawned child processes will also be terminated (dotnet.exe, node, etc.)
This is the order of clicks starting from the portal home page to restart a function app in azure:
-> Function Apps (Found on the very left-hand sidebar, or on dashboard)
-> yourFunction (mine is called 'myFunction')
-> Platform Features (found near the top right of the screen)
-> All Settings (found under the General Settings section)
-> Restart (found near the top of the screen)
It seems the portal has been updated as I couldn't find the Restart button using the given instructions.
As of 17/7/2020 you can restart a Function app by navigating to the App Service page then clicking the Restart button which is found in the Toolbar:

Trying to make a windows store app that runs when the laptop lid is closed

Is there any way to make an app such that, say the user presses a button (in the app) and directly closes the lid, then the computer doesn't go to sleep (that way my app is still running) and I sort of make my own temporary log in screen as soon as the user opens the lid? (and that login screen essentially freezes all windows 8 functionality until the user logs in)
Im trying to make an alarm app that can only be shut off by logging in.
Also the app in question is a windows store app (written in C#) for windows 8.
Yes, with administrative privileges. Lid signal handling is part of the OS power settings and is controllable from an app if it is run as administrator or obtains admin privileges at runtime with UAC.
Powercfg can do this if you run a sub-process with cmd /c:
powercfg -setacvalueindex 5ca83367-6e45-459f-a27b-476b1d01c936 0
powercfg -setdcvalueindex 5ca83367-6e45-459f-a27b-476b1d01c936 0
There may be a .NET API for power management as well.

Running a GUI app on linux, without showing the gui?

I'm working with an api that requires an app to be started, the app runs a GUI on linux.
I need to punsh in some login information and then hide the app.
Is there a way I can go to the machine start the GUI and then hide it, log out, and have other users log in with out having the GUI shown, but still having the app running?
You can take a look at Xvfb http://en.wikipedia.org/wiki/Xvfb
it's a framebuffer version of X.
It will launch an X11 server without displaying it (useful with selenium for example)
Xdotool can send input to anyb xwindow, including xvfb

Application run as service is not appearing

I have two PCs and I'm logged in both with same user id(have the administration rights). I have installed the service on both PCs. I'm getting a strange issue:
1. If I remove both PCs from network then starting the service makes application appear on both the PCs.
2. If both PCs are in network then One PC shows application while on other it does not appear. however, if I check the task manager, application is running fine.
I find out following things:
1. On PC where application appears, active desktop is "Default"
2. On PC where application does not appear, active desktop is "Screen-Saver". I checked that non of the screen-saver are active and running on this pc.
3. Now If I remove the PCs from network and re-connect then behaviour just got switched. I.e. where it was not working start appearing application but not on other PC.
Why one PC is in screen-saver mode while other in Default? Is this has to do with common login id? How can I work around this issue?
These two services are independent of each other. These service createprocess() which invokes a VB application.
Another question I have is that if I'm not in N/w and run the service then it VB GUI appears properly. If I use remote desktop to start the service, the service appears properly but the VB GUI does not appear :-(
The active desktop at this moment is 'winlogon'. I'm not able to make the VB GUI visible if I give lpdesktop = "WinSta0\Desktop" or "WinSta0\winlogon" or "WinSta0\screen-saver". Please note that I'm accessing the system where service is physically running through remote desktop.
Can someone let me know what I needs to do to make VB GUI appear remotely if I start the service remotely?

Resources