LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   can't remove icon from desktop (https://www.linuxquestions.org/questions/linux-newbie-8/cant-remove-icon-from-desktop-642863/)

harecanada 05-17-2008 09:12 AM

can't remove icon from desktop
 
I'm running Kubuntu Hardy Heron. I tried to download a program called Super. It's a video converter, but only works for Windows and doesn't work with WINE in Linux. My problem is I can't get the dam super.exe icon off my desktop or system. I thought I could just send it to Trash but that doesn't work. Everytime I reboot , it is still on my desktop. Tel me there is a simple solution to this, please!

jpk 05-17-2008 10:06 AM

hi,

Open Terminal (in Accessories), then type:

cd Desktop [enter]
rm -rf super.exe [enter]

b0uncer 05-17-2008 10:20 AM

Code:

rm -rf super.exe
Two points here. First of all the '-r' switch is unnecessary (because super.exe is a file, not a directory, so there is no point in doing a recursive operation, which -r means). Secondly, -f is a little dangerous since it doesn't ask questions, just removes the file - so if you happened to make a typo or something, you could easily remove a lot of files you really didn't want to. In this case it's maybe ok, because you probably don't have files on your desktop that are named closely to super.exe that you could accidentally remove..but if you however do use the '-r' switch, which makes rm work recursively on subdirectories and files, and did a small mistake, you could end up removing a lot of files.
Code:

rm -i super.exe
This asks if you'd like to remove the file currently being operated, in this case only super.exe.

The same should happen if you select the file on your desktop, then hold SHIFT while pressing DEL/DELETE - instead of moving to trash the file is immediately removed.

harecanada 05-17-2008 11:54 AM

Hi,
Thanks for responding so quickly. I tried all of these suggestions but the icon is still there.
"supersetup.exe"

darrell@harecanada-desktop:~$ sudo rm -i super.exe
[sudo] password for darrell:
rm: cannot remove `super.exe': No such file or directory
darrell@harecanada-desktop:~$ sudo rm -rf super.exe
darrell@harecanada-desktop:~$
The same should happen if you select the file on your desktop, then hold SHIFT while pressing DEL/DELETE - instead of moving to trash the file is immediately removed.

Any other ideas?
harecanada

colucix 05-17-2008 01:27 PM

Quote:

Originally Posted by harecanada (Post 3156301)
rm: cannot remove `super.exe': No such file or directory

You were not in the correct place when you tried to remove the file. The -f option in the second command prevented this message to display again.

Please, try to locate where it is and issue the following commands:
Code:

ls -l *.exe
lsattr *.exe

The latter will show special attributes (if any) that can prevent deleting.

harecanada 05-17-2008 05:45 PM

Thanks for trying to help colucix
How do I locate where it is on my system?
harecanadacolucix

colucix 05-17-2008 06:33 PM

Ok. First double check the name of the file (in a previous post you called it supersetup.exe, whereas in your first post you named super.exe). Then open a terminal, go to the directory corresponding to your desktop, maybe "Desktop" (I don't know on Kubuntu for sure). Anyway look around using cd and ls, until you locate the file.

Or eventually use the find command:
Code:

find $HOME -name super.exe
or whatever the file is called. You should get the full path of the file. Go to the directory containing the file, and post the output of the commands suggested in my previous message.

harecanada 05-18-2008 11:39 AM

Hi colucix,
Here's what's happening.
I entered the following:
darrell@harecanada-desktop:~$ cd ~/Desktop
darrell@harecanada-desktop:~/Desktop$ ls -l *.exe
-rw-r--r-- 1 darrell darrell 0 2008-05-18 13:14 SU
darrell@harecanada-desktop:~/Desktop$ lsattr *.exe
------------------ SUPERsetup.exe
darrell@harecanada-desktop:~/Desktop$ sudo rm -i ------------------ SUPERsetup.exe
[sudo] password for darrell:
rm: unrecognized option `------------------'
Try `rm --help' for more information.
darrell@harecanada-desktop:~/Desktop$ sudo rm -i SUPERsetup.exe
rm: remove regular empty file `SUPERsetup.exe'? y
darrell@harecanada-desktop:~/Desktop$ cd
darrell@harecanada-desktop:~$

So it looks like it removed it, but then I did a cold reboot and it is still on my Desktop. I'm confused. Either I'm doing something wrong or I'm not understanding enough of the syntax to get this removed.
harecanada

colucix 05-19-2008 02:24 AM

Quote:

Originally Posted by harecanada (Post 3157105)
So it looks like it removed it, but then I did a cold reboot and it is still on my Desktop.

But did you see it actually disappeared before rebooting?

b0uncer 05-19-2008 04:26 AM

Quote:

Originally Posted by harecanada (Post 3157105)
darrell@harecanada-desktop:~/Desktop$ ls -l *.exe
-rw-r--r-- 1 darrell darrell 0 2008-05-18 13:14 SU
darrell@harecanada-desktop:~/Desktop$ lsattr *.exe
------------------ SUPERsetup.exe

Ok so it indeed seems to be in your desktop (the files visible in your "desktop" are in the /home/darrell/Desktop directory -- that is, ~/Desktop). If you use lsattr, it prints the dashes in front of the filename, but they are not part of it -- hence trying to remove "------------------SUPERsetup.exe" will fail, because the file does not have dashes in it's name.

Did you try to select the file on your desktop with your mouse, then hold SHIFT key, press DELETE key and release SHIFT? Did it work or did you get an error?

On the command line you can try this:
Code:

cd
find Desktop -name "*.exe"

That first changes current working directory to your home directory and then uses 'find' to find any files that are somewhere under your desktop directory (or it's subdirectories) whose file ends with .exe -- shortly, that should print the SUPERsetup.exe if it is there. And if it indeed prints it, you can use the same approach to remove it:
Code:

find Desktop -name "*.exe" -exec rm -i '{}' +
That should ask you one by one whether you'd like to remove any files that have .exe in the end. Answer 'y' (and hit ENTER to confirm) for the SUPERsetup.exe, and 'n' for any other files it finds that you do not want to remove.
Or just use rm -i with the full filename you got from 'find':
Code:

rm -i Desktop/SUPERsetup.exe
^in the above I assume 'find' printed "Desktop/SUPERsetup.exe".

Filenames are case sensitive, so SUPERsetup.exe and SUPErsetup.exe are two different things - be careful when typing. And if the filename contains any special characters such as spaces, quotation marks, parenthesis or such, you should either use escape character (slash \) in front of each of those special characters, or just enclose the whole filename into quotes, like "filename.exe" to prevent the shell from interpreting the special characters when there is no need for that.


All times are GMT -5. The time now is 12:45 AM.