• Use gksudo or pkexec to run multiple instances of the same package


    Hi!
    I’m trying to run 2 instances of thunar with graphical sudo permission (because it doesn’t have the split menu option like caja, pcmanfm) but i can’t find a way…

    So far i can only run using su directly with su -c "(thunar & thunar &)".
    If someone know how to do with gksudo or pkexec i really appreciate any help…

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • @fernandomaroto
    Just wondering what your question really is about.
    Why not use file managers that support the feature you need?
    And what about ‘man gksudo’ or ‘man pkexec’?
    Or is the problem with the argument to sudo/su/gksudo/pkexec?

  • @manuel he wants to run thunar twice with sudo, so he has two thunar windows with sudo powers.

    @fernandomaroto

    Write a shell script!
    First, edit:
    sudo nano /usr/bin/mythunar
    Inside write:

    #!/bin/bash
    (thunar & thunar &)
    

    Make it executable:

    sudo chmod +x /usr/bin/mythunar
    

    And that’s it. Whenever you want to run your script to open two thunar windows, run it this way:

    sudo mythunar
    

    Cheers!

  • @manuel said in Use gksudo or pkexec to run multiple instances of the same package:

    Just wondering what your question really is about.
    Why not use file managers that support the feature you need?
    And what about ‘man gksudo’ or ‘man pkexec’?
    Or is the problem with the argument to sudo/su/gksudo/pkexec?

    Hi Manuel! Because pcmanfm didn’t work very well in my iso, and many people don’t like caja, Also thunar has good functionalities despite its small size, so i was hopping to workaround it’s missing addon (the split panel).
    I’m guessing is not possible to run two instances with gksudo/pkexec or at least i couldn’t figure out the correct sintax.
    For example gksudo $(&(thunar;thunar)) NOR gksudo thunar thunar (i tried others too) won’t work, the only way i found is to use sudo or to put a useless program between the thunar instances…

    @karasu
    Hi, yes, but instead of a script i created an alias to do it, but i wanted to use some “graphical sudo” but so far only the old and good su/sudo work…

    OBS: i saw an AUR package to add split panel to thunar, but then it breaks the “open terminal here” funcionality…
    OBS2: i just tested nemo and i’m pretty amazed how it goes a little further than caja wich is my prefered FM. The script option is the best!

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • @fernandomaroto
    How about a bash function? Something like:

    doublefm()
    {
      sudo thunar "[email protected]" &
      sudo thunar "[email protected]" &
    }
    

    That can be written to a scipt file as well. But now I’m not at a linux machine so I cannot test it.

  • @manuel said in Use gksudo or pkexec to run multiple instances of the same package:

    @fernandomaroto
    How about a bash function? Something like:

    doublefm()
    {
      sudo thunar "[email protected]" &
      sudo thunar "[email protected]" &
    }
    

    That can be written to a scipt file as well. But now I’m not at a linux machine so I cannot test it.

    thanks friend, but i’m trying to use graphical sudo like gksudo. With sudo indeed i can open 2 instances of thunar.

    BUT i’ll follow your previous advice, i’ll change to nemo since today i discovered it “actions” and “scripts” functions wich is pretty good!

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • gksu "thunar & thunar"
    

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    howto-install-antergos
    how to add system logs
    i3-wm#gnome-shell

  • @joekamprad said in Use gksudo or pkexec to run multiple instances of the same package:

    gksu "thunar & thunar"
    

    worked! thank you very much joe!

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • @fernandomaroto said in Use gksudo or pkexec to run multiple instances of the same package:

    worked!

    but do not ask me why …

    And also this is su and NOT sudo

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    howto-install-antergos
    how to add system logs
    i3-wm#gnome-shell

  • @joekamprad said in Use gksudo or pkexec to run multiple instances of the same package:

    @fernandomaroto said in Use gksudo or pkexec to run multiple instances of the same package:

    worked!

    but do not ask me why …

    And also this is su and NOT sudo

    exactly, work with su/gksu, BUT NOT with pkexec/gksudo hehehehe. Weird…

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • dangerous too ;)

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    howto-install-antergos
    how to add system logs
    i3-wm#gnome-shell

Posts 11Views 213
Log in to reply