putting a new tile set file in to Ubuntu Mahjong

Asked by Michael Patterson on 2012-12-05

I want to put a file called medieval2.svg into usr/share/gnome-games/mahjongg/pixmaps but I get an error message telling me I cannot do so! I am the administrator on my Ubuntu PC - indeed I am the only account holder!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gnome-games Edit question
Assignee:
No assignee Edit question
Last query:
2012-12-06
Last reply:
2012-12-06
Michael Patterson (map310339) said : #1

The actual message states 'permission denied'!

Assuming the file is on the desktop:

sudo mv ~/Desktop/medieval2.svg /usr/share/gnome-games/mahjongg/pixmaps

Obviously if the file is in a different location then change the source file location.

Michael Patterson (map310339) said : #3

I get an error message stating'mv: missing destination file operand after '~Desktop/medieval2.svg/usr/share/gnome-games/mahjongg/pixmaps' I also get a message stating 'Try 'mv --help' for more information.' but I did not seem to be able to fathom the problem.
I also tried entering the string starting with 'Home desktop medieval2.svg usr share gnome-games mahjongg pixmaps' after the sudo mv as in the help file this seemed to be valid, but I then got a different error message telling me that the 'target 'pixmaps' is not a directory'!
So I am left a little confused!
Regards

Michael Patterson (map310339) said : #4

At least it is all a step up from 'permission denied' so I feel I may be moving along in the right direction!!!

Then you removed spaces from the command. Is the file on the desktop?

Michael Patterson (map310339) said : #6

On 06/12/12 04:35, actionparsnip wrote:
> Your question #216035 on gnome-games in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/gnome-games/+question/216035
>
> Status: Open => Needs information
>
> actionparsnip requested more information:
> Then you removed spaces from the command. Is the file on the desktop?
>
Yes it is on the Desktop!

Michael Patterson (map310339) said : #7

Yes. I downloaded the file and moved it to the Desktop so I knew where it was!

Manfred Hampl (m-hampl) said : #8

Then use the command

sudo cp ~/Desktop/medieval2.svg /usr/share/gnome-games/mahjongg/pixmaps

You have to be exact with the space characters! Apparently in your previous attemt you missed them.

And one note to the topic of 'I am the administrator, but still cannot do xy':
Ubuntu is using the concept that you should work without administrative powers whenever possible with the possibility to enable such right when required. This is to avoid inadvertent modifications in the system area. Gaining admin rights is with the sudo and gksudo commands (sudo for terminal commands, gksudo for programs with a graphical user interface).

when the command
cp medieval2.svg /usr/share/gnome-games/mahjongg/pixmaps
fails with 'permission denied', this is caused by the fact that only admin users are allowed to create or modify files in the /usr/... area.
if you precede the command with sudo making it
sudo cp medieval2.svg /usr/share/gnome-games/mahjongg/pixmaps
you temporarily activate admin rights and the copy action will succeed.

recommended reading:
https://help.ubuntu.com/community/RootSudo

Michael Patterson (map310339) said : #9

On 06/12/12 12:31, Manfred Hampl wrote:
> Your question #216035 on gnome-games in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/gnome-games/+question/216035
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> Then use the command
>
> sudo cp ~/Desktop/medieval2.svg /usr/share/gnome-games/mahjongg/pixmaps
>
> You have to be exact with the space characters! Apparently in your
> previous attemt you missed them.
>
> And one note to the topic of 'I am the administrator, but still cannot do xy':
> Ubuntu is using the concept that you should work without administrative powers whenever possible with the possibility to enable such right when required. This is to avoid inadvertent modifications in the system area. Gaining admin rights is with the sudo and gksudo commands (sudo for terminal commands, gksudo for programs with a graphical user interface).
>
> when the command
> cp medieval2.svg /usr/share/gnome-games/mahjongg/pixmaps
> fails with 'permission denied', this is caused by the fact that only admin users are allowed to create or modify files in the /usr/... area.
> if you precede the command with sudo making it
> sudo cp medieval2.svg /usr/share/gnome-games/mahjongg/pixmaps
> you temporarily activate admin rights and the copy action will succeed.
>
> recommended reading:
> https://help.ubuntu.com/community/RootSudo
>
Cheers Manfred! I definitely did not 'see' the space I left out. I will
now try again!

Regards
michael

Warren Hill (warren-hill) said : #10

If you are still struggling then you can copy and paste the files in the file manager. To do this you will need to run the file manager as a super user.

Press ALT+F2 and enter

gksudo nautilus

Be careful while doing this as It will now let you move, copy or delete anything so wont stop you from doing something that could break your system. Once you close the file manager however you will be back to being a normal user and the protection mechanisms will be back in place.

Michael Patterson (map310339) said : #11

Thanks Manfred and Warren!
The original problem of moving the medieval.svg file into the correct folder has been solved and this WAS the problem I had when I started! I have another problem now, for which I will probably need to go to another forum! Despite the file now being in the right place, when I try to select the tile set, only the original file - postmodern.svg - seems to be accessible. In other words Mahjongg has ignored my efforts to present it with another option! I even moved postmodern.svg out of the folder using Warren's method, but Mahjongg must have tracked it as it is still a part of the game although it does not appear in the folder!!
I guess I need to go to the Ubuntu Mahjongg game developers and ask them some questions! I DID learn quite a bit from this episode, though!
Michael

Can you help with this problem?

Provide an answer of your own, or ask Michael Patterson for more information if necessary.

To post a message you must log in.