Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26

Thread: gksu on live cd But not installed

  1. #11
    Join Date
    Jun 2007
    Beans
    17,329

    Re: gksu-polkit

    Quote Originally Posted by philinux View Post
    I thought this was the preferred new method as described in synaptic.
    gksu-polkit

    Code:
    gksu-polkit gedit pathtofile
    Thanks - that works so that'll be the new way.., thought I'd tried it a while back & didn't work, maybe wrong syntax, whatever
    (not default installed so -

    sudo apt-get install gksu-polkit
    ect.
    gdebi will pull in gksu until that package is fixed, shifted here to use gksu-polkit & it seems to use it fine instead

    As far as gksu being on the image, that a bug that will be corrected at some point (ubiquity should use pkexec instead

  2. #12
    Join Date
    Dec 2010
    Location
    Salem, Oregon
    Beans
    49
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: gksu on live cd But not installed

    Quote Originally Posted by stoneguy View Post
    "And there's no excuse for the 64-bit framework working differently from the 32-bit one.
    That's the larger issue in my opinion.
    HP 17 Notebook, 8GB DDR3, A10-APU ATI Radeon HD 8650G

  3. #13
    Join Date
    Jun 2007
    Beans
    17,329

    Re: gksu on live cd But not installed

    Overall I like this better, for personal use can now add "org.gnome.gksu.spawn" to a .pkla & dispense with a password altogether

  4. #14
    Join Date
    May 2010
    Location
    uk
    Beans
    9,299
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: gksu on live cd But not installed

    Quote Originally Posted by Warren Hill View Post
    Some of the developers were surprised that users might edit config files with

    Code:
    gksu gedit path_to_file
    when

    Code:
    sudo vim path_to_file
    saves you two keystrokes. vim is very powerful but not something I would expect a casual user to be instantly comfortable with.
    This sounds like a developers joke or someone with the same sense of humour as me.

    Any experienced developer would not expect Joe public to use vim.
    Last edited by matt_symes; April 24th, 2013 at 03:52 PM.
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  5. #15
    Join Date
    Aug 2009
    Beans
    1,211
    Distro
    Ubuntu Development Release

    Re: gksu on live cd But not installed

    Quote Originally Posted by philinux View Post
    I thought this was the preferred new method as described in synaptic.

    gksu-polkit
    No, gksu-polkit is unmaintained with security bugs. See bug 1172339 for more info.

  6. #16
    Join Date
    Jun 2010
    Beans
    699

    Re: gksu on live cd But not installed

    Quote Originally Posted by Warren Hill View Post
    gksu is not the preferred way to run GUI applications as root any more. At least that's what I was told yesterday when I asked some of the developers in IRC yesterday.

    #ubuntu-dev on irc.freenode.net

    In the long term they want us to use pkexec instead or better still command line programs with sudo.

    Some of the developers were surprised that users might edit config files with

    Code:
    gksu gedit path_to_file
    when

    Code:
    sudo vim path_to_file
    saves you two keystrokes. vim is very powerful but not something I would expect a casual user to be instantly comfortable with.

    pkexec however is not trivial to use with GUI applications.

    You can install gksu in 13.04 however but it may be removed from future versions of Ubuntu.

    There is more information here on Ask Ubuntu

    In other words average Joe got scre*ed again and alternative fall short.

  7. #17
    Join Date
    Jun 2007
    Beans
    17,329

    Re: gksu on live cd But not installed

    Quote Originally Posted by jbicha View Post
    No, gksu-polkit is unmaintained with security bugs. See bug 1172339 for more info.
    Well then for 13.04 users gksu is still the solution (even though no dev's would ever use) when or if though don't want to use terminal editors or terminal commands, ect.

    Nothing like putting in replacements before removing the current & common method.
    (and if gksu-polkit is such a bad deal then why so late to remove from raring or earlier?

  8. #18
    Join Date
    Jun 2007
    Beans
    17,329

    Re: pkexec for naut & gedit

    Just as an aside -
    Decided to enable pkexec here for both nautilus & gedit, maybe properly, maybe not quite so. (not really worried.

    Previosly had been using sudo -i <command> but what the heck & also like a context menu options. (& occassional alt+f2.
    No sense getting into unless others wish to check out, ect., screen show some ex.
    Last edited by mc4man; April 28th, 2013 at 12:49 AM.

  9. #19
    Join Date
    Jun 2007
    Beans
    17,329

    Re: mucking in some pkexec policies

    per a messaged request, do at own risk & keep in mind someday maybe this will be done officially. (& possibly better, suggestions welcome
    1st. - create 2 new policies. I'm naming them as I saw fit to do.

    Code:
    sudo nano /usr/share/polkit-1/actions/com.ubuntu.pkexec.gedit.policy
    copy below, paste into nano, then on keyboard - ctrl+o, enter, ctrl+x

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE policyconfig PUBLIC
     "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
     "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
    <policyconfig>
    
      <action id="com.ubuntu.pkexec.gedit">
        <message>Authentication is required to run gedit as root</message>
        <icon_name>accessories-text-editor</icon_name>
        <defaults>
          <allow_any>auth_admin</allow_any>
          <allow_inactive>auth_admin</allow_inactive>
          <allow_active>auth_admin</allow_active>
        </defaults>
        <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/gedit</annotate>
        <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
      </action>
    
    </policyconfig>

    Code:
    sudo nano  /usr/share/polkit-1/actions/com.ubuntu.pkexec.nautilus.policy
    same deal, copy below, paste into nano, ctrl+o, enter, ctrl+x

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE policyconfig PUBLIC
     "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
     "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
    <policyconfig>
    
      <action id="com.ubuntu.pkexec.nautilus">
        <message>Authentication is required to run nautilus as root</message>
        <icon_name>system-file-manager</icon_name>
        <defaults>
          <allow_any>auth_admin</allow_any>
          <allow_inactive>auth_admin</allow_inactive>
          <allow_active>auth_admin</allow_active>
        </defaults>
        <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/nautilus</annotate>
        <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
      </action>
    
    </policyconfig>
    At this point (or maybe a log out/in) you'll have 2 terminal only commands -
    pkexec gedit
    pkexec nautilus

    To improve upon (adds alt+F2 & nautilus actions entries.

    In a bin in PATH, (/usr/bin, /usr/local/bin, or ~/bin), create 2 script files, make executable (I use ~/bin

    Name this one gedit-pkexec
    Code:
    #!/bin/sh
    pkexec "/usr/bin/gedit" "$@"
    Name this one nautilus-pkexec
    Code:
    #!/bin/sh
    pkexec "/usr/bin/nautilus" "$@"
    So now you can use in a terminal or from alt+F2
    gedit-pkexec
    nautilus-pkexec

    Adding to nautilus actions -
    screen 1 shows nautilus set up in command tab, screen 2 shows nautilus set up in the mimetype tab (set to only show on directories

    screen 3 shows gedit set up in command tab, screen 4, (optional), shows gedit in the mimetype tab

    As far as screen 4, for gedit I leave the default of all files(*), then add exclusions for mimetypes I Don't want the root gedit option to show, screen reflects excluding .c files, .cpp files, .h files, folders, & .so files

    screen 5 is just an example of how to set up the Action tab (in this case gedit

    Tips on nautilus actions -
    to show directly in context menu adjust nautilus-actions > Edit > Preferences, & disable "Create a root 'Nautilus-Actions' menu & may as well disable the option below "About Nautilus-Actions item"

    When adding or editing a mimetype or basename, after entering, press enter on keyboard while focus is still on the edit or it won't set.
    Last edited by mc4man; May 3rd, 2013 at 01:36 AM. Reason: missing sudo

  10. #20
    Join Date
    May 2010
    Location
    uk
    Beans
    9,299
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: gksu on live cd But not installed

    Nice post mc4man and required for anybody not comfortable with the terminal.

    Just one point, make sure ~/.bin is last and not first in your PATH.
    Last edited by matt_symes; April 30th, 2013 at 03:04 PM. Reason: typo
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

Page 2 of 3 FirstFirst 123 LastLast

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
  •