I started using Ubuntu alongside Windows about 2 months ago. I've slowly been adding all of the programs that I use regularly to Ubuntu, so that I will eventually be able to do everything in Ubuntu that I could on my Windows machine.
One of the last things I need to migrate over is Popcorn Time. I have finally installed the application on Ubuntu, and I have finally gotten VPNAutoConnect installed as well. However, on Windows, I have one extra precaution set up: a messagebox that pops up when the Popcorn Time icon is clicked, which asks whether the VPN is connected or not. If Yes is clicked, then the application will execute. If No is clicked, it asks whether the user knows what a VPN is and then asks them to either connect it or get off my computer (this was useful because my roommate and girlfriend would sometimes watch movies when i was not home, so this was an extra safeguard to make sure they checked).
I want to make the same messagebox in Ubuntu. Here is the script I used in Windows:
returnvalue=msgbox("Is the VPN connected?",4,"VPN Authentification") If returnvalue=6 Then Dim objShell Set objShell = WScript.CreateObject( "WScript.Shell" ) objShell.Run("""C:\Users\*********\Downloads\Popcorn-Time\Popcorn-Time.exe""") Set objShell = Nothing Else If returnvalue=7 Then returnvalue=msgbox("Do you know what the VPN is?",4,"VPN Authentification") If returnvalue=6 Then x=msgbox("Please connect to the VPN",0,"VPN Authentification") Else If returnvalue=7 Then x=msgbox("Please get off my computer",0,"VPN Authentification") End if End if End if End if
How would I go about creating this same type of script in Ubuntu?