LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 07-19-2011, 08:45 AM   #1
banuazizi
LQ Newbie
 
Registered: Jul 2011
Location: Jönköping, Sweden
Distribution: Ubuntu 11
Posts: 5

Rep: Reputation: Disabled
Copy files to /usr/share/foldername with Gnome


I had to copy some files from terminal to a folder in /usr/share/foldername
so I did sudo cp -r something/ /usr/share/foldername
which worked, but when I wanted to do it in Gnome, it kept saying I have no permission. How do I do it so it asks for permission, or how do I do sudo + task in Gnome ?
 
Old 07-19-2011, 08:53 AM   #2
DennisC31
Member
 
Registered: May 2007
Location: beyond my means
Distribution: Mint 11.04
Posts: 55

Rep: Reputation: 19
There are 2 good options to sync up 2 directories.

The first is cp -a <source> <destination>. This will copy everything. If you want confirmation before overwrites use cp -i -a <source> <destination>.

The second with a bit of a nuance is rsync -Pa <source directory with a trailing /> <destination directory>. rsync -Pa /source/ /destination will be the equivalent of cp -a /source/* /destination. rsync -Pa /source /destination will actually copy the folder source so that you have /destination/source.

Wow. I am confusing.

use cp -a. =)

In gnome, if you are trying to copy you should be able to drag and drop just like in windows.

Can you post ls -ld <destination> for us?

Last edited by DennisC31; 04-11-2012 at 06:33 PM.
 
1 members found this post helpful.
Old 07-19-2011, 09:23 AM   #3
banuazizi
LQ Newbie
 
Registered: Jul 2011
Location: Jönköping, Sweden
Distribution: Ubuntu 11
Posts: 5

Original Poster
Rep: Reputation: Disabled
well the files are already copied, but my question was when I wanted to copy them on gnome it said permission denied. When I did it in terminal it also said the same thing until I used sudo cp ..... My question was how to copy the files in gnome like drag and drop but to drop them with sudo (ie, elevated priviledge_ so it can actually copy them. There was no popup that would ask me for the password. there was just a #permission denied# sort of thing.

http://tinypic.com/view.php?pic=2cprd5d&s=7

Last edited by banuazizi; 07-19-2011 at 09:28 AM.
 
Old 07-19-2011, 10:02 AM   #4
jdkaye
Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,031

Rep: Reputation: Disabled
You can use things like gksudo or gksu to does this in gnome or kde or any other desktop environment. There are other methods as well but these were the first that came to mind.
ciao,
jdk
 
Old 07-19-2011, 10:08 AM   #5
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
Quote:
Originally Posted by banuazizi View Post
well the files are already copied, but my question was when I wanted to copy them on gnome it said permission denied. When I did it in terminal it also said the same thing until I used sudo cp ..... My question was how to copy the files in gnome like drag and drop but to drop them with sudo (ie, elevated priviledge_ so it can actually copy them. There was no popup that would ask me for the password. there was just a #permission denied# sort of thing.

http://tinypic.com/view.php?pic=2cprd5d&s=7
try

Code:
gksudo nautilus
Then nautilus will open up with root permissions.
 
Old 07-19-2011, 10:08 AM   #6
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Another option is beesu. You can add an application launcher to your panel using command beesu nautilus or simply press Alt-F2 and type the same in the "Run Application" window.
 
Old 07-21-2011, 09:18 AM   #7
DennisC31
Member
 
Registered: May 2007
Location: beyond my means
Distribution: Mint 11.04
Posts: 55

Rep: Reputation: 19
Quote:
Originally Posted by andrewthomas View Post
try

Code:
gksudo nautilus
Then nautilus will open up with root permissions.
This should work. =)

Last edited by DennisC31; 04-11-2012 at 06:33 PM.
 
  


Reply

Tags
copying, gnome, sudo


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I copy a file from my desktop to /usr/share/cups/model doctordick Linux - Desktop 5 03-30-2011 08:37 PM
bug in the pmake package: contents of the files are duplicated in /usr/share/mk/*.mk fdeak Slackware 3 12-09-2010 05:08 AM
copy files into /usr folder knobby67 Linux - Software 4 10-04-2009 02:19 PM
cant create or copy files to samba share Elnegro8 Linux - Server 27 07-16-2008 09:06 AM
[SOLVED] Bash Script to copy files to SAMBA Share bskrakes Linux - Newbie 4 07-03-2008 08:51 AM


All times are GMT -5. The time now is 05:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration