1

I'm trying to replace the startup sound on my ubuntu, desktop-login.ogg, with my own, Desktop-login.ogg (located in the Downloads folder) by doing the following:

sudo cp desktop-login.ogg.old sudo cp ~/Downloads/Desktop-login.ogg

However, this shows up

cp: target ‘/home/doughnuts/home/Downloads/Desktop-login.ogg’ is not a directory

I thought it was? What's going on?

1
  • 1
    Your commands make no sense. cp needs an input file and an output file: sudo cp /path/file.ogg /path2/file2.ogg. Mar 21, 2016 at 2:17

2 Answers 2

1

First:

You don't need to use sudo for copying to your home own directory.

Second:

Your cp command is:

cp desktop-login.ogg.old sudo cp ~/Downloads/Desktop-login.ogg

So, you're trying to copy files named desktop-login.ogg.old, sudo and cp from the current directory, to ~/Downloads/Desktop-login.ogg. If you tell cp to copy multiple files, it will assume the target is a directory. Since the target isn't a directory, it will complain. What you need to use is just:

cp desktop-login.ogg.old ~/Downloads/Desktop-login.ogg

But from your question, you wanted to copy the latter, to the former. So, you actually need to use:

cp ~/Downloads/Desktop-login.ogg desktop-login.ogg.old

And if that file is not in your home directory, but in /usr/share (or somewhere like that, then use sudo).

0

You might be safest to create a backup of the original soundfile first so you can safely revert if you wish. The following single command will accomplish that backup:

sudo mv -v /usr/share/sounds/ubuntu/stereo/desktop-login.ogg \
         /usr/share/sounds/ubuntu/stereo/desktop-login.ogg_bak

Then you can move your own file into place with the following single command:

sudo cp -v $HOME/Downloads/desktop-login.ogg /usr/share/sounds/ubuntu/stereo/

(Note the lower case on the filename btw). If you wish to revert to your original login sound you can then run:

sudo mv -v /usr/share/sounds/ubuntu/stereo/desktop-login.ogg_bak \
         /usr/share/sounds/ubuntu/stereo/desktop-login.ogg

and all will be back as it was...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .