Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

Create symlink bug

Report Bugs, Issues and non- pacakage Requests
Post Reply
Message
Author
User avatar
Guido
Forum Novice
Forum  Novice
Posts: 27
Joined: Sat Nov 10, 2018 4:21 pm

Create symlink bug

#1 Post by Guido » Fri Nov 16, 2018 9:15 am

Hopefully, this is the place to report bugs.
Using MX 17.1_x86_64, XFCE 4.12.3

I used the right click on the desktop to create a symlink. I was expecting it to open a dialog to ask me to select the file or directory to symlink to (design flaw), but instead it created a symlink to the Desktop directory. Not what I wanted.

So, I tried to delete it, and it said that it did, but the icon remains on the desktop. I can't delete the icon. It complains that it can't find the file to delete. This is true. The symlink in the Desktop folder is gone, but the icon remains on the desktop, it's movable, just can't get rid of it.

Is this a known XFCE bug?

User avatar
Richard
Posts: 2266
Joined: Fri Dec 12, 2008 10:31 am

Re: Create symlink bug

#2 Post by Richard » Fri Nov 16, 2018 12:59 pm

With Thunar,
highlight the file/app to be placed on desktop as a symlink.
Right click, on that file/app then select Send To > Desktop (create link)
MX18b1: Lenovo T430: Intel Ivy Bridge i5-3320M, 8GB RAM, 4.9.0-8-amd64, 119 GB SSD
MX18b1: Eee&AA1 NBs: Dual Core Atom N270, 1GB RAM, 4.19.0-1-686, 150 GB HDD
DoubleCmd/Thunar, LibO613, Dropbox, Vivaldi/Firefox, CherryTree, Vbox. LinuxCounter #208633

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 2451
Joined: Wed Apr 11, 2018 5:09 pm

Re: Create symlink bug

#3 Post by fehlix » Fri Nov 16, 2018 1:10 pm

Guido wrote:
Fri Nov 16, 2018 9:15 am
I used the right click on the desktop to create a symlink. I was expecting it to open a dialog to ask me to select the file or directory to symlink to (design flaw), but instead it created a symlink to the Desktop directory. Not what I wanted.

So, I tried to delete it, and it said that it did, but the icon remains on the desktop. I can't delete the icon. It complains that it can't find the file to delete. This is true. The symlink in the Desktop folder is gone, but the icon remains on the desktop, it's movable, just can't get rid of it.
I'd probably not call it a "Create symlink bug".
The issues you are describing are related to at least two of those:
1: without having selected anything Thunar actions defaults to have the current folder "selected".
=> That's the reason the Symlink appeared to be the current folder (the desktop-folder) itself.

2: Removing an item from desktop: It depends a bit how this removing is performed.
In theory the desktop-manager shall watch out for changes within the desktop directory.
But it happens that the displayed items are not in the sync with the files within the desktop
directory itself. In such rare cases it's often advisable to "reload" the desktop.
Similar out-of-sync display issues happen sometimes with the displayed panel.

For such situations I created a keyboard shortcut to trigger the "Reload Desktop and Panel"
using the key-combo Shift+Scroll_Lock.
The shortcut can be created either within Settings->Keyboard
or with this one-liner

Code: Select all

xfconf-query -c xfce4-keyboard-shortcuts -p '/commands/custom/<Shift>Scroll_Lock' -n -t string -s "sh -c 'xfdesktop --reload; xfce4-panel --restart'"
The command involved are:

Code: Select all

xfdesktop --reload
xfce4-panel --restart
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Guido
Forum Novice
Forum  Novice
Posts: 27
Joined: Sat Nov 10, 2018 4:21 pm

Re: Create symlink bug

#4 Post by Guido » Sat Nov 17, 2018 1:56 pm

Thanks for the xfdesktop --reload. That was painless. Fixed the problem. Took me longer to write this reply than the fix the problem. :happy:

Thunar + XFCE desktop have some clear deficiencies when working with symlinks.
1) Dragging & dropping to the desktop from Thunar moves a file/directory & does not ask whether creating a copy or symlink is requested. Why? Even if there is some secret command key or keyboard shortcut configuration that I could do (which I'm sure there is, I just don't know it), it would be an unadvertised special, a design deficiency.
2) Nobody wants a symlink to the desktop to be created on the desktop by default. It's demonstrably a bad idea. I would call that a bug.
3) I tried to reproduce the bug where the symlink wouldn't delete; here's what happened. On the second time, it created a symlink to the Desktop on the Desktop. I then deleted successfully. I then tried to create the same thing a third time, this failed to create a symlink. I tried to create a symlink a fourth time, this also failed. I then ran xfdesktop --reload and both the symlinks showed up on the desktop. I then successfully deleted both. So, this is also a bug. It's not a very reproducible one, and one that you probably shouldn't fix. The real problem is that nobody wants a symlink to the Desktop on the Desktop, they want a symlink to something else. Making this work correctly is pointless.

User avatar
richb
Administrator
Posts: 17552
Joined: Wed Jul 12, 2006 2:17 pm

Re: Create symlink bug

#5 Post by richb » Sat Nov 17, 2018 1:58 pm

Guido wrote:
Sat Nov 17, 2018 1:56 pm
Thanks for the xfdesktop --reload. That was painless. Fixed the problem. Took me longer to write this reply than the fix the problem. :happy:

Thunar + XFCE desktop have some clear deficiencies when working with symlinks.
1) Dragging & dropping to the desktop from Thunar moves a file/directory & does not ask whether creating a copy or symlink is requested. Why? Even if there is some secret command key or keyboard shortcut configuration that I could do (which I'm sure there is, I just don't know it), it would be an unadvertised special, a design deficiency.
2) Nobody wants a symlink to the desktop to be created on the desktop by default. It's demonstrably a bad idea. I would call that a bug.
3) I tried to reproduce the bug where the symlink wouldn't delete; here's what happened. On the second time, it created a symlink to the Desktop on the Desktop. I then deleted successfully. I then tried to create the same thing a third time, this failed to create a symlink. I tried to create a symlink a fourth time, this also failed. I then ran xfdesktop --reload and both the symlinks showed up on the desktop. I then successfully deleted both. So, this is also a bug. It's not a very reproducible one, and one that you probably shouldn't fix. The real problem is that nobody wants a symlink to the Desktop on the Desktop, they want a symlink to something else. Making this work correctly is pointless.
I would suggest you post in the XFCE Forum since it is an XFCE issue.
Forum Rules
Guide - How to Ask for Help

Rich
SSD Production: MX 17.1
AMD A8 7600 FM2+ CPU R7 Graphics, 16 GIG Mem. Three Samsung EVO SSD's 250 GB, 350 GB HD

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 2451
Joined: Wed Apr 11, 2018 5:09 pm

Re: Create symlink bug

#6 Post by fehlix » Sat Nov 17, 2018 2:13 pm

Guido wrote:
Sat Nov 17, 2018 1:56 pm
Thunar + XFCE desktop have some clear deficiencies when working with symlinks.
1) Dragging & dropping to the desktop from Thunar moves a file/directory & does not ask whether creating a copy or symlink is requested. Why? Even if there is some secret command key or keyboard shortcut configuration that I could do (which I'm sure there is, I just don't know it), it would be an unadvertised special, a design deficiency.
It's per design and configurable: The defaults for local files are:
Move : Just Drag
Copy : Ctrl + Drag
Guido wrote:
Sat Nov 17, 2018 1:56 pm
2) Nobody wants a symlink to the desktop to be created on the desktop by default. It's demonstrably a bad idea. I would call that a bug.
That's a limitation of the custom action involved.
Hint: You shall better post a nice formulated and dedicated Change Request to change this and not such a generic "This is a bug" request. ;)
Or even better: provide a "fixed" custom action, with a request to adopt your proposal. :cool:
Guido wrote:
Sat Nov 17, 2018 1:56 pm
3) I tried to reproduce the bug where the symlink wouldn't delete; here's what happened. On the second time, it created a symlink to the Desktop on the Desktop. I then deleted successfully. I then tried to create the same thing a third time, this failed to create a symlink. I tried to create a symlink a fourth time, this also failed. I then ran xfdesktop --reload and both the symlinks showed up on the desktop. I then successfully deleted both. So, this is also a bug. It's not a very reproducible one, and one that you probably shouldn't fix. The real problem is that nobody wants a symlink to the Desktop on the Desktop, they want a symlink to something else. Making this work correctly is pointless.
What you describe is still caused by what I have described in my post above already. The error is related to the desktop display /reload refresh issue. Which as a very long known issue in XFCE. Hence the keyboard-short-cut as a workaround.
I guess the XFce folks, would be happy to get this sorted and do welcome every help ;=)
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Guido
Forum Novice
Forum  Novice
Posts: 27
Joined: Sat Nov 10, 2018 4:21 pm

Re: Create symlink bug

#7 Post by Guido » Sun Nov 18, 2018 9:04 am

The create symlink options on the desktop and the custom actions via Thunar are actually controlled from two different places, even though they appear similar.

I'm working on a fix, but I have to recompile XFCE to fix the desktop issue (something I was going to do anyway), and Thunar seems to have trouble accepting bash commands. Not sure what's going on there. I have too many other things to work on right now, but I'll come back to this with a fix at some point.

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 2451
Joined: Wed Apr 11, 2018 5:09 pm

Re: Create symlink bug

#8 Post by fehlix » Sun Nov 18, 2018 10:37 am

Guido wrote:
Sun Nov 18, 2018 9:04 am
I'm working on a fix, but I have to recompile XFCE to fix the desktop issue (something I was going to do anyway), and Thunar seems to have trouble accepting bash commands.
Here a workaround fix to avoid the create symlink issues for Thunar Actions "Create Symlink".
It makes the action doing nothing if nothing was selected. :cool:
The fixed command looks like this:

Code: Select all

bash -c 'F="$1"; N="$2";  P=$(readlink -f "$PWD"); R=$(readlink -f "$F"); [ "$P" = "$R" ] && exit; ln -s "$F" "$N (symlink)"' - %f %n
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Guido
Forum Novice
Forum  Novice
Posts: 27
Joined: Sat Nov 10, 2018 4:21 pm

Re: Create symlink bug

#9 Post by Guido » Sun Nov 18, 2018 12:18 pm

fehlix wrote:
Sun Nov 18, 2018 10:37 am

Code: Select all

bash -c 'F="$1"; N="$2";  P=$(readlink -f "$PWD"); R=$(readlink -f "$F"); [ "$P" = "$R" ] && exit; ln -s "$F" "$N (symlink)"' - %f %n
That is a clever script. Thanks.

Post Reply

Return to “Bugs and Non-Package Requests Forum”