Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Questions re: my first python app (GUI, cross-platform, admin/root-level commands)?
I'm brand new to python and for my first app ("StaySafe"), I want to pop up a randomly chosen message whenever the user launches their web browser. (Details below if you're interested in reading them.)

My intention was to rename the existing executable (e.g. /usr/bin/google-chrome-stable becomes /usr/bin/google-chrome-stable-staysafe) then replace it with my script (renamed using the original executable's filename - /usr/bin/google-chrome-stable). So that any existing menu item, desktop icon, etc. will still launch the browser - but only after displaying a StaySafe reminder message.

I initially tried to write this as a shell script for Linux but you can't execute sudo commands (which are necessary if you're going to be messing around with files in /usr/bin) in a shell script and there's no good way around that limitation. That means I can't make a simple installer which violates one of my criteria. Will I have the same problem with a python script? Or can I somehow tell it to run certain commands as root/Administrator, prompting the user for sudo authentication?
I was planning to use easygui for my messages but it looks like I can't display a message with an image off to the left or right of the text. Is there an alternative that will give me that capability that's just as easy to use? (I'm worried about getting bogged down in the intricacies of tkinter.)
If I want it to be easily installable by novice users, going into installation mode the first time it's run, I'll want it to be executable... what do I need to do/know to make a cross-platform (Windows, Mac, and Linux) executable?
Aside from the click to install/run aspect, how do I make it cross-platform when Windows, Mac, and Linux all keep their executables in different places?

Many thanks for your time and consideration.

TGM StaySafe - A simple program to help keep older folks safe from scammers online

General Concept - when any installed web browser is launched, display one of several randomly chosen messages to remind the user that a phone call from a stranger and/or a web page (telling them that their computer has a problem) is always a scam... to never allow a stranger to remote in to their computer, etc.

* Include a simple installer that a novice user is capable of running without assistance.
* Create a .cfg/.ini file that it can read from/write to.
* Use GUI messages that incorporate images (for branding).
* Keep a count (in the cfg file) of the number of reminders the user has seen.
* Give users an option to disable reminders for a day, 3 days, a week, or permanently disable them.
* Automatically notify me by email when a user permanently disables reminders.
* Cross-platform - works in Windows, Mac, and Linux

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  how to get PID's of linux commands executed through python modules? Manikandan_PS 4 318 Mar-12-2020, 07:16 AM
Last Post: Manikandan_PS
  Python script dioesn`t run all commands exploit123 5 418 Sep-25-2019, 03:15 PM
Last Post: snippsat
  Python installation to folder. No admin rights Toug19 3 403 Sep-19-2019, 11:40 AM
Last Post: DeaD_EyE
  Generate String Only Unique to That Platform firesh 2 335 Sep-10-2019, 09:36 PM
Last Post: firesh
  how do i write a cross-platform relative file path? pseudo 2 408 Aug-23-2019, 05:07 PM
Last Post: ThomasL
  unable to pass a input after changing the user from root to non root using python avinash 3 695 Apr-08-2019, 10:05 AM
Last Post: avinash
  How to cross compile python for ARM ? pankaj 4 1,725 Mar-06-2019, 05:59 AM
Last Post: pankaj
  What are ways of pointing cross-compiled origin source line for python? wyvogew 2 685 Feb-02-2019, 03:16 PM
Last Post: wyvogew
  New to Python: Looking to run WMI/WMIC Commands from Python ForensicPython 3 4,266 Jan-03-2019, 12:58 PM
Last Post: h3xus_
  python cross platfrom FILE IO shift838 1 670 Nov-18-2018, 06:48 PM
Last Post: ichabod801

Forum Jump:

Users browsing this thread: 1 Guest(s)