How can I open a browser in my VM instance? And how safe/unsafe can this be?
The instance is a Ubuntu 16.04
The only way I know to access the VM is via the SSH button provided by google on the cloud console website.
I want to use it regularly, with pages visually displayed and mouse clicks. (Treat me as a newbie, I'm totally new on Linux and on VMs. I didn't even know there was another way of controlling the browser)
Context:
I need to download a huge amount of data from websites to my virtual machine on Google Compute Engine.
I know there are solutions on the web to transfer files from my machine, but my internet really sucks, it's not feasible.
I also know there are some commands like wget using copied cookies to download some files.
Even though, I feel I'll be needing to use a browser, especially because I want to use a regular Google Drive interface to transfer my files if I need.
Knowing more about this helps, but the question is "how to open a browser and navigate as if I was a regular newbie, with pages displayed and mouse clicks".
Install the desktop
sudo apt-get install ubuntu-desktop
Install VNC server
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-16-04
sudo apt-get install xinit
and then run
startx
Related
Let me give a quick background of the work I do and then I'll explain the problem I am facing.
I am a software developer with more than 15+ years work experience. My work involves a lot of varied tasks:
data analysis using R, Python
development of web applications using Ruby on Rails, JS, etc.
building models using open source libraries
So far, I have been doing all this in my personal laptop (Ubuntu 18.04) and have faced no issues.
But I would soon need to start using a laptop provided by the organisation that I am working for. This org is not a IT company, it's a public body. They only use Windows (10) and don't provide admin access to anyone. It's very hard to get permission to install any kind of "approved" software. Just to give an example, they refused to install Chrome in my laptop as they wouldn't be able to control the updates.
So here's my problem - what do I do to work peacefully using their laptop? The primary reason I have to use the work laptop is that there are a lot of important documents kept in shared drives that are accessible only in their machines.
I have been looking at options like WSL or Hyper-V. But, before I put in a request to the IT team to get them to agree, I wanted to know a few things:
1) Which among WSL or Hyper-V would be the better approach for setting up the dev environment that I want?
2) IF I get the IT team to install WSL/HV, would I be able to set up everything else without having to go back to them for each software? Is there a way of secure local admin access these options would provide that will ease their concerns?
3) Is there some other way of setting up what I want?
If still applicable and actual I can share my solution:
If you should work on a windows machine where you don’t have administrative privileges, you can very easily make a portable R/Rstudio installation.
Download a recent version of R from the CRAN site and the recent version of RStudio. After download extract RStudio installation exec with 7Zip and copy files from $_OUTDIR to the desired location (in case you making an update, simply overwrite all files, that already exist). Your RStudio executable will be in
your-chosen-directory/bin/rstudio.exe
Then run CRAN-R installation, ignore the warning that you don’t have administrative privileges and go forward until installation will complete. Run RStudio, from the menu
Tools->Global Options
locate where your R installation is located.
If you performing an update (more recent version of R), copy all files from the library subfolder of the old R installation into new, but this time DON’T OVERWRITE! This operation vill preserves the packages you have installed in the previous version of R. After copying update all your packages from the RStudio window (Packages->Update). When the packages update process will end check which packages failed to update (You will see warning messages near them in the RStudio console). Remove these packages (write down names of failed packages and delete corresponding folders from library subfolder). For this, you will need to exit from RStudio. After deletion launch RStudio again and execute the packages install command in the RStudio console:
install.packages(c("package1", "package2", "package3"))
Congratulations, You are ready to go!
when we can manually connect to remote desktop and install software we desire, why we need extensions? Custom Script extension and Desired State configuration works same way. They run the same powershell script. why do we need many extension that basically does same thing. Please give me an idea on this.
when we can manually connect to remote desktop and install software we
desire, why we need extensions?
You can connect to remote desktop to install software, but sometimes if you can't connect to it, you can use custom script extension to install it, or change some configuration.
For example, if you can't RDP to windows VM(RDP service disabled), you can use custom script extension to enable it.
Custom extension will use wagent to run this script.
Main reason to use those - automation. How would you connect to 10000vms and install same software? What time would it take you? How many errors will you make?
This question is basically asking - what is the purpose of automation? we can do the same thing manually. Well, good luck with that :)
An article on Chrome OS that I read here:
https://medium.com/#JamesCridland/review-five-months-with-a-chromebook-for-web-development-writing-and-more-8adf36b4a061
says:
"Update: Above, I mention that I use SSH and vi to do my programming work. And I did. Except I don’t any more. It turns out that one of the newer updates added direct SFTP access into the Files app (the equivalent of Explorer or Finder), so that my development box appears simply as another drive on my Chromebook. And Caret is an excellent programmer’s editor. So now I have a proper programmer’s editor (as well as the SSH terminal I need to put those changes live)."
Ok. But, when I go into Chrome OS's files app, the apparent way 'mount' my equiv of his
'development box' is via 'add new services', which is launching a webstore-app named 'SFTP' (whose icon is a blue folder outline with "SFTP" on it). i,e.:
https://chrome.google.com/webstore/detail/sftp-file-system/gbheifiifcfekkamhepkeogobihicgmn?hl=en
(My equiv of his 'development box' I'm assuming to be my web-server at bluehost.com, where I currently use Firefox's FireFTP extension, on Win-10.)
I can't get this 3-stars webstore 'SFTP' app (authored by someone from Japan) to authenticate me into my bluehost acc't. So, now I'm wondering whether
this 'SFTP' app is even the right thing to have installed, due to all the one- and two-star showstopper reviews. One typical review by a guy named Tim says:
"It's a nice try, but I really wish someone who knows what they're doing would make this service. It looks like it works but if you drill down more than a few folders deep on the remote filesystem, operations slow to a crawl."
Similarly, the two clients ('sFTP client' and 'sFTP client Lite) also have such low ratings, that my gut says that Google has failed to deliver a robust web-developer infrastructure.
Come on Google...you need to implement this stuff under your own logo.
Am I missing something???
Probably should advertise this functionality better :), but the Secure Shell App supports mounting via SFTP so it will appear in the Files app.
Steps to use:
Install Secure Shell Chrome extension.
Launch the extension (look for it in the bar to the right of the omnibox/browser URL bar -- it'll have a black terminal icon).
Enter the connection details to create a new profile.
Give it a description like "user#foo.com".
Instead of clicking "Connect" in the bottom right, click "Mount".
Authenticate with the server (keys/pass/whatever).
Once it finishes, it'll now be visible in the Files app.
If you suspend/resume the system or otherwise logout/reboot, you'll need to relaunch Secure Shell, select the saved profile, and then click "Mount" again. We probably should make this a bit smoother, but that's how it works currently.
No, not an answer yet...just more wishlist stuff:
Ok, more recent info about the Firefox browser's "FireFTP" addon:
It no longer works on the (new) std Firefox browser, as of a couple of
weeks ago when version 57.0 was released. (No biggie tho...a goggle revealed
a new-to-me browser called 'Waterfox' and it nicely supports FireFTP and the
other addons that Firefox dropped support for.)
So a bit more research yielded only yet more 'mumble-mode' confusion: it revealed that FireFTP is open source...located here:
https://github.com/mimecuvalo/fireftp
(So I submitted a new 'issue' there and asked about porting it to Chrome.)
I'm desperate, and recently test-drove Google's new Pixelbook.
(Sigh...nothing inspirational came of that...I give it one-thumb-down rating.
Here's my notes from that experience:
------------ Review notes of Pixelbook: ----------------------
Google didn’t think to include a USB-C to USB-A adapter. (A $2 item. e.g.)
https://www.amazon.com/Remax-USB3-1-Female-Adapter-Silver/dp/B01MCSRSKN/
That was my 'showstopper'...like a few other reviewers said...it's not well
thought out / matured. To me it feels more like a gimmick, than a product.
At a minimum, it rates my newest hashtag: #NRFPT (not ready for prime time).
I found no obvious way to disable the touchpad, when using a mouse.
In fact, no other reviewers expressed interest in using a mouse. (???)
Lastly, my favorite kind of Android apps are 'widgets', and I see no signs
that it has occurred to Google to allow Chrome-OS's desktop/background to
host any widgets.
Ok, I'm still in mumble-mode...and still in search of a FTP/SFTP GUI client for
the Chrome browser / Chrome-OS that is the quality of FireFTP.
Enable Linux(beta) on your chromebook. Then you can do whatever you want like on others linux machine.
A simple sftp connection command
sftp [user#]host
Enable linux and mount with sshfs
sudo apt install sshfs
then
sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 user#xxx.xxx.xxx.xxx:/remotedir localdir
or with key auth
sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,IdentityFile=~/.ssh/id_rsa user#xxx.xxx.xxx.xxx:/remotedir localdir
These will reconnect after resuming from sleep
I'm trying to figure out how to embed a running linux terminal on my webpage. For example, placing a image file of a ubuntu machine on my webpage so you can type just as if at your local machine. I don't really want to do so via ssh but my web development is limited so I'm looking for advice as well.
Thanks!
Here is from cisco net acad courses, this is the best way to describe it, a ubuntu box online that users can interact with
Reminder: Arch Linux uses pacman not apt-get
So I had an idea that I wanted to be able to leave my room and still see the progress of a download from my phone. I have looked for preexisting programs but have found none, so I decided to write a program myself.
the first step I took was reading the pacman documentation, to see if a function that could get the current download status was. I know there is a file I can check to see if exists
/var/lib/pacman/db.lck
which would tell me if there is a download
however I wanted to know more specifics on the download - progress and time remaining, name of download.
I have also found some GUI programs that use pacman and I was thinking of getting the source code to see if I could use some of that, but haven't found anything useful.
is there a way to find out the specifics about a current download, other than looking at the terminal that the command is running on?
Why overcomplicate things? Just install "screen" via pacman, and start the pacman update inside a screen.. And from your smartphone, use a SSH client to connect to your local machine and access that screen.
You could setup an ssh server on your host machine and connect to it using a terminal emulator on your phone (termux for example) and run whatever commands you like from there. This way you'll be able to view all terminal output from your phone quite seamlessly.