Installing Github .zip files on Chromebook via Linux - bash

I'm using a Linux Debian terminal, trying to install a Github .zip file by following a walkthrough (from Chromebook). They're using a Windows terminal and access the zip file from a G: drive. They run the following:
C:\Users\zasur>G:
G:\>cd filename.zip
G:\filename>npm install
Which installs the Github zip. I've looked all over online and tried a few different solutions but can't get past the second command they run.
I was able to open /mnt/chromeos/MyFiles/Downloads from Linux by sharing the Downloads folder with it.
I'm not sure how to change the directory from here to the filename.zip and/or run commands from it. Whenever I try to run cd filename.zip or cd /mnt/chromeos/MyFiles/Downloads/filename.zip it always fails. Is this even possible on a Chromebook?

Related

Application running in a particular directory after installation

I am running Fedora 36. On my way to install Discord, I came through a process, here it is:
Downloaded discord.rar.gz
Unpack the file
Open the extracted directory
Found the file Discord with no extension:
I just double-clicked the file, it started installing (in GUI).
After it was installed, I still could not find it in App Drawer and when I run the same Discord file with no extension, it just opens the Discord app.
I am curious to know what's happening here. How can I get the app in the app drawer? Note that I tried copying the file to another location and then double-clicking it. It did nothing.
I clicked the file Discord in the directory. I was expecting that it was an installer and it would install the application, and it would be available in the app drawer. But, after it was installed, it didn't appear in the app drawer. Also double-clicking the same file again, opens the Discord app.
These are the steps to take if you want to keep changes to a minimum:
Download Discord for Linux tar.gz
Create the directory where you will install Discord
sudo mkdir /usr/share/discord
Extract and store in the directory created in the previous step
sudo tar xvzf discord-0.0.17.tar.gz -C /usr/share/discord
Copy the application launcher to the right place
sudo cp /usr/share/discord/Discord/discord.desktop /usr/share/applications
Point the icon to the right location
sudo sed -i 's|Icon=discord|Icon=/usr/share/discord/Discord/discord.png|g' /usr/share/applications/discord.desktop
Now if you go to Applications > Internet should be there.
Uninstall the app, or delete everything associated with it. Redownload, move to applications, and there open it for the first time (install it), that should do the work

ROS Noetic environment setup (directory not found)

After I installed Ros Noetic with this command - sudo apt install ros-noetic-desktop-full. There are 2-3 errors which are of not being able to fetch a few packages(armadillo and other). I downloaded them later.
But after I typed this command - source /opt/ros/noetic/setup.bash, I got this error of - no such file or directory. I then added this command in .bashrc file and removed it after one execution realizing this file cannot be found by the computer (may be a different location but still can't locate). Then I reinstalled ROS noetic, this time in another folder I made .... and I still cannot locate the file and I am getting the same error again. I am using Oracle VM VirtualBox Manager with UBUNTU_20.04. I also installed Guest editions(for full screen purposes)

Running wp-cli from bash script results in path error

I have successfully installed wp-cli on my remote server and created the "wp" alias. I use Putty to connect via SSH, and everything works just fine. First, I used a .user_bashrc file to set the alias with:
alias wp='/www/htdocs/w019d58a/wp-cli.phar'
The path is set in .user_bashrc using:
export PATH=/www/htdocs/w019d58a/:$PATH
However, when I tried to run wp-cli from a bash script, I got a "wp command not found" error. I contacted the support, and they recommended a symlink. So, I created a symlink using:
ln -s /www/htdocs/w019d58a/wp-cli.phar wp
Everything works but the installation process. I can, for example, install a plugin using:
#!/bin/bash
wp plugin install akismet
Unfortunately, I can't download WordPress via the bash script using:
wp core download --locale=de_DE_formal
I always get the error:
Error: Too many positional arguments:
Error: This does not seem to be a WordPress installation.
Pass --path=path/to/wordpress or run wp core download.
I tried to add the path using:
wp core download --locale=de_DE_formal --path="/www/htdocs/w019d58a"
No luck. I stil get the same error.
I can download and install WordPress directly from the console and do further operations using a script. But I can't download and install it from the script due to the path error.
Any ideas how to fix that?
I've just found out, that the download is working fine:
#!/bin/bash
wp core download --locale=de_DE_formal
It's the config create part that causes trouble:
wp config create --dbname=d123456 --dbuser=d123456 --dbpass=123456 --dbhost=localhost --dbprefix=wplcli_

Permission denied when trying to run karaf 0.8.1

I downloaded the OpenDaylight Oxygen SR1 Zip file, unzipped the karaf-0.8.1 file, changed my directory to it but when I try to run ./bin/karaf I get:
./bin/karaf: Permission denied
When I try sudo ./bin/karaf I get
sudo: ./bin/karaf: command not found
The weirdest part is that I also have the folder of the previous version, i.e. karaf-0.7.1, in the same Downloads folder and these commands work perfectly fine in there. I would like to use the latest version however. Could anyone help me please?
Edit: Sorry, forgot to mention I'm running it on Mac OS X
On a Unix-like system, you’re better off downloading the tarball: extracting that will give you files with the correct permissions.
In your case, to fix your setup, you need to run
chmod 755 bin/{client,inc,instance,karaf,setenv,set_persistence.sh,shell,start,status,stop}
to restore the permissions as they ship in the tarball.

How to get docker 'objects' completion on mintty-bash from git for windows

I have read (and tried) this:
https://docs.docker.com/machine/completion/
But it seems this is not the right way to get it on.
Anybody know how to get docker completion commands in Mintty (from Git for windows) bash command line?
Not sure if this is the best way to do this or if it work properly at all, but it seems to work!
Let me know if you find any strange behavior...
Minimum requirements:
Git for Windows (git bash / mintty terminal)
7-Zip or similar to extract files
Installation:
First of all, you will need the bash-completion package.
I discovered that the package built for cygwin works.
Choose a cygwin mirror: https://cygwin.com/mirrors.html
Navigate to: /cygwin/noarch/release/bash-completion/
Download: bash-completion-2.7-1.tar.xz
Extract it elsewhere
Copy the etc and usr folder to C:\Program Files\Git (see the note below)
Done, now you should have command completion enabled.
Testing:
You can test it by opening a git bash terminal and typing:
curl --ver (hit tab twice)
It will suggests something like this:
$ curl --ver
--verbose --version
Docker commands:
Now, about that docker commands...
I have found my files here:
docker command:
https://github.com/docker/docker-ce/blob/v17.09.0-ce/components/cli/contrib/completion/bash/docker
docker-compose command:
https://github.com/docker/compose/blob/1.16.1/contrib/completion/bash/docker-compose
docker-machine command:
https://github.com/docker/machine/blob/v0.12.2/contrib/completion/bash/docker-machine.bash
Just download and copy them to:
C:\Program Files\Git\usr\share\bash-completion\completions\
Make sure they are correctly named (remove the filename extension if any).
It should be named like this:
docker
docker-compose
docker-machine
No extra .txt or whatever...
Some notes:
I'm not sure if the package bash-completion-2.7.1 is the best version to work with git bash, I just got the latest one. (You can compare them and find it out)
You don't need to copy all the files from /usr/share/bash-completion/completions/, just the ones you want. (I didn't copy any of them).
It's a good idea to run a docker version, docker-compose version, docker-machine version and check the versions you are running, then download the correct files from the repository. (Choose the correct release tag for you).

Resources