Flutter commands is not workimg - terminal

when I run flutter command as a root user it did not run but it show something like an error
Woah! You appear to be trying to run flutter as root.
We strongly recommend running the flutter tool without superuser privileges.
/
📎
Doctor summary (to see all details, run flutter doctor -v):
Dart_NewStringFromUTF8 expects argument 'str' to be valid UTF-8.
I do not understand what I am doing wrong .Kindly help me.
I am trying to run flutter in Kali Linux with android studio installed.
Did I need to run flutter as a non-root user, if yes then I need to install everything for another user . is there any way to do this?

Since you have installed the android studio in your root account.
there is no other option for you.
you have to give a non-root user the permission to use it.
you cant log in the shell alone also.
I recommend you to install only flutter there and use in some text editor an shell commands that's better than as.
kali has some different rules than normal Linux repos.

Run flutter doctor
and do as it suggest

Related

Using AWS CLI with MobaXterm on Windows

I am a newbie to both AWS and MobaXterm. I am trying to use MobaXterm to manage AWS instances because it comes with bash.
I am following the commands as per https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html.
When I run the following command $ sudo ./aws/install, I get the following error:
Unable to start 'install': There is no application associated with the
given file name extension.
I did run chmod 777 to ensure that I am able to read/write/execute. Please see attached image.
I do know that I can use Windows CLI installer in command line. However, doing SSH to EC2 is a nightmare in Windows with all certificates. With MobaXterm (because of bash), it is very easy. So, my preference is to use MobaXterm instead of Windows command prompt.
Moreover, I don't want to directly install Ubuntu. Hence, I am looking for some guidance here. I'd appreciate any help.
I am hoping that I am not missing any package. Thanks for any help.
In order for AWS cli to run on MobaXterm, you will need to run the following commands in MobaXterm:
MobApt install python2-pip
pip2 install awscli
It will take some time for MobaXterm to complete steps 1 and 2. Also, AWS cli runs super slow in MobaXterm. You are better off using cmd.
This is the site that helped me ran AWS cli on MobaXterm.
https://majornetwork.net/2017/07/installing-aws-cli-on-cygwin/

Jenkins with flutter 'flutter clean' is showing 'Operation not permitted'

I was trying to do CI with Jenkins for Flutter project on MAC.
I have added the environment variables for HOME, ANDROID_HOME and PATH. But, flutter commands are not working. They are showing 'Operation not permitted'.
This is exact error:
bash: /Users/mdhasnain/Documents/flutter/bin/flutter: Operation not permitted
What I have tried so far:
1. Changed admin user's sudo command NOPASSWD and tried flutter command with sudo.
2. Tried to change flutter file's permission in flutter/bin folder: chmod a+x+w+r /Users/username/Documents/flutter/bin/flutter
3. Also tried to change the permission manually.
N.B. flutters commands are working fine from terminal.
I am stuck. Advance thanks for your help.
You need to grant Java with Full Disk Access privileges.
Please see: https://stackoverflow.com/a/62678687/1844385

Running Electron with Linux on Windows

I'm trying to get an electron forge app running on my Windows 10 machine via Linux on windows (using the new built-in windows bash functionality).
When running electron-forge start I am getting back the error message:
[1484:1126/222326.466455:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /mnt/c/.../node_modules/electron/dist/chrome-sandbox is owned by root and has mode 4755.
From some searching, this thread on the electron Github makes it pretty clear that this is somewhat by design and the way to get around it is to run chmod as a root user post-installing all of the dependencies.
I attempted to do this and the command looked like it had worked (no error on running the chmod to 4755), but that didn't fix running electron-forge start - I still got the same error message. I looked into that a bit and it seems that this has to do with what files the linux subsystem are allowed to control permissions for per this Microsoft thread.
Is there some other trick to getting electron forge to work with bash on Windows?
I found that running the electron-forge init from Windows powershell into a native Windows directory allowed me to subsequently use npm start in my-app (for example) in WSL. So ultimately what I ran was
powershell npx create-electron-app my-app
(I have alias powershell="/mnt/c/windows/system32/WindowsPowerShell/v1.0/powershell.exe" in my .bashrc file)

Silent/Automated Homebrew Install

I am trying to get homebrew installed remotely on a machine without a terminal open and without ssh access to the machine. Our company uses a Directory-as-a-Service which allows us to remotely push shell scripts to our computers which is great, but it requires the scripts to have no interactivity.
Is there a way to automate the installer and remove the “Press enter to continue” prompt in the install process?
Thanks,
Zach S
The env variable CI seems to silence this prompt:
export CI=1

Final permissions on OS X Bower and NPM

hope you having a good day.
I am a Web Frontend designer and i'm tired about MAC OSX El Capitan and his sick permissions systems on files and folders, the next is happening:
Every time that i tried to get any Bower package, NPM, or whatever console package i get this problem:
Example: 'Bower install angular-translate'
Console response:
'Error: EACCES: permission denied, open '/Users/carl/.config/configstore/bower-github.json'
You don't have access to this file.'
This is not just for this package in specific, it happend with everything that i tried to download/install in every place in my laptop.
I am the administrator on this machine, i been google that like 5 or 10 times always getting same results and always going to the same way (solutions like 'chmod-R 777* on the folder/file').
My question is the next:
There is some 'permanent' way to get all my files and folders 'global' administrator permissions no matter what? i mean, i know that is not secure, pero it is ok, i am the only one who use this laptop.
Thank you so much for your help.
Best Regards.
In order to solve the issue. I ran the command 'sudo chown -R $USER ~/' from the terminal. While inside the same terminal window, I then ran 'bower install' which solved my issue! Afterwards, I was able to install other packages(Ex. bower install bootstrap --save.

Resources