MonoDevelop's debugger and xterm/gnome-terminal - monodevelop

I am using Xubuntu 15.04. I tried to run a basic console app using MonoDevelop, the latest one. I did a new project and this appears when I try to debug it:
Could not connect to the debugger
I googled for answers and I found out that there is a problem with the gnome-terminal, that it no longer accepts the --disable-factory argument and something about unchecking the "Run on external console". I unchecked that and when I press to run, it closed it immediately.

Try executing MonoDevelop as sudo
$ sudo monodevelop
It takes Xterm as output terminal emulator.
EDIT
Run Monodevelop as root can be a BIG mistake.
Best way is to write an script that unsets GNOME desktop session and run monodevelop, as Oskar says.
Try this one (copy and paste it on vim/nano and save as monodevelop.sh)
#!/bin/bash
unset GNOME_DESKTOP_SESSION_ID
monodevelop
Put it on your home (for example) and give it execution permissions:
chmod +x ./monodevelop.sh
When you want to run it, execute ./monodevelop.sh. Or you can add it as GNOME shell application following this guide.

Related

Brownie Installed but not recognized

I've installed eth brownie with the command pip install eth-brownie but when ever I type brownie, it says
The term 'brownie' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1
I had this problem also, when running "pip install eth-brownie" in the command line, I was given a warning that said
C:\Users\my_username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts
is not on the PATH.
You could try running pip uninstall eth-brownie and re-installing pip install eth-brownie to see which file you need to add to PATH.
Copy the file path it gives (should look similar to what I posted above)
To add this to path (on windows 10) type advanced system settings into the search bar, click view advanced systems settings, a window that says "system properties" should pop up, click environment variables..., in the next window that pops up (titled environment variables) click on path then click edit, a new window will pop up titled edit environment variable click new then paste the file path into a new line. Click ok and close all of your programs (if you don't close/restart your programs they will not be aware of the change).
When you open your IDE (visual studio code in my case) you should be able to run brownie by typing brownie
This at least causes a temp recognition of "Brownie":
$env:Path += ";C:\Users\<< username >>\.local\pipx\venvs\eth-brownie\Scripts"
This path will display too if you try to reinstall Brownie. Then add it to PATH variables.
I got zsh not recognize brownie command error, so i add the brownie executable into my PATH in .zshrc worked:
export PATH="/Users/{your_user_name}/.local/pipx/venvs/eth-brownie/bin:$PATH"
Not sure if this works for you.
The following steps worked for me on Mac OS.
step1: uninstall eth-brownie "pip uninstall eth-brownie"
step2: re-install "pip install eth-brownie"
step3: Quit VS Code and Open the project again.
using 'pip install eth-brownie' instead of 'pipx install eth-brownie' solved the problem for me.
I faced the same problem 6 months ago. The issue was with the Python paths in System Environment Variables. I had installed a 3.10 version of python however, pip and pipx was still installing packages in the path of 3.09. You can verify if you are facing the same problem:
Hit Windows button and search for "Advanced System Settings"
Hit Environment Variables to see the Path field
If you see multiple paths of python versions, then that is a possible problem
What you need to do then is
uninstall eth-brownie "pip uninstall eth-brownie"
come back to the Path field in Advanced System Settings
Remove any redundant paths by hitting the edit button
Run pipx install eth-brownie (using pipx is recommended over pip)
step2: re-install "pip install eth-brownie"

Run chrome lighthouse's audit from command line

I would like to write a script which run (from the chrome's binary) its lighthouse's audit with a url given.
I didn't manage to find how to do it, but since there is even a chrome extension doing I assume it should be feasible right ?
Google Lighthouse can be ran using the command line. To run it from the command line, you must first install:
Google Chrome for Desktop
Node.js v6 or later.
To install the Lighthouse CLI, open a command line and type the following command:
npm install -g lighthouse
To run an audit with Lighthouse, type:
lighthouse https://example.com
By default, Lighthouse writes the report to an HTML file. You can control the output format by passing flags.
You will notice that a Chrome window is opened every time you run Lighthouse. If you don't want a window to be opened, you can run it in headless mode:
lighthouse https://example.com/ --chrome-flags="--headless"
For the complete list of options, type:
lighthouse --help
Take a look at the Lighthouse source code repository for additional documentation and examples.
You can use/test via npx:
npm i npx -g
Then, directly run from your terminal without using a package.json created or installing globally & without opening a chrome browser instance:
npx lighthouse <URL> --only-categories="performance,seo,Accessibility" --chrome-flags="--headless"

json file location in command prompt

I am trying angularjs-2 for the first time from the example found here
and everything was working fine until I came to a point where the author has written something like this
Now open the package.json file location in command prompt and execute
the below command to load the required modules and supported files
which are mentioned in the package.json file.
npm start
after reading this I open command prompt by pressing window+R and write cmd
and I enter the following path
E:....\nodejs with angular2 testing\nodejs with
angularjs2\nodejs with angularjs2\
but i am not able to do anything after this point
how can i execute the package from command prompt,?
i tried the same with developer command promt but facing the same issue,
hey guys i know i am bad in english but please i need help here
First you need to have nodejs in your system.
If you don't have nodejs, then download it. which shifts npm with it. [It is similar kind of stuff what nuget does in VisualStudio.]
As you mentioned package.json is already there in your project then you need to got to you Application folder in command prompt to install packages by running npm install.
For example : If your App folder is in E:\Project\Myangular2App,
then after opening Command Prompt with window+R, navigate to E drive by E:, then navigate to your App folder by cd Project\Myangular2App and run npm install. This will install all the packages mentioned in package.json
start seems to be a script configured in your package.json which probably runs something else.
Please state if npm (the node package manager) runs on your CLI without any argument. If not you have to get npm working first. It has to be in your $PATH variable in order to function anywhere.

Why can't I create a Google Chrome extension from the CLI?

I'm a bit confused, but I can't create a .crx package from the CLI in Linux. In Windows 7 the script worked fine, but in Linux it seems that nothing happens. The popup window that occurs after the packaging process doesn't appear and the .crx is not created at all.
Here's the script.
#!/bin/sh
google-chrome --pack-extension=~/Web/client/ --pack-extension-key=~/Web/client.pem
exit 0
Maybe I'm missing something?
In Linux, (at least Ubuntu 10.04) google-chrome is a bash script wrapper of the chrome executable.
First, You should find where the chrome executable is. In my case: /opt/google/chrome/chrome
Then, replace it in your script:
#!/bin/sh
/opt/google/chrome/chrome --no-message-box --pack-extension=/extfolder/Web/client/ --pack-extension-key=/extfolder/Web/client.pem
exit 0
It is really important that in the script to specify the full path. For instance, /home/me/Web/client.pem rather than ~/Web/client.pem because as it is a parameter bash does not resolve it.
A better alternative would be defining a bash variable called $CHROME_PATH so it can be easily changed among different *nix platforms.
I don't know why packaging with google-chrome on Linux doesn't work, but can at least propose a workaround - use one of the officially-blessed packaging scripts listed at https://developer.chrome.com/extensions/crx#scripts. There is currently one for Bash and one for Ruby.

Hudson .jelly files edit not reflected

I edited a few .jelly files for Hudson, but it's not reflected. How do I restart Hudson ? I hope that this will display the HTML tag changes made in the .jelly files.
I am trying to change the look and feel of the Hudson.
On what OS do you run Hudson? How did you install Hudson? .....
The basic idea is to stop Hudson (or just kill it) and than start it the same way it was started before. If you are not the person who installed it, call the person. After a while they get tired of you asking and will give you the instructions (and also the permissions) to do it yourself. ;)
If you have create plugin with mvn -U org.jenkins-ci.tools:maven-hpi-plugin:create command.
This will have in built Hudson.
You can run mvn hpi:run at location of plugin.
You can debug using mvnDebug hpi:run.
mvnDebug by default uses 8000 port,if you are using eclipse as IDE, Go to Run -> open Debug Config -> Select plugin and port and start debug. This will do remote debugging on 8000 port.