Page 1 of 1

[solved] Deleting .trash from external media

PostPosted: Jan 31st, '17, 20:25
by Garthhh
I found this
viewtopic.php?f=7&t=7654

alt F2>kdesu dolphin
entered password
root dolphin opens

navigate to .Trash-500
shift delete no effect
configured toolbar to include Delete, which is greyed out
same with files within the folder
all options are available for files on the local HDD

are there other options, i'm not understanding?

Re: Deleting .trash from external media

PostPosted: Feb 1st, '17, 03:57
by benmc
Dolphin will allow you to view the permissions of a file.

Invoke Dolphin, right click the .Trash-500, the choose the permissions tab.
Whom does the "user" and "group" belong to?
If both are blank,
Code: Select all
kdesu dolphin
again and change them to "root" or "your_user_name".
you should now be able to delete the folder.

You may have to invoke Dolphin as root:
Code: Select all
$ su -
password:
# dolphin


Use with care.

Re: Deleting .trash from external media

PostPosted: Feb 1st, '17, 11:11
by gohlip
Directory in external media is most likely not user owned.
Use 'chown' to set permission for user.
To be sure, user must be in sudoer list.

"delete' then will not require sudo rights.

As for "kdesu dolphin", repeat "Use with care." Almost certainly do not use it at all.
Use 'user dolphin' and if require 'sudo rights', then at dolphin command (F4), use "sudo ...." or "kdesu ..........."; Never "kdesu dolphin"; that will give 'root dolphin', not 'user dolphin', always bad.

ps: preferably same goes for 'su -' in terminal (though not as fatal), create sym-links so we can use "sudo" or "kdesu" in user terminal. Avoid root terminal.

Re: Deleting .trash from external media

PostPosted: Feb 4th, '17, 19:30
by Garthhh
benmc wrote:Dolphin will allow you to view the permissions of a file.

Invoke Dolphin, right click the .Trash-500, the choose the permissions tab.
Whom does the "user" and "group" belong to?
If both are blank,
Code: Select all
kdesu dolphin
again and change them to "root" or "your_user_name".
you should now be able to delete the folder.

You may have to invoke Dolphin as root:
Code: Select all
$ su -
password:
# dolphin


Use with care.


Dolphin won't let me change permissions
Root Dolphin won't allow me to access permissions

Re: Deleting .trash from external media

PostPosted: Feb 4th, '17, 19:51
by Garthhh
gohlip wrote:Directory in external media is most likely not user owned.
Use 'chown' to set permission for user.
To be sure, user must be in sudoer list.

"delete' then will not require sudo rights.

As for "kdesu dolphin", repeat "Use with care." Almost certainly do not use it at all.
Use 'user dolphin' and if require 'sudo rights', then at dolphin command (F4), use "sudo ...." or "kdesu ..........."; Never "kdesu dolphin"; that will give 'root dolphin', not 'user dolphin', always bad.

ps: preferably same goes for 'su -' in terminal (though not as fatal), create sym-links so we can use "sudo" or "kdesu" in user terminal. Avoid root terminal.


thank you for the reply & patience
I looked up chown & am not able to follow the tutorials, which seem to assume a certain level of understanding
could you suggest one?

Re: Deleting .trash from external media

PostPosted: Feb 5th, '17, 14:32
by gohlip
Code: Select all
# chown <your username> <directory>


To make it recursive (plus all directories inside it)
Code: Select all
# chown -R <your username> <directory>


ps: (should have asked in my previous post)
won't "sudo rm -Rf <directory>" work?
Won't '# rm -Rf <directory>" work?
note: use 'rm -Rf <anything>' with care - doubly make sure directory name is there first before pressing <enter>

ps: uid - Mageia uses uid of 500 (I made my mageia uid 1000)
if directory (you want to trash) is originally uid 1000 (and yours 500), not sure if you need to further commands (like usermod).
Try above first and if won't work others can jump in with this uid thingy.

Re: Deleting .trash from external media

PostPosted: Feb 5th, '17, 14:42
by doktor5000
gohlip wrote:ps: uid - Mageia uses uid of 500 (I made my mageia uid 1000)
if directory (you want to trash) is originally uid 1000 (and yours 500), not sure if you need to further commands (like usermod).

FWIW, since mga5 we use UID 1000 as default for the first user, but upgraded systems will keep their UIDs.

Re: Deleting .trash from external media

PostPosted: Feb 5th, '17, 21:47
by Garthhh
gohlip wrote:
Code: Select all
# chown <your username> <directory>


To make it recursive (plus all directories inside it)
Code: Select all
# chown -R <your username> <directory>


ps: (should have asked in my previous post)
won't "sudo rm -Rf <directory>" work?
Won't '# rm -Rf <directory>" work?
note: use 'rm -Rf <anything>' with care - doubly make sure directory name is there first before pressing <enter>

ps: uid - Mageia uses uid of 500 (I made my mageia uid 1000)
if directory (you want to trash) is originally uid 1000 (and yours 500), not sure if you need to further commands (like usermod).
Try above first and if won't work others can jump in with this uid thingy.


I got to here
Code: Select all
[dash@localhost ~]$ chown -R /run/media/dash/F2E9-2034/.Trash-500
chown: missing operand after ‘/run/media/dash/F2E9-2034/.Trash-500’
Try 'chown --help' for more information.

Re: Deleting .trash from external media

PostPosted: Feb 5th, '17, 21:58
by gohlip
[dash@localhost ~]$ chown -R /run/media/dash/F2E9-2034/.Trash-500
chown: missing operand after ‘/run/media/dash/F2E9-2034/.Trash-500’

You're missing your username.
And you need to be root. [edit]

Code: Select all
# chown <your username> <directory>


Also "/run/media/..../..." (though that might work actually, I just don't use it) - Just try at your dolphin and open up a command (F4) - oh, never mind. Mageia can't use sudo (without sym-links) -
Or just mount partition first as /media/xxxx and ......... argh.... sorry. try it out first with /run/media/xxx/xx , let us know.

ps: /run/xx/xxx is a gnome thingy which I just dislike. It may work. try it.

Re: Deleting .trash from external media

PostPosted: Feb 5th, '17, 23:13
by doktor5000
gohlip wrote:ps: /run/xx/xxx is a gnome thingy which I just dislike. It may work. try it.

Not really, /run is in FHS: http://refspecs.linuxfoundation.org/FHS ... riableData

Re: Deleting .trash from external media

PostPosted: Feb 6th, '17, 00:48
by gohlip
Not really, /run is in FHS:
Correct. yes, it's also in kde. What I'm saying is it's pushed by the gnome people.

I sometimes get the feeling LFS is too gnome-centric, fedora-centric and awarding an award to Poettering?
That's a bit too much. Just saying.

Re: Deleting .trash from external media

PostPosted: Feb 6th, '17, 01:17
by doktor5000
Why does it matter whether something is mounted below /mnt, /media or /run ? But in any case, that's a bit offtopic here.

Re: Deleting .trash from external media

PostPosted: Feb 6th, '17, 06:58
by gohlip
Since you asked.....
When it worked well with mnt and media, why create another unnecessary run.

It's like having linuxefi and initrd16.
Useless, unnecessary

Re: Deleting .trash from external media

PostPosted: Feb 8th, '17, 19:00
by Garthhh
thanks for the replies
I'm not following
I'll go back to brute force move any files, reformat the media [card]
[solved] it is