Posts

Showing posts with the label ubuntu

How to open a link on browser using ubuntu connected via sssh

How to open a link on browser using ubuntu connected via sssh I have an application which has to open a link on a browser in order to collect information from it [disclaimer: I don't want to use any headless browser]. When I run it on my local machine, everything works good; It opens the link on my default browser and does the work. now, I have deployed the application on my remote ubuntu machine (which I connect to via putty) but the xdg-open command won't work there. It has its problems like not having GUI server or echo $DISPLAY gives nothing (even tried the DISPLAY=:0 method). I want to be able to launch a browser at the end of the day and do my work. Then I was thinking it it is possible to open a browser on my local system via a command in my script on the server? What operating system are you running on the local system? Are you running an X server on the local system? Are you running putty with the option to forward X? – K...

Expo/GenyMotion throws “ADB server didn't ACK” when running project

Image
Expo/GenyMotion throws “ADB server didn't ACK” when running project I'm trying to set up a React Native project using GenyMotion and Expo on Ubuntu. However, when I click the 'Device' button in Expo to package the app onto the emulator, I get the following error in the Expo console: I initially tried to use React Native through Android Studio, with the inbuilt Android emulator, so I thought the issue might that my computer hasmultiple ADB versions (when I ran $ adb --start-server from the terminal, it'd run the Android Studio binary, not the GenyMotion one). So I: $ adb --start-server Android/Sdk/ $ adb --start-server $ sudo apt-get remove adb android-tools-adb Set the filepath for the Android SDK in GenyMotion to my GenyMotion Android SDK. But I'm guessing is the same as the default setting, so I don't know if I needed to do this? Removed all path variables related to Android Studio from my .bashrc file, including $ANDROID_HOME . (should I instead set $AN...

Error in connecting to DB: Error: Handshake inactivity timeout

Error in connecting to DB: Error: Handshake inactivity timeout I am running a node.js server which is using mysql DB. I was working fine but suddenly it has started throwing following error. Below is the stacktrace of the error: Error in connecting to DB: Error: Handshake inactivity timeout at Handshake.<anonymous> (/home/ubuntu/backend/node_modules/mysql/lib/protocol/Protocol.js:164:17) at emitNone (events.js:86:13) at Handshake.emit (events.js:185:7) at Handshake._onTimeout (/home/ubuntu/backend/node_modules/mysql/lib/protocol/sequences/Sequence.js:129:8) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) -------------------- at Protocol._enqueue (/home/ubuntu/backend/node_modules/mysql/lib/protocol/Protocol.js:145:48) at Protocol.handshake (/home/ubuntu/backend/node_modules/mysql/lib/protocol/Protocol.js:52:23) at PoolConnection.connect (/home/ubuntu/backend/node_modules/mysql/lib/Connection.js:130:18) at Pool.getConnect...

“Unable to find remote helper for 'https'” during git clone

“Unable to find remote helper for 'https'” during git clone I am unable to clone HTTPS repositories. I can clone SSH repos fine, but not HTTPS repos. I cannot test the GIT protocol since I am behind a corporate firewall. This is what I am trying to do: $ git clone https://github.com/nvie/gitflow.git Cloning into gitflow... fatal: Unable to find remote helper for 'https' I have so far tried the following (based on Google searches) apt-get build-deps apt-get ./configure --prefix=/usr --with-curl --with-expat ./configure --prefix=/usr --with-curl=/usr/bin/curl I have tried everything I can find on the internet with no luck. Can anyone help me? Git version = 1.7.6.4 OS = Ubuntu 11.04 Sorry to be obvious, it sounds like curl isn't installed. do curl --help and see if it is. – mike jones Nov 30 '11 at 19:09 ...

apache ubuntu forward ip to url name

apache ubuntu forward ip to url name I have some services running on an old computer running ubuntu server, and they resolve to an ip address and a port number, like 192.168.1.166:6789 brings me to that services web UI. I also have apache running on this box which is hosting another service so when i visit 192.168.1.166 WITHOUT the port number at the end, it brings me directly to that web UI for that service. I am a total newbie to linux so i have just been following tutorials to get this all setup and dont have a good grasp on what files to modify to accomplish this. So basically i want to setup apache (or anything else through ubuntu) that will forward 192.168.1.166:6789 to say "http://myService" or "http://myService.com" so its easier for non-technical people in the house to pull these web UI's up (not sure what format is valid for local urls, again i am a big time newbie with all this). Thanks! ...

Wildfly admin console cannot be open on Linux

Wildfly admin console cannot be open on Linux I installed wildfly 13 Final, edited standalone.xml , added users but I still can't open the admin console on Ubuntu 16. I try to get an access to the console remotely. I can connect from the local machine, though sudo curl -i http://localhost:9990/console/index.html HTTP/1.1 200 OK Connection: keep-alive Last-Modified: Thu, 31 May 2018 02:30:23 GMT X-Frame-Options: SAMEORIGIN Content-Length: 1241 Content-Type: text/html Accept-Ranges: bytes Date: Sun, 01 Jul 2018 20:51:16 GMT config - /etc/default/wildfly ################################################# # General configuration for the init.d scripts, # # not necessarily for WildFly itself. # # default location: /etc/default/wildfly # ################################################# ## Location of JDK JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/jre" ## Location of WildFly JBOSS_HOME="/opt/wildfly" ## The username who should own the process. JB...

Git Clone Repo to Ubuntu Server Key Error

Git Clone Repo to Ubuntu Server Key Error I am trying to clone my remote github repo to my EC2 Ubuntu server. When I run sudo git clone git@github.com:user/test.git sudo git clone git@github.com:user/test.git I have the message Cloning into 'test'... Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. What do I need to setup to get my github repo in my server? Are there keys I need to add to my Github account? My server? 1 Answer 1 GitHub isn't able to authenticate you.Your SSH key is not authorised. I would suggest you to get a look at the following links because this subject has already been treated: Link 1 Subject: GitHub Error Message - Permission denied (publickey) Link 2 Subject: Permission denied (publickey) Hope this helped ! By clic...

Django How to redirect only example.com to https and *.example.com to http?

Django How to redirect only example.com to https and *.example.com to http? I need http://example.com to redirect to https://example.com. Whereas http://www.example.com, http://api.example.com must not redirect i.e, subdomains need not redirect to https. I can understand the configuration here by looking at it. But don't know to move further. Please help me. My configuration so far is: sites-available/default.py upstream app_server { server unix:/home/django/gunicorn.socket fail_timeout=0; } server { server_name example.com www.example.com cloud.example.com api.example.com; listen 80; return 301 https://example.com$request_uri; } server { server_name example.com www.example.com cloud.example.com api.example.com; listen 443; # <- ssl on; # <- ssl_certificate /etc/ssl/example_cert_chain.crt; # <- ssl_certificate_key /etc/ssl/example.key; # <- #listen 80 default_server; #listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.html index.htm; ...