Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Run as admininstrator

    Does Linux have a file manager program that I can run as su. This would make it easy to transfer files around when logged in as normal user and need access to other directories. At the moment I have to log out then log in as su the log out then log in as user.

  2. #2
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    What types of files are you moving around that you need access outside your home directory? It's generally bad practice to do everyday tasks (including logging into a GUI session) as root user. I would re-evaluate what you're doing first. Perhaps there's a way to do it without requiring access to the rest of your system?

    Pretty much any program can be run in administrator mode while you're logged in as a regular user, you just have to open up your X Windows session to accept calls from other users. You do this by opening up a console window and typing:
    xhost +
    You should get a message like "Sessions can now be connected to any host..." or something like that. From that same console window, log in as root with su and then launch your graphical file manager, such as konqueror. You should have full root privileges.

    Please note that I do NOT recommend you ever doing this. There are ways around most tasks that don't involve a root-privileged GUI program. You're opening yourself up to a lot of security and stability issues by running in X as root.
    Registered Linux user #270181

  3. #3
    Linux Guru AlexK's Avatar
    Join Date
    Feb 2005
    Are you using Gnome or KDE?
    In KDE there is a superuser filemanager under KMenu -> System -> File Manager.

    Or you can just launch the filemanager from the command line as root: i.e. do the following
    su -
    konqueror &
    that will also give you a superuser file manager.

    But the better way of doing things would be to use the cp (copy) or mv (move) commands when logged in as root, the basic syntax is
    command source destination
    e.g. cp /home/alex/some_file /root/some_dir
    if you want to copy directories, use the -R flag e.g. cp -R /home/alex/ /root i.e. copy my entire home directory into roots home directory.
    Life is complex, it has a real part and an imaginary part.

  4. $spacer_open
  5. #4
    Linux User DThor's Avatar
    Join Date
    Jan 2006
    Although I'll side with the argument that if you're not a sysadm you shouldn't have to be running as root except in specific circumstances like system upgrades, software installation, and debugging some things like network, there is another option that's really handy for running a root GUI program in your current session - "sux". This is a shell script on SUSE that manages all the annoying permissions and such, and just lets you run an app as root. Enter "sux" in a shell, enter the root password, and whatever you run in that shell is running as root and has permissions to run in your current session. It's even useful if you want to run a root program on another system:

    % sux
    % ssh -X systemfoo
    and you'll be able to run remote X apps over the network.


  6. #5
    techieMoe- I have been dowloading new brushes etc for Gimp and these need to be placed in the correct directories, which I do not have write permission on. It is just a pain to change users to copy these files to the appropriate directories.

    I know you guys do not like to hear this sort of stuff, and believe me I am a microsoft unbeliever, but in windows when I wanted to do this I would simply run the appropriate software as administrator (right click and enter password).

    Alex, I am running Gnome. Thanks for your input.

  7. #6

    Smile working as an admin user.

    The way I do this is as follows:
    1. open a terminal window (put a shortcut on your desktop for this)
    2. type su and hit return
    3 type the admin password at the password prompt.
    4. type Konqueror or the name of your favourite file browser in the
    console window. Then you will be able to access everywhere. After you
    have finished close the console window.

Posting Permissions

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