How to turn on and off aeroplane mode via termux-api? - linux

I had checked this
https://github.com/termux/termux-api/issues/138
but no use

Changing the state of the Airplane Mode Settings toggle is facilitated by a Special Android API which accesses and Modifies System Settings, which is NOT a part of Termux. Until the devs themselves introduce a command to do so, you will need superuser i.e. root privileges to do so. I hope the svc commands will help.

Related

How can my application assign a keyboard shortcut in the system from Flatpak?

I am the developer of Planner and I am having a problem assigning a keyboard shortcut to the current system.
Planner is a task manager and has a built-in application called Quick Add that through a keyboard shortcut that can be run regardless of whether Planner is running.
To install this keyboard shortcut I use the following service.
This works perfectly if I build Planner from the repository. However, I have an error if I execute the same function if I build Planner from Flatpak
** (com.github.alainm23.planner:2): WARNING **: 15:54:36.510: CustomShortcutSettings.vala:28: Schema "org.gnome.settings-daemon.plugins.media-keys" is not installed on your system.
I know that I can't access the scheme of org.gnome.settings-daemon.plugins.media-key And I need a hole to edit the dfcon configuration of the system.
The question is how can I do that. If anyone could help me I would be very grateful.
Flatpak by default doesn't allow editing GSettings in a way that affects the rest of the desktop, since rouge applications could use that ability to do things with security and privacy implications, like set or unset proxy servers.
So it would be best to look into alternative ways to make this possible - perhaps provide people with instructions to set it up manually, or request and/or contribute proper portal support for setting global keyboard shortcuts.
If you still really want to implement this, check the link above for the details on the sandbox hole you need to open to make it work.

Custom Action exe with evaluated privilege for Installsheild Limited edition

I am using the Limited edition and in my installer I have a custom action where I open a cmd.exe and passing a batch file for executing.
The cmd is executing but its not in the elevated permission. I need to execute this in elevated permission since my batch file has operations which needs admin privilege.
I tried many options and the screen shots attached describes what I have done.
Let me know if this is possible with Limited Edition. I am installing in windows 10 machine.
the whole "Elevetad privilege" thing changed a lot during the lasts years.
if I were you, I'd put the schema to version 500 (the last one)
you'll might wan't to double check that your batch file is correctly found, as properties in system context can be unavailable. (use /k so the cmd prompt will not close and you'll be able to see the result of your batch file.)
also if the UAC is disabled on the client machine the user won't have the right to elevate your installer so setting the Require Administrative privilege won't change anything.
in order to be sure, you'll might wan't to use a install condition validating the Privileged property.

installation OP5 Monitor / Nagios:

In the case of implementation of the monitoring database oracle control method requires a standard application username and password explicitly. How to bypass the need to enter in clear text password to log into the database oracle, which is visible in the screen OP5 Monitor and Nagios configuration file system.?
There are several possibilities.
Generic solution
Use the $USERnn$ macros, which are defined in resources.cfg. More information on how to use this feature: https://kb.op5.com/display/DOC/Macros#Macros-Custommacros
The USER macros are not visible in the graphical user interface, but can be read by anyone having access to the resources.cfg configuration file.
For Naemon documentation on user macros see http://www.naemon.org/documentation/usersguide/macrolist.html#user
Specific solution for the check_oracle plugin (if that is what you are using)
Specify the credentials in an auth file. From the help text for the plugin:
-f <auth-file> can be used instead of -u <username> -p <password>. If both
options are used the <auth-file> will override -u/-p. The <authfile> should
be a textfile (readable by the nrpe-user) containing two rows. File format:
username=<username>
password=<password>
Solution specific to OP5 Monitor
Use custom variables prefixed with OP5SECRET. Unfortunately, these are not very well documented, but take a look at the Standalone VMware ESXi virtualization host management pack which uses this feature.
Full disclosure: I work as Development Team Lead at OP5.

Turn off 'Perforce change - o' command

I'm logged in with the Perforce viewer client on my MacBook Pro, and I keep getting this popup that says:
You don't have permission to execute the "P4 change -o" command
This happens ever 5 minutes or so. How do I turn this off?
The P4V client program will run certain commands as needed. It is possible that your workspace specification could have something mapped in it that you do not have sufficient permissions to run this command on. You can see what permissions are required for certain commands in the Server Administrator's Guide: http://www.perforce.com/perforce/doc.current/manuals/p4sag/chapter.protections.html#DB5-35217 (the change command requires "open" access level).
You may wish to check with your server administrator to check what you do have access to and look at the client workspace mapping to see if there might be something mapped there that your user does not have sufficient permission to access.

Is it possible for a team to use Eclipse installed on a shared network drive?

Our lead programmer likes to install tools on a shared network drive to minimize effort when updating. He recently installed Eclipse to the network drive, but when I run it, I get a window that says Workspace in use or cannot be created, choose a different one. After clicking OK, I get a window that gives me a drop down menu with only one item, the workspace on his machine. I can then browse to the workspace on my machine, click OK, and Eclipse continues to start up and run just fine. There's a check box in that second window that says Use this workspace as the default that I've checked after browsing and selecting my workspace, but the next time I start up Eclipse, it reverts back to the lead's workspace.
Are we violating some assumption that Eclipse makes about the install? We're on a Linux network, if it makes a difference.
Setup the shared eclipse such that it can not be modified by the users accessing it. This should (if I recall correctly) force eclipse into a "Shared User, Hands Off" mode and default to storing settings per user account.
Do not share Workspaces (or Projects) -- this will only break things horribly -- use a different strategy such as a proper revision control system.
Perhaps this documentation will be helpful.
"""The set up for this [shared] scenario requires making the install area read-only for regular users. When users start Eclipse, this causes the configuration area to automatically default to a directory under the user home dir. If this measure is not taken, all users will end up using the same location for their configuration area, which is not supported."""
I would try to run Eclipse locally as well as over the network. Using a shared network drive may make Eclipse more painful than it sometimes is. A development environment should work for the developer, even at the expense of a slightly more complicated setup.
Eclipse stores a lot of settings, including the workspace list, in it's installation directory (especially the "configuration" directory). It's hard to say how well sharing the installation will work, but I wouldn't be surprised if there were a number of issues caused by "fighting" between Eclipse instances running on different developer's workstations.
To fix the particular issue you're having, you could set up a separate startup script that passes your workspace as a command-line argument to Eclipse, bypassing the workspace selection dialog you're seeing.

Resources