This is the old SliTaz forum - Please use the main forum.slitaz.org

SliTaz 3.0 problems with root cli
  • davesurreydavesurrey March 2010
    With SliTaz 3.0 if I do
     su -
    password
    thunar

    then I get

    Xlib:connection to “:0.0” refused by server
    Xlib: No protocol specified

    and also if I do this with leafpad, asunder,gnumeric......

    This means I can't make modifications to any files that need root permission.
    This seems a fundamental problem.

    Anyone else seen this?
    How can this be fixed?
    Dave
  • seawolfseawolf March 2010
    With sudo, you can use certain elevated privileges -- not as root user -- to accomplish some tasks.

    You install the 'sudo' package, use 'su -' then 'visudo' to add yourself to the list of users that can use sudo, then finally edit files using emacs or nano with 'sudo '. Thunar may not quite run as expected, as it's slightly different permissions.

    That's just one slight hack, not quite what you want...
  • davesurreydavesurrey March 2010
    Well for the moment I'd accept a hack but afraid when I do
    su -
    password
    visudo

    I get
    -sh: visudo not found

    Dave
  • seawolfseawolf March 2010
    I just tried it on v3:
    su -
    tazpkg get-install sudo
    visudo
    exit
    sudo [command]
  • davesurreydavesurrey March 2010
    Thanks seawolf.
    My stupidity not reading that I needed to d/l sudo. Too tired last night.
    I get visudo now but no idea how to add to the /etc/sudoers file as never used vi before.
    I tried to add
     david ALL=(ALL) ALL
    but no idea how to save it.

    I still feel this is a fundamental problem with version 3 that I can't access several things as root.
    I am assuming it's not just me. Can anyone else clarify this pls.
    Thanks
    Dave
  • seawolfseawolf March 2010
    It's not the most obvious of interfaces is vi! After typing that line, you'll need press escape to escape from editing mode, then type :write [enter] :quit [enter]. It'll tell you if there's any problems with the syntax. If not, it'll process it okay.

    Hope this clears sudo up.

    ----------------------

    I've just googled around a bit and found that the xhost program controls other users access to X displays. This can be used to allow root to connect to Tux's X server.

    The command should be: xhost + or xhost + 127.0.0.1 to be more secure.

    Unfortunately, the xhost program isn't packaged. Here's one from Fedora 12, tested and working on v3:
    http://rapidshare.com/files/370378940/xhost.html
    Download it, run "chmod +x xhost" from it's directory and run the command above.

    HIH Dave.


    Anyone wishing to package it: the source is: http://xorg.freedesktop.org/releases/individual/app/xhost-1.0.3.tar.bz2
  • davesurreydavesurrey March 2010
    Many thanks seawolf. I appreciate your efforts.

    Just before your help with vi I ran a term as root and managed to change /etc/sudoers file in geany. (Much easier to use than vi)

    Then I could use sudo to make changes where I wanted.

    I downloaded xhost and after chmod-ing it did
     #  /usr/share/xhost + 

    (does it matter where I put xhost?)
    and got
     access control disabled, clients can connect from any host

    which does worry me a bit from a security aspect.

    However now I can use thunar from root and make the changes I want.

    Developers pls pls have a look at this as I think it's so fundamantal not being able to use root to get at all parts of the system.

    Thanks
  • snowpinesnowpine March 2010
    Have you tried plain old 'su' without the - sign?

    'su -' is kind of a red-hat-specific thing, is it not?
  • davesurreydavesurrey March 2010
    snowpine
    Yes I have and it made no difference with my install.
    Are you saying that it works for you?
    Dave
  • seawolfseawolf March 2010
    the dash is short hand for the -l flag, which starts a login shell that is by default root. It may be used more in RH environments, I've never heard the argument!
  • davesurreydavesurrey March 2010
    Yes I have always been under the impression that su - means you are using root's environment variables whereas just using su means you maintain your original environment.

    But regardless of the correct syntax could someone pls pls pls tell me if it works for them. ie can you do as root
    #leafpad
    and not get the error message as above.
    Dave
  • davesurreydavesurrey March 2010
    Okay so I reverted to a Live CD and did
    tux@slitaz:~$ su
    password
    root@slitaz:/home/tux# leafpad

    and I get leafpad to run.

    But if I do
    tux@slitaz:~$ su -
    password
    root@slitaz:~# leafpad

    then I get the error message as above post.

    So is this correct? I have been used to doing su - on other distros but if slitaz needs this then okay. But would appreciate some confirmation.
  • snowpinesnowpine March 2010
    'su' always worked as expected for me with leafpad, geany, nano, pcmanfm, etc. in SliTaz 1 and 2. I have not had a chance to try SliTaz 3.0 yet, nor have I used thunar in SliTaz. I think it is safe to say this is not the intended behavior and you should file it as a bug.
  • davesurreydavesurrey March 2010
    Hi snowpine
    Thanks for your feedback.
    Yes I just tried slitaz 2.0 and cooking 24/04/2009 and both allow the use of su - whereas 3.0 doesn't
    I'll file it although my filing of bugs in the past never seemed to do much.
    Cheers
    Dave

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social