Run Ganache GUI on ubuntu - blockchain

I want to run ganache Gui app on ubuntu 22.04. After downloading AppImage I run it using command
ganache-2.5.4-linux-x86_64.AppImage --appimage-extract
It generates new folder and then I execute ./Ganache inside that folder.
I get this message
[50883:0717/002902.307174:FATAL:gpu_data_manager_impl_private.cc(1034)] The display compositor is frequently crashing. Goodbye.
Trace/breakpoint trap (core dumped)
How can I fix this ?

You should chmod +x ganache-2.5.4-linux-x86_64.AppImage and turn it into an executable. Then you can run it double clicking it.
You could also move it into the opt folder to be available to all users with the command sudo mv ganache-2.5.4-linux-x86_64.AppImag /opt/
And then, you could create a desktop link to be used in the menu, creating a file with the contents like this:
[Desktop Entry]
Name=Ganache
Exec=/opt/ganache-2.5.4-linux-x86_64.AppImage
comment=cloud
Type=Application
Terminal=false
Encoding=UTF-8
Categories=Utility;
Then, when you run it, you can pin it to your panel! :D

I found a solution for ubuntu 22.04 here: https://github.com/AppImage/AppImageKit/wiki/FUSE
just run these commands:
sudo add-apt-repository universe && sudo apt install libfuse2

Related

Vmware on Arch: Could not open /dev/vmmon: No such file or directory

I want to install VMware Workstation on Arch. I used the command yay -S vmware-workstation to install. After installation finished, I ran VMware, created an VM, started it, and got the error:
Could not open /dev/vmmon: No such file or directory.
Please make sure that the kernel module `vmmon' is loaded.
I tried to install linux-header but it still didn't work.
OS: Arch Linux, 5.10.56-1-lts.
Thanks for any help!
I ran into this problem too, and the solutions I found online ended up having their own problems that needed to be solve, which I'll document here.
To solve the error Could not open /dev/vmmon/: you need to run:
sudo vmware-mod-config --console --install-all
If this returns an error about Glib not having support, you need to clone https://github.com/mkubecek/vmware-host-modules.git and make it.
$ git clone https://github.com/mkubecek/vmware-host-modules.git
$ cd vmware-host-modules
$ git checkout -b 16.2.1 origin/workstation-16.2.1
$ sudo make
If this returns an error containing fatal error: generated/autoconf.h: No such file or directory, you need to install linux-headers and make sure it matches your linux kernel version. Probably also make sure your kernel is up to date, although I'm not sure if that's necessary.
$ sudo pacman -S linux
$ sudo reboot
$ sudo pacman -S linux-headers
Now you should be able to make install in that cloned repo, which should install the required modules for you to be able to run the vmware-mod-config --console --install-all command, which should solve the issue.
So working backwards, the steps are:
Update your linux kernel and install the right linux-headers for it.
Clone this git repo, cd into it, git checkout -b 16.2.1 origin/workstation-16.2.1, and run sudo make install
Run sudo vmware-mod-config --console --install-all
More about can be found at my post here: https://bbs.archlinux.org/viewtopic.php?pid=2020372#p2020372
I also encountered same problem. Most of the stackoverflow pages suggest to reinstall the vmware but its not a fair solution and even its not a solution. Its just like if you have pain in teeth remove that teeth.
Another thing is that some post and even vmware official posts said to disable secure boot.
But after trying both nothing changed so i goto to cd /dev and found that the file vmmmon exists.
And when i tries to load the file it loaded successfully.
So from here i concluded that to solve this issue do the following:
Either disable the secure boot or sign the vmmon.
CD to /dev/
Load vmmon using modprobe
and as always Happy coding....
The command: sudo vmware-modconfig --console --install-all works, but every time that I reboot the system the error come out again.
In my case, the cause of this problem was the vmmon didn't be load. So I just
sudo modprobe -v vmmon
and it work.

Running C++ Jupiter Notebook in VSCode Insiders

I have installed xeus, xeus-cling and jupyter extension. I changed the kernel to one of the C++ versions, the cell language to C++ but when I click run the cell never outputs. Can someone please help me solve this?
Running xeus-cling under vs-code
Ceus works in the vs-code environment. You have to activate your conda environment and invoke vs-code from it (i use the code insiders edition). In linux this looks like
conda activate xeus-cling # my env for xeus-cling; where i compiled cling
then invoke code (insiders) in your project directory
code-insiders .& # or code .& if you are using the stable version
If you have still problems try the following:
start a jupyter notebook from command line (of course in your conda environment described above)
jupyter notebook --no-browser
Copy or remember the line with the token, which looks like http://127.0.0.1:8888/?token=8daf8f57bef55918defb467defc55f0305803caa27dd01d2
next go to code-insiders and click on the bottom bar Jupyter Server: Remote
on the top of the window a list will pop up, looking like
select Existing or copy the token into it
now a message should appear reload kernel , click on the button to do so
in the bottom bar select the kernel to e.g. C++14
create a new blank jupyter worksheet and don't forget to change the cell to C++ !!
Heres a solution without having to activate the conda environment. The following commands are what worked on ubuntu:focal
Update conda:
conda update conda --yes
Create the environment to install xeus-cling kernel:
conda create -n xeus-cling --yes
Install xeus-cling kernel in the xeus-cling environment created earlier:
conda install xeus-cling -c conda-forge -n xeus-cling --yes
Find where your conda environments are installed by looking for envs directories in the output of the following command:
conda info
My conda environments were located in /etc/miniconda/envs. Thus there will be a subdirectory for each environment which holds all the installed packages. The kernels are located in xeus-cling/share/jupyter/kernels. The path starts with xeus-cling because that's what we named the conda environment earlier.
Inside of the kernels/ directory you will find a few c++ kernels. To install the conda xeus-cling kernel directly into Jupyter do the following:
jupyter kernelspec install /etc/miniconda/envs/xeus-cling/share/jupyter/kernels/xcpp11 --sys-prefix
jupyter kernelspec install /etc/miniconda/envs/xeus-cling/share/jupyter/kernels/xcpp14 --sys-prefix
jupyter kernelspec install /etc/miniconda/envs/xeus-cling/share/jupyter/kernels/xcpp17 --sys-prefix
Open VS Code as you normally would. No need to activate the conda environment. Create a new Jupyter Notebook. Finally, make sure you select the C++ Kernel in the upper right corner of the screen.
I used #abu_bua answer above and these docs from the xeus-cling project to figure this out. I hope this helps.
Happy coding!

VS2019 - Sudo Remote Debugging on Linux with Cmake project

I have a cmake c++ Linux project that is using Remote Debugging from a windows computer. The program accesses the GPIO pins on Raspberry pi so it needs to run under sudo on the remote machine. Everything is building and working but it crashes on the first line that needs admin access. I have not been able to figure out how to launch the newly compiled application under sudo. I have tried different settings in the launch_schema.json but no luck so far.
I found this and it worked for me.
Unable to launch debugger (gdb) with root permissions.
Basically you decorate the existing gdb binary on the Pi with a bash script and then use the script.
The steps on the Pi are:
cd /usr/bin
sudo mv gdb gdborig
Now create a bash script named gdb with following content.
sudo nano gdb
Content of the bash is;
#!/bin/sh
sudo gdborig $#
Finally, make the script runnable with.
sudo chmod 0755 gdb
Thanks goes to Buğra Aydoğar

Install debian package using cloud-init

I'm trying to install netcat using cloud-init.
As soon as I SSH'd to my vm, with all my keys configured correctly via cloud-init (meaning, it's executing), I try to run netcat and it doesn't work;
I'm using Container-Optimized OS (cos) as they refer to use it for cloud-init, and as of research I found cos is based on ChromiumOS kernel;
All I add to my cloud-init file is
packages:
- nano
- netcat
And none of them work.
Is there anything I'm missing to be able to add these packages?
Assuming you want to run tools like nano and netcat interactively in that session, you can use the CoreOS toolbox in Container-Optimized OS to install and run these tools.
$ toolbox apt-get install -y nano netcat
$ toolbox nano

How to install Docker from the Source code?

I am trying to install docker from the source code downloaded from github.com/docker/docker
I am unable to install it from the source code .
The Makefile present creates a image , but i want to install it in my system.
Can anyone suggest solution ?
I am using UBUNTU 14.04
Well, idk if this works for your linux distro. (looks like it is ubuntu) but i run kali linux and even if we have different commands to use the process is just as same in every linux distro.
first, before we jump on, we need to update our linux repos.(repositories)
sudo apt update
and,
sudo apt-get update
then,
sudo apt install git
[This installs git]
Now we can start cloning git repos. into our system
go to your desired folder/working directory and type:
sudo git clone "link of the git repo. without the commas"
i would better suggest you to just:
sudo apt install docker.io
[To install docker by apt]
it's better to install it via the docker package and update it to the last version. This is the best way to install docker.