Page 16 of 18 FirstFirst ... 61415161718 LastLast
Results 151 to 160 of 175

Thread: Precise known bugs with workarounds

  1. #151
    Join Date
    Feb 2010
    Location
    Nr BrandsHatch, S'oaks UK
    Beans
    1,241
    Distro
    Lubuntu 13.04 Raring Ringtail

    Re: Precise known bugs with workarounds

    Hi!, Paddy Landau,

    Thanks for the tip, I had never tried 'gksudo', all the advice I had seen said use 'gksu'.

    You are right, 'gksudo nautilus' gives only a slight delay, but 7 screens of Gtk-WARNING messages when the window is closed.

    But 'gksudo nautilus /boot/grub' [for instance] gives no delay and no warning messages, only:
    Code:
    :~$ gksudo nautilus /boot/grub
    Initializing nautilus-gdu extension # Window opens: When closed:
    Shutting down nautilus-gdu extension
    :~$
    Chao!, bogan.
    "Better Solutions may bring Worsened Problems": After Lao Tse, b. circa 405BC. a contemporary of Confucius, who died circa 600BC.
    They did things differently in those days, apparently!!

  2. #152
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,266
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Precise known bugs with workarounds

    Quote Originally Posted by bogan View Post
    I had never tried 'gksudo', all the advice I had seen said use 'gksu'.
    gksu and gksudo are in fact the very same program, but the two commands respond differently. gksudo is gksu but in sudo mode. gksudo is equivalent to gksu --sudo-mode.

    The technical differences below are highlighted by the different values of three environment variables, as follows.
    Code:
    sudo:
        ${USER}       (target)    root
        ${HOME}       (unchanged)    /home/paddy
        ${PATH}       (target)    target user's path
    
    sudo -H
        ${USER}       (target)    root
        ${HOME}       (target)    /root
        ${PATH}       (target)    target user's path
    
    sudo su:
        ${USER}       (target)    root
        ${HOME}       (target)    /root
        ${PATH}       (unchanged)    your path
    
    gksudo (or gksu --sudo-mode):
        ${USER}       (target)    root
        ${HOME}       (target)    /root
        ${PATH}       (target)    target user's path
    
    gksu:
        Supposedly the same as gksudo, but there are unexpected
        results from some commands, e.g. find when using regex.
    Problems with WINE?
    Full Circle Magazine :: Confused "allot"? :: Cheap Linux stickers
    In my day, we had outdoors in which to run, play, and socialise. Now we have computers to do those.

  3. #153
    Join Date
    Aug 2009
    Beans
    3,480
    Distro
    Ubuntu Development Release

    Re: Precise known bugs with workarounds

    Quote Originally Posted by Paddy Landau View Post
    Don't use sudo for GUI programs.

    Use gksudo (rather than gksu).

    It's perfectly fine to use gksudo nautilus. Don't worry about the messages in the terminal; they are not important. If you use Alt+F2, you won't see them anyway.

    I personally have no delay when using gksudo nautilus.
    Gksudo is is just symlinked to gksu.

    Enter this in terminal:
    Code:
    ls -l /usr/bin/gksudo
    I had wondered what the difference was between gksudo and gksu myself.

    http://askubuntu.com/questions/21033...ksudo-and-gksu
    Check Java Version | Install Java via WEB UPD8 PPA
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Ubuntu 12.04 | 14.04 | 14.10 Mate | 15.04 Gnome | Mint 13 | Mint 17 | Windows 7 | All 64 bit

  4. #154
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,266
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Precise known bugs with workarounds

    Quote Originally Posted by Cavsfan View Post
    Gksudo is is just symlinked to gksu.
    Yes, I am aware of that. However, the program obviously looks at how it was called, because the two do give different results.

    See man gksu to read about the differences. gksu uses su as its back-end, while gksudo uses sudo (unless you force it otherwise with --su-mode or --sudo-mode).
    Problems with WINE?
    Full Circle Magazine :: Confused "allot"? :: Cheap Linux stickers
    In my day, we had outdoors in which to run, play, and socialise. Now we have computers to do those.

  5. #155
    Join Date
    Aug 2009
    Beans
    3,480
    Distro
    Ubuntu Development Release

    Re: Precise known bugs with workarounds

    man gksu says this:

    Notice that all the magic is done by the underlying library, libgksu. Also notice that the library will decide if it should use su or sudo as
    backend
    using the /apps/gksu/sudo-mode gconf key, if you call the gksu command. You can force the backend by using the gksudo command,
    or by using the --sudo-mode and --su-mode options.

    This appears to me to indicate that when using gksu the underlying library libgksu determines if it should use su or sudo as backend.
    Unless you force the backend by using gksudo.

    Not meaning to argue here just wanting a clear explanation and the above conflicts with what you are saying at least I think it does.
    Check Java Version | Install Java via WEB UPD8 PPA
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Ubuntu 12.04 | 14.04 | 14.10 Mate | 15.04 Gnome | Mint 13 | Mint 17 | Windows 7 | All 64 bit

  6. #156
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,266
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Precise known bugs with workarounds

    Thanks for the extra info, Cavsfan.

    The important thing is to use gksudo with Ubuntu unless you have a specific reason for using gksu.
    Problems with WINE?
    Full Circle Magazine :: Confused "allot"? :: Cheap Linux stickers
    In my day, we had outdoors in which to run, play, and socialise. Now we have computers to do those.

  7. #157
    Join Date
    Aug 2009
    Beans
    3,480
    Distro
    Ubuntu Development Release

    Re: Precise known bugs with workarounds

    Quote Originally Posted by Paddy Landau View Post
    Thanks for the extra info, Cavsfan.

    The important thing is to use gksudo with Ubuntu unless you have a specific reason for using gksu.
    You are welcome Paddy. Every once in a while I stumble across something useful.
    Doesn't the above say that when you use gksu, the library decides if su or sudo is used?

    I looked in gconfig editor in /apps/gksu and see that sudo-mode is checked.

    According to that link I provided both commands are exactly the same.
    The big thing that is mentioned over and over is not to use sudo on GUI, but to use gksu.

    Here is a post from 2006 that says they are exactly the same and nothing appears to have changed since then.

    http://ubuntuforums.org/showpost.php...3&postcount=14

    I cannot find anything that supports there is a difference between gksu and gksudo.
    Check Java Version | Install Java via WEB UPD8 PPA
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Ubuntu 12.04 | 14.04 | 14.10 Mate | 15.04 Gnome | Mint 13 | Mint 17 | Windows 7 | All 64 bit

  8. #158
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,266
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Precise known bugs with workarounds

    Quote Originally Posted by Cavsfan View Post
    According to that link I provided both commands are exactly the same.

    I cannot find anything that supports there is a difference between gksu and gksudo.
    From the manual:
    gksu is a frontend to su and gksudo is a frontend to sudo.
    This is unless you explicitly use --su-mode or --sudo-mode.

    So, they are different to the extent that su and sudo differ. I have shown some differences in post #152, but I would like to know what other differences there are.

    In theory, gksu and gksudo on Ubuntu should be identical. In practice, they are different. The difference that I have found is subtle but can lead to disastrous results; specifically, regex commands can give unexpected results. I found out the hard way when I used gksu find … -regex … -delete, and ended up deleting some system files. See a discussion that I raised on this (at the time of writing, I had not yet realised that I had deleted system files).
    Problems with WINE?
    Full Circle Magazine :: Confused "allot"? :: Cheap Linux stickers
    In my day, we had outdoors in which to run, play, and socialise. Now we have computers to do those.

  9. #159
    Join Date
    Aug 2009
    Beans
    3,480
    Distro
    Ubuntu Development Release

    Re: Precise known bugs with workarounds

    Paddy, I am not trying to argue with you but, I still do not find any proof that there is a difference between a file and a symbolic link to that very same file.

    Code:
    cavsfan@cavsfan-MS-7529:~$ ls -l /usr/bin/gksudo
    lrwxrwxrwx 1 root root 4 Sep  4 10:11 /usr/bin/gksudo -> gksu
    cavsfan@cavsfan-MS-7529:~$
    They act as the same file. The only difference I can find is "Symbolic links may refer to directories and may cross file system boundaries."

    http://manpages.ubuntu.com/manpages/precise/man7/symlink.7.html

    BTW, is there any workaround to get a restart option in the drop down list when you click on the gear in the top right corner as I mentioned in post #147?

    I will also mention that I did a clean install of 12.04.1 and it did not come with Gnome Classic and with the way that was working for me,
    I am not even going to install it. I'll just stick with Unity and like it.
    Check Java Version | Install Java via WEB UPD8 PPA
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Ubuntu 12.04 | 14.04 | 14.10 Mate | 15.04 Gnome | Mint 13 | Mint 17 | Windows 7 | All 64 bit

  10. #160
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,266
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Precise known bugs with workarounds

    Quote Originally Posted by Cavsfan View Post
    Paddy, I am not trying to argue with you but, I still do not find any proof that there is a difference between a file and a symbolic link to that very same file.
    Cavsfan, I've already given you the proof more than once. You can choose to disbelieve it, or you can do it yourself and see the results with your own eyes.

    You are right that gksudo is just a symbolic link to gksu. But you are wrong that gksu is unable to tell the difference.

    A program is able to tell how it was called. Therefore, if you call gksu using gksudo, it is able to tell that it was called as gksudo and not gksu. It's a trivial thing to do and I myself have scripted this sort of behaviour before. The program gksu simply checks how it was called, and adjusts its behaviour accordingly unless overridden with --su-mode or --sudo-mode.
    Problems with WINE?
    Full Circle Magazine :: Confused "allot"? :: Cheap Linux stickers
    In my day, we had outdoors in which to run, play, and socialise. Now we have computers to do those.

Page 16 of 18 FirstFirst ... 61415161718 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
  •