Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: How to make gnomesu command shorter?

  1. #1
    Join Date
    Sep 2014
    Location
    Shah Alam, Malaysia
    Posts
    68

    Default How to make gnomesu command shorter?

    In other distro/DE they have 'kdesu' 'sudo' 'gksu' (or whatever else) that basically allows a command to be executed temporarily with root privilege.

    But in Gnome (at least Gnome 3 in openSUSE) it is 'gnomesu' and I find 7 letters are annoyingly too long. gnomesu this gnomesu that. Too long.

    is there any shorter command? or way to make it shorter?

    (other than su)

  2. #2
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: How to make gnomesu command shorter?

    ln -s /usr/bin/gnomesu /usr/bin/hurpderp
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  3. #3
    Join Date
    Sep 2014
    Location
    Shah Alam, Malaysia
    Posts
    68

    Default Re: How to make gnomesu command shorter?

    Ooh its that simple actually. thanks.

    so I rename it to 'up'. Will it possibly conflict with any other existing important application (that i might install later)?

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,004

    Default Re: How to make gnomesu command shorter?

    Create a file .alias in your home directory and put a line like
    Code:
    alias g='gmomesu'
    in it.

    But I realy wonder how many times a day you are usuing this. Running things as root must be an exception in a normal stable system.
    Henk van Velden

  5. #5

    Default Re: How to make gnomesu command shorter?

    If you want to create an alias or create a link (soft/hard) of an executable or even a function, you should consider that the name you want to use is already existing in your PATH or the alias/function is already define.

    check for the aliases in your system

    Code:
    alias
    check for the functions in your system.

    Code:
    set
    check for an executable is in your PATH,

    Code:
    type -a «command»
    «command» can be ls,grep or any other command/executable you use.

    Code:
    help type
    for more info.

    The common mistake is create an alias, function, executable that is named test since it is a shell builtin according to

    Code:
    type -a test
    If you want to know which get executed first, the PATH executable or the builtin see.
    Code:
    man bash
    and look for COMMAND EXECUTION.
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

  6. #6
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,050

    Default Re: How to make gnomesu command shorter?

    On Tue, 30 Sep 2014 19:16:01 +0000, razirazo wrote:

    > Ooh its that simple actually. thanks.
    >
    > so I rename it to 'up'. Will it possibly conflict with any other
    > existing important application (that i might install later)?


    Possibly, it would be impossible to enumerate every possible executable
    you /might/ install and whether or not any given name you choose to use
    is going to conflict with it.

    Try it and see.

    Jim



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  7. #7
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,505
    Blog Entries
    3

    Default Re: How to make gnomesu command shorter?

    Quote Originally Posted by Miuku View Post
    ln -s /usr/bin/gnomesu /usr/bin/hurpderp
    I would prefer:
    Code:
    ln -s /usr/bin/gnomesu $HOME/bin/hurpderp
    That way, the alternative name is available only to me, and won't confuse all of the other users of the system (all zero of them, as it happens). It seems better to make such changes local rather than global.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How to make gnomesu command shorter?

    On 2014-09-30 21:16, razirazo wrote:
    >
    > Ooh its that simple actually. thanks.
    >
    > so I rename it to 'up'. Will it possibly conflict with any other
    > existing important application (that i might install later)?


    Open a terminal, type "up", then press tab twice. Then enter "su -", give password, and repeat the
    procedure.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" (Elessar))

  9. #9
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How to make gnomesu command shorter?

    On 2014-09-30 20:26, Miuku wrote:
    >
    > ln -s /usr/bin/gnomesu /usr/bin/hurpderp


    Let's improve it a bit :-)


    Make it:

    Code:
    ln -s /usr/bin/gnomesu /usr/local/bin/hurpderp
    Because it does not interfere with the system automatics (meaning: package udates/upgrades, easier
    maintenance, etc).


    If you wish to do it for a single user, then instead do:

    Code:
    ln -s /usr/bin/gnomesu ~/bin/hurpderp
    Where the "~" stands for your home directory, so you don't need to type it.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" (Elessar))

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How to make gnomesu command shorter?

    On 2014-09-30 21:16, hcvv wrote:

    > But I realy wonder how many times a day you are usuing this. Running
    > things as root must be an exception in a normal stable system.


    For that reason, what I do is open a terminal, and enter "su -", and leave it there... as I
    hibernate every day, it stays opens for weeks.

    Sometimes, from that xterm I open other xterms, which thus run as root as well. Sometimes I can have
    dozens of them. It is easier than starting several xterms and typing the password on each one.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" (Elessar))

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •