Menu ▾ ▴

#329 xfe as root via su

v1.0_(example)
open
nobody
None
5
1 day ago
4 days ago
вдмЪ
No

FreeBSD 15.1 xfe 2.1.12

When launching xfe as root using su—whether via a menu entry or a panel button—the authorization window appears for a fleeting moment and then immediately vanishes. The terminal displays the message: "child exited with status 1."

However, when attempting to open a restricted directory, a dialog box appears containing an "Xfe As Root" button; using this button works exactly as intended.

Discussion

  • Roland Baudin

    Roland Baudin - 4 days ago

    What do you mean by "launching xfe as root using su"? Do you mean "with sudo"?

     
  • вдмЪ

    вдмЪ - 4 days ago

    I’m referring to "Authentication using su (uses root password)" (command: su -m root -c xfe).
    This used to work perfectly, but at some point—I’m not sure which version—it broke. Well, partially. Specifically, it fails when launched from the menu or a panel.

     
    • Roland Baudin

      Roland Baudin - 3 days ago

      OK, thanks. I'm not a FreeBSD expert, but I think there is some security limitation that forbids the use of 'sh -c' if the user is not root. And also pkexec doesn't seem to work in FreeBSD.

      So the last solution for you is to use sudo. Install it and use visudo to add your user name to sudoers. Then in Xfe, select 'Authentication using sudo' and it will work (the password to enter is your user password).

      Can you tell me if it works now?

       
      • вдмЪ

        вдмЪ - 3 days ago

        Thanks. I’m not going to install sudo just for the sake of XFE; it’s not that big of an issue for me.

        pkexec can be configured to work (I’ve done it before), but the setup process isn’t trivial and it’s just not worth the effort.

        I’m used to authenticating via su (su -m root -c xfe), which has always worked without any problems. It still works now: if I try to access a restricted directory, a "Permission to: DIR denied" dialog box appears with an "Xfe as root" button. Clicking it brings up an authentication prompt; I enter the root password, and the directory opens. However, if I try to use the toolbar button or the menu option, the authentication prompt just flashes and then disappears.

        Again, it’s not a major issue. If it can be fixed, great—if not, that’s fine too. It launches without any problems when run from the terminal using that same command. ;)

        Best regards.

         
        • Roland Baudin

          Roland Baudin - 3 days ago

          OK, your answer helped me. Here is a su command that you can enter in the 'su command' field in Edit / Preferences / Settinsg / Authentication mode:
          su -m root -c 'xfe &'
          This command works for me in FreeBSD 15.1.
          If it works for you, I'll add this as the default su command for FreeBSD.

           
  • вдмЪ

    вдмЪ - 2 days ago

    Thank you. No, unfortunately, that doesn't solve the problem... for me. But...
    After countless sleepless days and nights of heroic effort, I finally found what was causing the issue... :lol It’s the Russian (ru*) translation file.
    When launching Xfe as root, the text in the authentication window header corresponds to these lines in the translation file:

    • when launched from a dialog box (the version that works):

    : src/MessageBox.cpp:269

    msgid "Enter root password:"
    msgstr "Пароль root:"

    • when launched from a panel or menu (the problematic version):

    : src/XFileExplorer.cpp:5564

    msgid "Enter the root password:"
    msgstr "Пароль 'root':"

    As you can see, the difference lies in the single quotation marks, which, for some reason, were causing the issue. I simply changed "Пароль 'root':" to "Пароль root:" and... lo and behold! The problem disappeared. :)

    I have attached the corrected ru.po file.

    Apologies for the trouble. Best regards.

     
    • Roland Baudin

      Roland Baudin - 1 day ago

      OK, good news! I did the change in Xfe and it will be available in the next release.

       

Log in to post a comment.