Open files/directories in a vagrant synced folder on the host
Project description
Synopsis
When connected to a vagrant machine via ssh, this allows the user to open files and directories on the host machine without tunnelling.
This functionality is restricted to only files/directories in synced folders.
Requirements
python3
vagrant
Setup
Installation
You can install hostopen with pip
pip3 install hostopen
This will give the commands: hostopen and hostopen-server
Vagrantfile configuration
The virtual machine needs access to the synced_folders file for this program to work. This file is located in the .vagrant directory in the same root as the Vagrantfile.
Add a similiar line to the Vagrantfile:
config.vm.synced_folder ".vagrant/machines/default/virtualbox", "/.vagrant_info"
This assumes the machine is named ‘default’ and you are using ‘virtualbox’. Change where appropriate.
SSH
vagrant ssh -- -R 12355:localhost:12355
The arbitrarily chosen default port of 12355 can be changed.
Usage Examples
You can use hostopen --help and hostopen-server --help for usage information.
Client
hostopen file.py directory
Will make the server open file.py and directory if they are inside of a synced folder.
Server
hostopen-server subl
Filepaths received will be opened with sublime. subl can be substitued for a different program.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hostopen-0.1.1-py3-none-any.whl.
File metadata
- Download URL: hostopen-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97d3256ecf4842ee4ba786d5083b9c9e4142dad6963287f7f4f35ae0ec123345
|
|
| MD5 |
c36e25d2e7e879089e081b05a4f488cb
|
|
| BLAKE2b-256 |
d5c5462203ce912954c149efcb17b1a709da906421ac7fbcda6be95a92edaa25
|