Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: File Manager lf can only copy files to XDG folders (Read 168 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

File Manager lf can only copy files to XDG folders

Hey all, I'm very new to Linux but going to try and provide enough context on the issue. I'd also greatly appreciate any ideas on how to troubleshoot further and other things to look into.

A few days ago, I did a full disk encryption install of base Artix with runit. I then used a script called LARBS that sets up some basic programs. This is on a Thinkpad X240.

In my file manager, lf,  when I try to copy  files, I can only see XDG folders as options, and when I type in other folder names, it is not able to . I've attached a screenshot of how this looks.

"screenshots" is an example of a folder I made that I cannot files to in lf.

But even logged in as the same user, I am able to use the mv command in the terminal to move files to screenshots. I've looked at the permissions on screenshots and it reads: drwxrwxrxw matt matt. So I think the permissions are OK. When I'm using nvim, I am able to save to screenshots no problem.

I went into dmesg, and after running a move command in lf to screenshots and failing, I get the following message: [DRM] *ERROR* Failed to read source OUI. I think this is not related probably but including in case it's relevant (seems to be something about the display?).
I have tried adding new XDG folders but have not been able to send files to those through lf.

I was curious if I could get any insight from the lf config file.

Code: [Select]
cmd copyto ${{
set -f
clear; tput cup $(($(tput lines)/3))
dest=$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' "${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs" | fzf --layout=reverse --height 40% --prompt 'Copy to where? ' | sed 's|~|$HOME|')
[ -z "$dest" ] && exit
destpath=$(eval printf '%s' \"$dest\")
clear; tput cup $(($(tput lines)/3)); tput bold
echo "From:"
echo "$fx" | sed 's/^/   /'
printf "To:\n   %s\n\n\tcopy?[y/N]" "$destpath"
read -r ans
[ "$ans" != "y" ] && exit
for x in $fx; do
cp -ivr "$x" "$destpath"
done &&
notify-send "📋 File(s) copied." "File(s) copied to $destpath."
}}

Let me know if you need more info, but is this a permission, or mounting, or disk issue, or just a problem with how lf is set up? (I realize the later case is out of scope for this forum, but at this point I can't tell if it's a problem with lf or with how I've set up the OS).

Re: File Manager lf can only copy files to XDG folders

Reply #1
The way that you're trying to copy files right now is using a command that comes from the LARBS config file, and its purpose is to specifically make it easier to move files to common folders quicker, which are sourced from ~/.config/shell/bm-dirs

lf has an built-in copy function. While having a file selected, you can press y, go into a different folder of your choice and press p there. Does that work?
Quote
I've looked at the permissions on screenshots and it reads: drwxrwxrxw matt matt
Those permissions look concerning, basically any program can read/write this folder. Did you change them manually or were they like this after creation?

Re: File Manager lf can only copy files to XDG folders

Reply #2
Appreciate the heads up on that - I did manually change them, as part of my testing to try and isolate the issue. The default permission when I create a folder is drwxr-xr-x, which I think is the usual default for directories, as far as I could tell from researching.

And you're 100% right - the default paste works fine so seems like just an issue with the LARBS script. For some  reason this didn't come up in my searches. I do see now there's a quick reference page for LF with the default bindings. https://man.archlinux.org/man/lf.1#QUICK_REFERENCE.

Thank you very much - believe it or not, I've been trying to figure this one out for hours.

 
Artix forum uses a single cookie to remember youOK