• Re: Where is my Brave executable

    From Dan Purgert@21:1/5 to Arbol One on Mon Dec 23 12:40:02 2024
    On Dec 22, 2024, Arbol One wrote:
    Hello.

    In my Debian 12, I used snap to install Brave. To select it as browser in Netbeans I need to know the location of the executable.
    Does anyone know the directory for the Brave executable?

    Assuming you installed it from *deb package, I'd imagine "/usr/bin".

    --
    |_|O|_|
    |_|_|O| Github: https://github.com/dpurgert
    |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEE3asj+xn6fYUcweBnbWVw5UznKGAFAmdpSIYACgkQbWVw5Uzn KGCH2A//RKutLqwoWfxq3OizFqURtC3jSsDz/fBmGYTOjZ3MpAGE3KfMUIwD/LDo 8nE2FwNxggjZ3x5DfiWqzWZxAtiW1SqbJcySouiFv28t+QTf9WDwolMVw3q9HM6t LndYElXqAULS3Jd5OwdX+3oJYbA+Dl1fdZrFqDafzgE6St5qlWbBshAIVDEA/uF1 tUQF+5VKCDVcVOqjLdo+YjaHFB/qWxM7mhDOWZPC9ZKOfEiCskxxZV6pXE49Gc0P yEKNy3pUm0bOQhxZTfJ2pXoIFqtkxN08+txiJKEV6FCuXcxDSZ/OiJ3Qc5OuhbOU ZN9kjuiVmtLgEG4cujT12WN5eHz3oeclo5k7GVsSFUhrh0ICgSfokPjZAuGVZ6yj bgJ/AMZdNuNidv5cWuuzZc12dhqPu7VYGyC7wDgknFplkkl8L5twWoJAERPcYber OOxx+sY3L717Y5oKEO6lc6asseHE9J5qeVnSZCV5pvNxU7Rkvuge1Jf4D4UdBfe2 JN1/FYiVvZeIYVz/M7qEwbPzW2ANePoEr+11729ZQKDDBBk6hDokX/ZjjSzjzuNa 7HjhdHYN8l7gGW8VaiUXIBNl86OCzft/ztRxzVeXsWRHcWWR46MA9RR2hqghp1Jc x0f/XGa1v0jwxDi2TTEGOzq18jWg/0+tHPwZ8UZvreanc6lcJqQ=
    =A3cB
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Us
  • From Greg Wooledge@21:1/5 to Greg Wooledge on Mon Dec 23 13:50:01 2024
    On Mon, Dec 23, 2024 at 07:17:49 -0500, Greg Wooledge wrote:
    1) Verify that "snap run brave" is the right invocation by typing
    that into a shell.

    2) If that's working, then create a shell script:

    mkdir -p ~/bin
    printf '#!/bin/sh\nexec snap brave run\n' > ~/bin/brave
    chmod 755 ~/bin/brave

    Actually, you may need to be able to pass additional arguments to the
    browser, so:

    mkdir -p ~/bin
    printf '#!/bin/sh\nexec snap brave run "$@"\n' > ~/bin/brave
    chmod 755 ~/bin/brave

    That should be more flexible.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Dan Purgert on Mon Dec 23 13:20:01 2024
    On Mon, Dec 23, 2024 at 06:24:56 -0500, Dan Purgert wrote:
    On Dec 22, 2024, Arbol One wrote:
    In my Debian 12, I used snap to install Brave.

    Does anyone know the directory for the Brave executable?

    Assuming you installed it from *deb package, I'd imagine "/usr/bin".

    I'm imagining that since snap is involved, it's some kind of magical incantation, like "snap run brave". In other words, whatever thing
    you're trying to configure to run this program had better be able to
    pass arguments, not just take a single program name.

    If the thing you're configuring can only take a single program name
    and no arguments, then:

    1) Verify that "snap run brave" is the right invocation by typing
    that into a shell.

    2) If that's working, then create a shell script:

    mkdir -p ~/bin
    printf '#!/bin/sh\nexec snap brave run\n' > ~/bin/brave
    chmod 755 ~/bin/brave

    3) Now tell the thing you're configuring that your browser is
    /home/yourusername/bin/brave (don't try to use a tilde there).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Owlett@21:1/5 to Jeffrey Walton on Mon Dec 23 14:00:01 2024
    On 12/23/24 4:39 AM, Jeffrey Walton wrote:
    On Mon, Dec 23, 2024 at 4:12 AM Arbol One <ArbolOne@hotmail.ca> wrote:

    In my Debian 12, I used snap to install Brave. To select it as browser in Netbeans I need to know the location of the executable.
    Does anyone know the directory for the Brave executable?

    `command -v brave`.

    Is 'command' documented somewhere?


    Jeff



    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Purgert@21:1/5 to Greg Wooledge on Mon Dec 23 14:00:01 2024
    On Dec 23, 2024, Greg Wooledge wrote:
    On Mon, Dec 23, 2024 at 06:24:56 -0500, Dan Purgert wrote:
    On Dec 22, 2024, Arbol One wrote:
    In my Debian 12, I used snap to install Brave.

    Does anyone know the directory for the Brave executable?

    Assuming you installed it from *deb package, I'd imagine "/usr/bin".

    I'm imagining that since snap is involved, it's some kind of magical incantation, like "snap run brave". [...]

    Jeeze, I'm blind. Totally didn't even *register* the bit about it being installed as a snap package.


    --
    |_|O|_|
    |_|_|O| Github: https://github.com/dpurgert
    |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEE3asj+xn6fYUcweBnbWVw5UznKGAFAmdpXj8ACgkQbWVw5Uzn KGCn6RAAocbTMHnZS6Bqz/WG7cijnr5ha9agW+0BtFaqupCZIsmFpENVjzWR9WWA MaC8/bwRGc/PIUzd9bK8mZCOnQWHn88qB1Zxqbh9VgjM0AW/1RwWVrGbWnkMwG5x cb4FWXPR9mhg8XbUXdEvwO9OtYRB8wjo4Q63kVMqH/pIQtWN0QxnfxLTPO/ooW1A N4dpOLdaQooTgtqbGbE2FNPJgyLLbcZ3KBs+g2Zpo+DVG3WAmM2KpNx7LTz2QGmd F8VeXwjKPwJlSjJj7utH6lMYUaz+T0ihlAT0DltZ86le/4DKd94xOqnE5T/+7qhZ hnJqUyMZTpAT/XbUBy+5cjUTkUMWcLLEun9yOx0rFxfvE8ZjL+/4ikXiV//zh9oF CpDn6EPLuBNkGvzLH+39w4tP8i0MF19PKBRWZ3RkRePeeOVG4Kf7Y3vxmdpTEQhL mcW3XG+lkO6FuIXkX1GctdZYY4f/u3OsQoNIeIxYRAte34i1czrpnM9+cYBwu/qo u1KQG/ECn5NEDIFWcUybULBKzK2S43ln3Bzrw4AxTNg5oUZh30t/0xdEk2ABNuTe sHuj7S0UFnzUmZPJzyRwNHF62/1w+o4X6xWVvHmvKG3eKNW7FRz4ynn23NawQ4MP NKt65+qlUg4mBNfbL88tCwBwhB2107W9yKjIWsPhm1KDM3y2nIg=
    =x6Iv
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Us
  • From George at Clug@21:1/5 to All on Mon Dec 23 23:30:01 2024
    On Monday, 23-12-2024 at 23:56 Richard Owlett wrote:
    On 12/23/24 4:39 AM, Jeffrey Walton wrote:
    On Mon, Dec 23, 2024 at 4:12 AM Arbol One <ArbolOne@hotmail.ca> wrote:

    In my Debian 12, I used snap to install Brave. To select it as browser in Netbeans I need to know the location of the executable.
    Does anyone know the directory for the Brave executable?

    `command -v brave`.

    Is 'command' documented somewhere?

    Shows how much about Linux I know, I had never previously heard about the command called command.

    An Internet search was not great since "command" is such a common term, however I managed to find some info using the usual Linux 'get help' options. Maybe there is more detailed info out there somewhere?

    $ man command
    No manual entry for command

    $ command --help
    command: command [-pVv] command [arg ...]
    Execute a simple command or display information about commands.

    Runs COMMAND with ARGS suppressing shell function lookup, or display
    information about the specified COMMANDs. Can be used to invoke commands
    on disk when a function with the same name exists.

    Options:
    -p use a default value for PATH that is guaranteed to find all of
    the standard utilities
    -v print a description of COMMAND similar to the `type' builtin
    -V print a more verbose description of each COMMAND

    Exit Status:
    Returns exit status of COMMAND, or failure if COMMAND is not found.





    Jeff






    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From eben@gmx.us@21:1/5 to George at Clug on Mon Dec 23 23:40:01 2024
    On 12/23/24 17:28, George at Clug wrote:


    On Monday, 23-12-2024 at 23:56 Richard Owlett wrote:
    On 12/23/24 4:39 AM, Jeffrey Walton wrote:
    On Mon, Dec 23, 2024 at 4:12 AM Arbol One <ArbolOne@hotmail.ca> wrote: >>>>
    In my Debian 12, I used snap to install Brave. To select it as browser in Netbeans I need to know the location of the executable.
    Does anyone know the directory for the Brave executable?

    `command -v brave`.

    Is 'command' documented somewhere?

    Shows how much about Linux I know, I had never previously heard about the command called command.

    An Internet search was not great since "command" is such a common term, however I managed to find some info using the usual Linux 'get help' options. Maybe there is more detailed info out there somewhere?

    $ man command
    No manual entry for command

    eben@cerberus:~$ type command
    command is a shell builtin

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From George at Clug@21:1/5 to eben@gmx.us on Tue Dec 24 00:00:02 2024
    On Tuesday, 24-12-2024 at 09:32 eben@gmx.us wrote:
    On 12/23/24 17:28, George at Clug wrote:


    On Monday, 23-12-2024 at 23:56 Richard Owlett wrote:
    On 12/23/24 4:39 AM, Jeffrey Walton wrote:
    On Mon, Dec 23, 2024 at 4:12 AM Arbol One <ArbolOne@hotmail.ca> wrote: >>>>
    In my Debian 12, I used snap to install Brave. To select it as browser in Netbeans I need to know the location of the executable.
    Does anyone know the directory for the Brave executable?

    `command -v brave`.

    Is 'command' documented somewhere?

    Shows how much about Linux I know, I had never previously heard about the command called command.

    An Internet search was not great since "command" is such a common term, however I managed to find some info using the usual Linux 'get help' options. Maybe there is more detailed info out there somewhere?

    $ man command
    No manual entry for command

    eben@cerberus:~$ type command
    command is a shell builtin

    https://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html

    https://www.gnu.org/software/bash/manual/html_node/Bash-Builtins.html

    command

    command [-pVv] command [arguments …]

    Runs command with arguments ignoring any shell function named command. Only shell builtin commands or commands found by searching the PATH are executed. If there is a shell function named ls, running ‘command ls’ within the function will execute
    the external command ls instead of calling the function recursively. The -p option means to use a default value for PATH that is guaranteed to find all of the standard utilities. The return status in this case is 127 if command cannot be found or an
    error occurred, and the exit status of command otherwise.

    If either the -V or -v option is supplied, a description of command is printed. The -v option causes a single word indicating the command or file name used to invoke command to be displayed; the -V option produces a more verbose description. In this
    case, the return status is zero if command is found, and non-zero if not.


    $ command --help
    command: command [-pVv] command [arg ...]
    Execute a simple command or display information about commands.

    Runs COMMAND with ARGS suppressing shell function lookup, or display
    information about the specified COMMANDs. Can be used to invoke commands
    on disk when a function with the same name exists.

    Options:
    -p use a default value for PATH that is guaranteed to find all of
    the standard utilities
    -v print a description of COMMAND similar to the `type' builtin
    -V print a more verbose description of each COMMAND

    Exit Status:
    Returns exit status of COMMAND, or failure if COMMAND is not found.

    "If there is a shell function named ls, running ‘command ls’ within the function will execute the external command ls instead of calling the function recursively."
    Is this the main point to command? "will execute the external command ls instead of calling the function recursively"

    What is the difference between 'execute' and 'calling' ?

    Maybe "execute' does not return any exit value from the program being executed?





    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to George at Clug on Tue Dec 24 00:10:01 2024
    On Tue, Dec 24, 2024 at 09:28:43 +1100, George at Clug wrote:
    Shows how much about Linux I know, I had never previously heard about the command called command.

    An Internet search was not great since "command" is such a common term, however I managed to find some info using the usual Linux 'get help' options. Maybe there is more detailed info out there somewhere?

    $ man command
    No manual entry for command

    $ command --help
    command: command [-pVv] command [arg ...]
    [...]

    The "command" command's base functionality is specified by POSIX: <https://pubs.opengroup.org/onlinepubs/9799919799/utilities/command.html>

    Specific shells (like bash or dash) may add additional functionality
    to it. I'm not specifically aware of anything added by bash, but that
    doesn't mean there isn't anything. The bash reference manual would be
    the authoritative reference, if you want to comb through that. The bash
    man page is usually close enough, and is more readily available.

    Bash has other commands, such as "type", which extend the introspection
    parts of "command". For example, "type -a echo" may be informative,
    especially on systems like Solaris where there are potentially several different "echo" programs in different directories, and the ordering
    of directories in PATH determines which one is used. POSIX's "command"
    only prints the first thing found, and has no option like "-a" to print
    more things.

    The most common use of "command" is writing a wrapper function:

    ls() {
    if [ -t 1 ]; then
    command ls --color -F "$@"
    else
    command ls "$@"
    fi
    }

    Without "command ls", the function would recurse infinitely. Since
    "command" suppresses function lookups, it prevents the function from
    calling itself, without requiring you to write "/bin/ls" or some other
    path that may or may not be correct.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Fred@21:1/5 to George at Clug on Tue Dec 24 01:50:01 2024
    On 12/23/24 15:28, George at Clug wrote:


    On Monday, 23-12-2024 at 23:56 Richard Owlett wrote:
    On 12/23/24 4:39 AM, Jeffrey Walton wrote:
    On Mon, Dec 23, 2024 at 4:12 AM Arbol One <ArbolOne@hotmail.ca> wrote: >>>>
    In my Debian 12, I used snap to install Brave. To select it as browser in Netbeans I need to know the location of the executable.
    Does anyone know the directory for the Brave executable?

    `command -v brave`.

    Is 'command' documented somewhere?

    Shows how much about Linux I know, I had never previously heard about the command called command.

    An Internet search was not great since "command" is such a common term, however I managed to find some info using the usual Linux 'get help' options. Maybe there is more detailed info out there somewhere?

    $ man command
    No manual entry for command

    $ command --help
    command: command [-pVv] command [arg ...]
    Execute a simple command or display information about commands.

    Runs COMMAND with ARGS suppressing shell function lookup, or display
    information about the specified COMMANDs. Can be used to invoke commands
    on disk when a function with the same name exists.

    Options:
    -p use a default value for PATH that is guaranteed to find all of
    the standard utilities
    -v print a description of COMMAND similar to the `type' builtin
    -V print a more verbose description of each COMMAND

    Exit Status:
    Returns exit status of COMMAND, or failure if COMMAND is not found.





    Jeff






    Hi,

    I use whereis to find if a program is installed:

    fred@ragnok:~$ whereis apt-get
    apt-get: /usr/bin/apt-get /usr/share/man/man8/apt-get.8.gz
    fred@ragnok:~$

    Best regards,
    Fred

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Jeffrey Walton on Tue Dec 24 03:20:01 2024
    On Mon, Dec 23, 2024 at 20:37:38 -0500, Jeffrey Walton wrote:
    On Mon, Dec 23, 2024 at 8:32 PM George at Clug <Clug@goproject.info> wrote:
    Is this the main point to command? "will execute the external command ls instead of calling the function recursively"

    Like many shell builtins, "command" does multiple things, depending on
    how you use it. Suppressing function lookups is certainly *one* of the
    things it does. Printing the first path of an external command is
    another things that it does.

    I already showed an example of a wrapper function that uses "command ls"
    to run the external command instead of the function.

    Greg provided the link to the documentation:

    The "command" command's base functionality is specified by POSIX:
    <https://pubs.opengroup.org/onlinepubs/9799919799/utilities/command.html>

    And following the link:

    DESCRIPTION

    The command utility shall cause the shell to treat the arguments as a
    simple command, suppressing the shell function lookup that is described
    in 2.9.1.4 Command Search and Execution, item 1c.

    And also:

    When the -v or -V option is used, the command utility shall provide
    information concerning how a command name is interpreted by the shell.

    That feature is used when you want to determine whether something is
    already installed.

    hobbit:~$ if command -v firefox-esr >/dev/null; then echo firefox installed; fi
    firefox installed
    hobbit:~$ if command -v emacs >/dev/null; then echo emacs installed; fi
    hobbit:~$

    Obviously that's more useful in a script. If you're a human and you just
    want that information for your own curiosity, "type" is a lot easier to
    use:

    hobbit:~$ type firefox-esr
    firefox-esr is /usr/bin/firefox-esr
    hobbit:~$ type emacs
    bash: type: emacs: not found

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Owlett@21:1/5 to Max Nikulin on Tue Dec 24 11:10:01 2024
    On 12/23/24 8:26 AM, Max Nikulin wrote:

    On 23/12/2024 19:56, Richard Owlett wrote:
    On 12/23/24 4:39 AM, Jeffrey Walton wrote:

    `command -v brave`.

    Is 'command' documented somewhere?

    Déjà vu...

    Richard Owlett to debian-user. Using terminal commands - corner cases.
    Wed, 27 Nov 2024 05:38:30 -0600. <https://lists.debian.org/msgid-search/722ee1ce-bfb6-facd-2bab-a8e1052a17eb@access.net>


    I've used terminal commands for so many decades I don't know where to
    look up fine details of a specific commands.


    Your quote is incomplete. I also said:
    But is there somewhere to go directly without a web search?

    What I needed is the discussion of command/type/whereis/etc which is
    now occurring below in this thread/sub-treads ;}

    I'll have to re-read the sub-thread to see if my question had been
    answered but did not register ;/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Owlett@21:1/5 to Richard Owlett on Tue Dec 24 15:30:01 2024
    On 12/24/24 4:08 AM, Richard Owlett wrote:
    On 12/23/24 8:26 AM, Max Nikulin wrote:

    On 23/12/2024 19:56, Richard Owlett wrote:
    On 12/23/24 4:39 AM, Jeffrey Walton wrote:

    `command -v brave`.

    Is 'command' documented somewhere?

    Déjà vu...

    Richard Owlett to debian-user. Using terminal commands - corner cases.
    Wed, 27 Nov 2024 05:38:30 -0600.
    <https://lists.debian.org/msgid-search/722ee1ce-bfb6-facd-2bab-a8e1052a17eb@access.net>


    I've used terminal commands for so many decades I don't know where to
    look up fine details of a specific commands.


    Your quote is incomplete. I also said:
     But is there somewhere to go directly without a web search?

    What I needed is the discussion of command/type/whereis/etc     which is now occurring below in this thread/sub-treads ;}

    I'll have to re-read the sub-thread Max referenced to see if my question had been
    answered but did not register ;/

    I just reread {in chronological order} the overall thread Max
    referenced. I need to do a detail read of several Bash references
    mentioned by various people:
    > https://mywiki.wooledge.org/BashGuide
    > https://guide.bash.academy/
    > http://folk.ntnu.no/geirha/bashguide.pdf
    > https://www.gnu.org/software/bash/manual/

    There also was an intriguing reference to a BSD tool called "Learn"
    which is described by its man-page as "computer aided instruction about
    UNIX" [ https://www.unix.com/man-page/bsd/1/LEARN/ ].

    Is Debian similar enough to BSD that LEARN could be run?
    Has it, or something similar, been created for Debian?

    In the meantime the four references above should keep me occupied.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)