@mamaji77111 Yes, true. I had to address all those issues to get the VPN install script to work again.
Posts
-
RE: How to install PIA VPN on UT (Working!)
-
RE: How to install PIA VPN on UT (Working!)
@Daryl What is it you are trying to install? And what OS are you trying to install it on?
In a previous post you made it looked like you were taking instructions from the PIA website that was designed for Ubuntu Desktop and trying to install it on Ubuntu Touch.
-
RE: Automatically Delete Unauthorized Cookies from Morph upon Close
@domubpkm I don't use the private browsing feature in Morph. But what I understand is it will delete not only all cookies, but your history as well. If you run Morph in regular mode with this script, you can keep the cookies with sites you trust and all your history, too.
Using this script would be similar to the Manage Exceptions feature in the Firefox Security and Privacy settings. There you can “Allow” certain websites to leave cookies while you have ticked a checkbox “Delete cookies when Firefox is closed”.
So, you can login quicker with sites you trust and also quickly find that page you visited a couple days ago in your history.
-
Automatically Delete Unauthorized Cookies from Morph upon Close
I wrote a bash script that automatically deletes all cookies in the Morph browser with an sqlite3 command (except the domains you've told it to keep) each time you close the browser.
The companion cookies-delete.conf file will auto start the script for you each time you boot UT.
Originally developed on Ubuntu Touch 16.04 Xenial OTA-25 stable with Pixel 3a hardware. You can download them here:
https://www.dropbox.com/s/d4k5hf1pfj8igys/cookies-delete.sh
https://www.dropbox.com/s/1byqwvbdbkps0n9/cookies-delete.confThe instructions are near at the top of the script. Code improvement suggestions? Let me know. If anyone gets inspired to make a full UT App with it, please do!
-
RE: MTP not working on Pixel 3a XL after OTA-25 update
@zlamalp This is not a solution for MTP, but a work around on the adb issue. I got this from some UT community members on Telegram.
Shut down the phone, then press volume down and power to get into recovery mode. From there, adb still works. Do
adb shell mount /data
You will find your data inside the data directory and can push and pull, run backups, etc.
-
RE: My MI A2 is no longer recognised by my computer..
@MrT10001 Yes. I rebooted many times. Two Ubuntu Desktops, three USB cables, toggled Developer Mode, dmesg registers nothing with my UT phone, unless in Recovery Mode. That's the only situation where the USB cable and ADB works. It seems something in the UT OS has disabled MTP.
Later today I found this posting:
https://forums.ubports.com/topic/8849/mtp-not-working-on-pixel-3a-xl-after-ota-25-updateIt appears to be a recent issue with UT OTA-25.
Thank you for any assistance you can offer.
-
RE: MTP not working on Pixel 3a XL after OTA-25 update
@zlamalp I'm having the same problem with Pixel 3a. My records state I updated to OTA-25 on March 30. I didn't notice I couldn't connect via USB cable to do backups until today.
I did notice my computer can recognize my UT phone via USB and ADB if I put it in Recovery Mode only. So, it's not a hardware or cable problem.
Running
sudo dmesg -w
shows nothing when I plug and unplug my UT phone via USB. Other USB devices do register.
I also posted this issue on https://t.me/ubports
-
RE: My MI A2 is no longer recognised by my computer..
@Voltcab @arubislander I'm having the same two problems today with my Pixel 3a running the latest version of UT stable. Two Ubuntu Desktops and three USB cables cannot see my UT phone or connect via ADB.
However, I noticed I can connect via ADB in Recovery Mode only. So the USB cables, ports and ADB are fine.
I also noticed my UT is always in Developer Mode after I turn it off and reboot. I tried the instructions above regarding UT Tweaks Tool and my computers still cannot see my UT phone.
I'd really like to be able to ADB and use push/pull to run backups, but for now my hands are tied. Anyone figure out what's causing this?
-
RE: How to install PIA VPN on UT (Working!)
@Daryl That page on the PIA website gives instructions on how to install openvpn on Ubuntu Desktop, not Ubuntu Touch. They also have a simple app for Desktop that works well.
For Ubuntu Touch, try what I posted here.
That's what works for me with Ubuntu Touch 16.04 stable.
-
RE: How to install PIA VPN on UT (Working!)
@wgarcia About six years ago I installed Private Internet Access's OpenVPN script on my Ubuntu Touch device. Over time I noticed certain VPN connections stopped working. PIA had retired or changed some IP addresses for certain VPN locations.
I ran a search today and found about 4 pages on PIA's website regarding OpenVPN. Some of the pages have links to support files that no longer work.
https://helpdesk.privateinternetaccess.com/kb/openvpnThis page appears to be the most recent:
https://helpdesk.privateinternetaccess.com/kb/articles/linux-setting-up-manual-openvpn-connection-through-the-terminalThe old PIA OpenVPN script from about six years ago had a certain URL in it that allowed it to fetch the latest VPN server IP addresses from the PIA website. A few years ago, PIA began retiring those old servers and released a new Wireguard script. Inside that script, the URL where the new server IP addresses are to be fetched is now different.
This may help explain why some PIA VPN server locations don't work.
-
RE: How to install PIA VPN on UT (Working!)
@daryl I'm not 100% sure if PIA's VPN script will work with that Aquarius hardware. I have installed and ran it on three: Nexus 4, Nexus 5 and Pixel3a. Here's the current incarnation of the script as I use it and instructions for how to install it.
https://www.dropbox.com/s/7g0xfiam53ytf61/pia-nm-install.txt
https://www.dropbox.com/s/dd4oj7dd2o05vv9/pia-nm.shPlease post your results and let the community know if it works with your hardware, too.
-
RE: VPN Connection to FritzVPN
@marc123454321 I wrote a script that makes open VPN connections for PrivateInternetAccess.com and developed and tested it on a Nexus 4. It works well. I see you are using a different VPN provider so I don't think it will work. If anyone needs such a script for their UT device, let me know and I can post it.
-
RE: How to install PIA VPN on UT (Working!)
When running the script, you may get a message that the script was not able to write to /etc/openvpn. If so, do this before you execute the script:
sudo -i sudo mount -o remount,rw / sudo chmod 777 /etc/openvpn exit
After you run the script, set permission back:
sudo chmod 755 /etc/openvpn
-
RE: How to install PIA VPN on UT (Working!)
Here's another nice customization I made. Search for this in the pia-nm.sh script:
password-flags=1
change it to:
password-flags=0
Search for:
[ipv4] method=auto
and just below it, add this:
[vpn-secrets] password=$PASSWORD
Near the top of the script define your PIA password like so:
PASSWORD=XXXXXX
Where XXXXXX is your PIA password. Now, when you activate a VPN connection, it wont prompt you for your PIA password. You can connect faster.
-
RE: How to install PIA VPN on UT (Working!)
@arubislander @rasbeer I was pretty sure I forgot something.
My copy of pia-nm.sh is old and doctored. Look for this line:
servers=$(python2.7 <<EOF
and change it to:
servers=$(libertine-launch -i vpnprogs python2.7 <<EOF
Where "vpnprogs" is the name of your container. Also, remove these lines:
if ! dpkg -l python2.7 | grep -q '^ii'; then installpkg+=(python2.7) fi
Search through the script for any program you installed via Libertine and prefix it's execution with:
libertine-launch -i vpnprogs
@wgarcia Yeah, we're jealous. Years ago I ran the pia-nm.sh script as-is. After a certain UT upgrade I couldn't install programs from the terminal any more and had to use Libertine.
-
How to install PIA VPN on UT (Working!)
If you have been using Private Internet Access (PIA) as your VPN service on with Ubuntu Touch with their OpenVPN scripts, you may have noticed they started phasing their old servers out last year and only one was available this year until about the end of February.
https://www.privateinternetaccess.com/pages/client-support/ubuntu-openvpnAfter days of troubleshooting I figured out how to get it to work again and would like to share it with the UT community.
PIA has this shinny new application for your Ubuntu desktop. And it works fine. They also offer new VPN scripts designed for linux:
https://www.privateinternetaccess.com/helpdesk/kb/articles/manual-connection-and-port-forwarding-scripts
But the new scripts don't work on UT. One reason is the version of curl available on UT is older. Another reason is write permission problems as their newer scripts don't anticipate ARM architecture. Another reason is how we have to prefix all calls of Libertine installed programs in their script with libertine, which is a pain.Here's how to install and get PIA VPN service working on your UT phone. Specifically, I'm using Nexus 4.
-
Follow their old instructions (loosely) using their older pia-nm.sh script.
https://www.privateinternetaccess.com/pages/client-support/ubuntu-openvpn -
In a previous UT update, libertine is required to install other programs. Can't use “sudo apt-get install”. So you must install them through Libertine in your System Settings, or with the terminal:
sudo adb shell libertine-container-manager create -i vpnprogs libertine-container-manager install-package -p uuid-runtime curl network-manager-openvpn-gnome python2.7
- Run the pia-nm.sh script.
sudo bash pia-nm.sh
It will install the VPN files at: /etc/NetworkManager/system-connections
- Next, we need to change the IP addresses in the system-connection files. The newer scripts have this URL embedded with the new server IP addresses: https://serverlist.piaservers.net/vpninfo/servers/v4
Locate a server at the above URL, for example, after “California”. You will find:
{"ovpnudp": [{"ip": "143.244.50.86",This is their IP address for a UDP connection.
- Last, edit your VPN system connection files like so:
cd /etc/NetworkManager/system-connections sudo nano 'PIA - US California (client update needed)'
Change this line:
remote=us-california.privateinternetaccess.com
to:
remote=143.244.50.86
Repeat for a couple other connections if you like.
Delete any unused VPN files from system-connections that you wont be using.- Reboot your phone, and you should see the VPN connections listed and they should work. I'm sure I forgot something. If you have a question, let me know.
-
-
RE: apparmor picture_files_read
@AppLee Okay, I tried it. I did "clickable create" and selected the C++ binary option.
When I run "clickable" the main.cpp file calls qml/Main.qml and it says "Hello World!" on my touch device.
Now, I tried to swap the code in Main.qml for this code here:
https://api-docs.ubports.com/sdk/apps/qml/Ubuntu.Content/ContentHub.html
The code just below "Example usage for importing content:"When I run "clickable", clickable reports: /bin/sh: 1: Syntax error: "(" unexpected
Is there a mistake in the documented code? What do I need to put in the Main.qml file so it brings up the content hub?
Thanks!
-
RE: SOLVED: How do I get my app to launch the web browser?
So, just to recap, here's how to make a C++ app launch the web browser in Ubuntu Touch:
Step 1:
You need to add/change these in your CMakeLists.txt:find_package(Qt5 COMPONENTS Core Gui) target_link_libraries(YOURPROJECTNAMEHERE ... Qt5::Core Qt5::Gui)
Step 2:
Put these headers near the top of main.h/main.cpp:#include <QGuiApplication> #include <QDesktopServices> #include <QUrl>
Put this at the top of main():
QGuiApplication *app = new QGuiApplication(argc, (char**)argv);
Near the end of main(), replace "return 0;" with this:
return app->exec();
Step 3:
Somewhere in your C++ code, when the app user clicks on your button, call this:QDesktopServices::openUrl(QUrl("https://forums.ubports.com"));
-
RE: SOLVED: How do I get my app to launch the web browser?
@dobey I made the simplifications to the CMakeLists.txt file that you suggested. It's working, thank you!
In the last part of your previous message, you wrote:
I'm also not sure if you need a
QApplication
thread running at all for this. If possible, it's probably better to avoid having to integrate the Qt main loop and SDL. If it is needed though, it would probably be better to useQCoreApplication
orQApplication
instead, if possible.I think you meant something other than
QApplication
the second time you mentioned it. Which library instead ofQApplication
?I tried it with these in main():
QCoreApplication a(argc, args); return a.exec();
Although clickable compiled and it ran, QDesktopServices::openUrl() did not work at all. The browser would not launch.
-
RE: SOLVED: How do I get my app to launch the web browser?
@dobey You are right. I was testing QDesktopServices::openUrl when you posted this.
My C++/SDL app launches the morph web browser. Here's how to make a C++/SDL app launch the web browser in Ubuntu Touch:
Step 1:
You need to add these to your CMakeLists.txt:
(You may have more than one CMakeList.txt file and some of the code lines below will go in different CMakeList.txt files.)(Add these lines below after "project(...)" and "cmake_minimum_required(..)")
find_package(Qt5Core) find_package(Qt5Qml) find_package(Qt5Quick)
(Add this line below after "execute_process(... OUTPUT_VARIABLE ARCH_TRIPLET ...)" )
set(QT_IMPORTS_DIR "lib/${ARCH_TRIPLET}")
(Add this line below after "add_executable(... main.cpp ...)" )
qt5_use_modules(YOURPROJECTNAMEHERE Gui Qml Quick QuickControls2)
Replace YOURPROJECTNAMEHERE with your project name.
Step 2:
Put these headers near the top of main.h/main.cpp:#include <QGuiApplication> #include <QDesktopServices> #include <QUrl>
Put this at the top of main():
QGuiApplication *app = new QGuiApplication(argc, (char**)argv);
Near the end of main(), replace "return 0;" with this:
return app->exec();
Step 3:
And now for the magic... Somewhere in your C++ code, make your link:if ( event.type == SDL_FINGERDOWN ) { QDesktopServices::openUrl(QUrl("https://forums.ubports.com")); }
If you have any comments, suggestions or ways to improve this code, let me know. Thank you all for your help.