PDA

View Full Version : Copy and paste



paulcreedy
24th May 2010, 12:45 PM
Please excuse the amateur post, but just started to dabble in Fedora on a virtual machine so very little experience yet.

I want to copy a file from folder A to folder B using the GUI

But the paste button is greyed out.

I realise this is because I've logged in as a user rather than root, so how do I enable the paste option on this occasion so that I can paste these files?

coffee412
24th May 2010, 01:41 PM
Please excuse the amateur post, but just started to dabble in Fedora on a virtual machine so very little experience yet.

I want to copy a file from folder A to folder B using the GUI

But the paste button is greyed out.

I realise this is because I've logged in as a user rather than root, so how do I enable the paste option on this occasion so that I can paste these files?

Well, It partially depends on what file you are trying to edit. As a normal user you dont have permissions to edit the file. However, I find it easiest for me to open a terminal window, Become root, Then edit the file. So, Since you are just beginning let me give you a step by step.

Go to Applications/system tools/terminal

Type in "su" and enter your root password


su <rootpassword>

now use the editor called nano to edit your file:


nano /path/to/file/filename

Make your corrections and then hit control-x to save it.

Type exit 2 times to leave root and close the term window.

coffee

zeland
24th May 2010, 02:18 PM
I realise this is because I've logged in as a user rather than root, so how do I enable the paste option on this occasion so that I can paste these files?

The short answer would be "you can't". Outside of your home folder, a normal user does not and should not have right to muck around.

paulcreedy
24th May 2010, 02:24 PM
thanks

I got the editing the file part as sudo or su -

What I'm trying to do is download a module for moodle and drop it into the moodle / web / admin folder.

So I've got the files sitting on my desktop that I need to copy into moodle / web / admin but cannot get them in there.

I originally installed moodle via the command line using su - but to install the module/plug in it should be a simple case of copy paste!!

giulix
24th May 2010, 02:50 PM
I originally installed moodle via the command line using su - but to install the module/plug in it should be a simple case of copy paste!!

Quite the contrary, actually. If you had to be root when you installed, that means that software was installed outside of your "normal" user perimeter. So, to alter the initial installation adding new modules, you need once more to become root. Unless, of course, that module is only applicable to the environment your "normal" user is confined into, but that is application specific and rarely involves installing modules.

paulcreedy
25th May 2010, 12:41 AM
So, to alter the initial installation adding new modules, you need once more to become root.

Yes, but how with the GUI?

Never had this problem when trying out Ubuntu. It's the fedora / Gnome GUI that seems to be locked down. the Ubuntu one worked perfectly fine with copy/paste, however that had issues with some elements of php/mysql in the new version.

This is a dedicated installation of moodle using LAMP.

zeland
25th May 2010, 12:46 AM
If you really need to use the file manager as root, you can launch a console and run the following command:


su - -c nautilus

giulix
25th May 2010, 08:18 AM
Yes, or see this thread (http://forums.fedoraforum.org/showthread.php?t=244353&highlight=beesu) if you want to set up a privileged entry for nautilus in your menus

paulcreedy
25th May 2010, 09:09 AM
Yes, or see this thread (http://forums.fedoraforum.org/showthread.php?t=244353&highlight=beesu) if you want to set up a privileged entry for nautilus in your menus

thanks

That's sort of there but I can't seen to get to the destination folder with that. I get the error message that nautilus cannot handle computer places when I try to browse to the destination through places>computer.

giulix
25th May 2010, 11:04 AM
Yes, that won't work....

CiaW
26th May 2010, 03:54 AM
What might help is one of two options. Sometimes I will temporarily change the owner of a directory from root to my local user so I can use a gui to copy several files or folders. (A real-life example is /usr/share/fonts) Then when I'm done copying I chown back to root. So in a terminal, go to /usr/share and then type (without quotes): 'chown -R username fonts' and then when you try to paste into the folder from the desktop as your regular user it should work.

Second option, which I use for my localhost website is to create a group which includes apache and my regular user, and then chgrp -R /var/www/ and give the group write permission where needed for Drupal to work. Then my regular user can temporarily change the permissions on (for instance) settings.php during the install and change it back to read-only afterward. It also allows my desktop user to download modules, etc. and extract them to the html or virtual host directory.