Results 1 to 14 of 14

Thread: QProcess Shell Command (Linux) Elevate Privileges?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #13
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: QProcess Shell Command (Linux) Elevate Privileges?

    Quote Originally Posted by m3rlin View Post
    Clicking on setup from their GUI is what they recognize, and they expect a certain behavior from the setup.
    Sure, nothing wrong with that. However, most installers on Windows do not elevate their priviledges themselves either, they usually also require that the user has permissions to install to a certain directory.

    Quote Originally Posted by m3rlin View Post
    I intend to satisfy most of those expectations, but cannot set symlinks in $HOME/Desktop/ pointing to /usr/share/icons/<icon-size>/apps directory without elevating permissions.
    As ChrisW67 said, if you can't write into the user's home directory then there is something seriously screwed with the user's system setup.

    Quote Originally Posted by m3rlin View Post
    I can also not save a desktop.entry file in /usr/shar/applications/ without ditto elevation.
    Of course, I would even consider that path "off-limits" to any 3rd party software installer. /usr is the path managed by the system itself. Like C:\Windows (or whatever it is on current versions).

    For that reason I actually prefer 3rd party software to come with an installer (instead of trying to have a package), because it not only allows users to install non-system wide, it allows users who are trusted by the sysadmin to install system wide in a way (e.g. /opt, /usr/local) that does not interfere with the system itself.

    Quote Originally Posted by m3rlin View Post
    Once files have been installed as superuser, I reset file permissions to local user with standard priviliges (don't forget my target audience is not Linux savvy - and doesn't know that files saved as superuser will have READ/WRITE/EXEC as superuser - which basically renders my program useless because they can't exec it with their credentials.
    Are you sure? Usually executables installed by root are owned by user root, group root (unless the mount settings override that) but are executable for all.

    Quote Originally Posted by m3rlin View Post
    So asking my target audience (non-linux-geeks) to elevate their privileges and protecting that user from installing files in places other than to which he himself has READ/WRITE permission is momentarily the best I can do. Unless you can suggest a better way...?
    Which is the same as on Windows, no? You have to right-click and "run as administrator" to be able to install into a global locations.

    Cheers,
    _

  2. The following user says thank you to anda_skoa for this useful post:

    m3rlin (7th April 2013)

Similar Threads

  1. How to run shell command after compile finished in pro file?
    By hashb in forum Installation and Deployment
    Replies: 1
    Last Post: 11th May 2011, 16:10
  2. Replies: 2
    Last Post: 14th March 2011, 21:55
  3. Shell command from Qt 4.5.2 by QProcess
    By Rajeshsan in forum Newbie
    Replies: 5
    Last Post: 21st December 2009, 17:03
  4. QProcess & linux shell characters
    By Ti_Thom in forum Qt Programming
    Replies: 4
    Last Post: 21st December 2009, 11:01
  5. running shell command from C++ code problem
    By alex chpenst in forum Qt Programming
    Replies: 4
    Last Post: 31st July 2008, 11:41

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.