rm -rf ~/Desktop - how to fix it and/or change the location The 2019 Stack Overflow Developer Survey Results Are InHow do I tell if a folder is actually a symlink and how do I fix it if it's broken?Access through samba to link to different filesystem in shared directory (permission error)Linux Mint desktop displays different files from ls commandDouble symlink (for partition and server)docker - how to run x desktop in a container?Installing programs on a removable driveHow to find which command is executed by a symlink?Desktop icons gone with nautilus file-manager in Debian 9What are possible reasons for xrdp service and rdp session manager failure?After moving root partition in Linux Lite (Lubuntu), do I need to run fsck?
What is the meaning of Triage in Cybersec world?
On the insanity of kings as an argument against monarchy
Landlord wants to switch my lease to a "Land contract" to "get back at the city"
What tool would a Roman-age civilization have to grind silver and other metals into dust?
What is the motivation for a law requiring 2 parties to consent for recording a conversation
Is there a name of the flying bionic bird?
Are USB sockets on wall outlets live all the time, even when the switch is off?
Does light intensity oscillate really fast since it is a wave?
How can I fix this gap between bookcases I made?
How are circuits which use complex ICs normally simulated?
Why can Shazam do this?
Where does the "burst of radiance" from Holy Weapon originate?
Carnot-Caratheodory metric
Why isn't airport relocation done gradually?
What is the steepest angle that a canal can be traversable without locks?
The difference between dialogue marks
Time travel alters history but people keep saying nothing's changed
Is it possible for the two major parties in the UK to form a coalition with each other instead of a much smaller party?
Inflated grade on resume at previous job, might former employer tell new employer?
Monty Hall variation
Spanish for "widget"
Lethal sonic weapons
What does "sndry explns" mean in one of the Hitchhiker's guide books?
How to deal with fear of taking dependencies
rm -rf ~/Desktop - how to fix it and/or change the location
The 2019 Stack Overflow Developer Survey Results Are InHow do I tell if a folder is actually a symlink and how do I fix it if it's broken?Access through samba to link to different filesystem in shared directory (permission error)Linux Mint desktop displays different files from ls commandDouble symlink (for partition and server)docker - how to run x desktop in a container?Installing programs on a removable driveHow to find which command is executed by a symlink?Desktop icons gone with nautilus file-manager in Debian 9What are possible reasons for xrdp service and rdp session manager failure?After moving root partition in Linux Lite (Lubuntu), do I need to run fsck?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I was trying to symlink Windows desktop with Lubuntu desktop folder, but have in the process removed the Lubuntu folder completely. I know I can't recover the lost files, but how do I fix this now, since the desktop functionality is now somewhat broken? And/or how do I then symlink a folder (which will be a Windows desktop folder) to Lubuntu desktop folder, so that my Lubuntu and Windows OS share the same desktop? Are there any downsides to this?
EDIT: I'm using dual boot. I have already mounted the data Windows partition and can access it in Linux.
symlink desktop lubuntu
add a comment |
I was trying to symlink Windows desktop with Lubuntu desktop folder, but have in the process removed the Lubuntu folder completely. I know I can't recover the lost files, but how do I fix this now, since the desktop functionality is now somewhat broken? And/or how do I then symlink a folder (which will be a Windows desktop folder) to Lubuntu desktop folder, so that my Lubuntu and Windows OS share the same desktop? Are there any downsides to this?
EDIT: I'm using dual boot. I have already mounted the data Windows partition and can access it in Linux.
symlink desktop lubuntu
How are they sharing (virtual-machine, duel-boot, other)?
– ctrl-alt-delor
Apr 3 at 6:51
I have edited the question.
– user2340939
Apr 3 at 19:54
add a comment |
I was trying to symlink Windows desktop with Lubuntu desktop folder, but have in the process removed the Lubuntu folder completely. I know I can't recover the lost files, but how do I fix this now, since the desktop functionality is now somewhat broken? And/or how do I then symlink a folder (which will be a Windows desktop folder) to Lubuntu desktop folder, so that my Lubuntu and Windows OS share the same desktop? Are there any downsides to this?
EDIT: I'm using dual boot. I have already mounted the data Windows partition and can access it in Linux.
symlink desktop lubuntu
I was trying to symlink Windows desktop with Lubuntu desktop folder, but have in the process removed the Lubuntu folder completely. I know I can't recover the lost files, but how do I fix this now, since the desktop functionality is now somewhat broken? And/or how do I then symlink a folder (which will be a Windows desktop folder) to Lubuntu desktop folder, so that my Lubuntu and Windows OS share the same desktop? Are there any downsides to this?
EDIT: I'm using dual boot. I have already mounted the data Windows partition and can access it in Linux.
symlink desktop lubuntu
symlink desktop lubuntu
edited Apr 3 at 19:53
user2340939
asked Apr 3 at 6:20
user2340939user2340939
1064
1064
How are they sharing (virtual-machine, duel-boot, other)?
– ctrl-alt-delor
Apr 3 at 6:51
I have edited the question.
– user2340939
Apr 3 at 19:54
add a comment |
How are they sharing (virtual-machine, duel-boot, other)?
– ctrl-alt-delor
Apr 3 at 6:51
I have edited the question.
– user2340939
Apr 3 at 19:54
How are they sharing (virtual-machine, duel-boot, other)?
– ctrl-alt-delor
Apr 3 at 6:51
How are they sharing (virtual-machine, duel-boot, other)?
– ctrl-alt-delor
Apr 3 at 6:51
I have edited the question.
– user2340939
Apr 3 at 19:54
I have edited the question.
– user2340939
Apr 3 at 19:54
add a comment |
2 Answers
2
active
oldest
votes
Restoring ~/Desktop
I'm assuming you already ran mkdir ~/Desktop
to create the actual desktop folder.
As you didn't specify what part of your desktop functionality is now somewhat broken, my best guess is that when you tried to start without a valid desktop folder, your system instead assumed a new default (probably ~
).
As per this old post (and a whole lot of others), it should be enough to make sure your ~/.config/user-dirs.dirs
has this line somewhere in it:
XDG_DESKTOP_DIR="$HOME/Desktop"
(You may need to log out and back in/ restart for this to take effect.)
Using the Windows Desktop in Lubuntu
As with everything in the *NIX world, there are sevaral approaches to this that would/ should work.
One of these is to make ~/Desktop
a symlink that points to your Windows desktop. However, since this did not work for you, my guess is that whatever sanity-checker makes sure that your Desktop exists gets run before the windows partition gets mounted and thus "corrects" the path. So discard that idea.
Another approach that should work in theory is to simply adjust above config line to point directly to your Windows desktop folder. However, this will likely fail for the same reason as the first approach.
What should work regardless of any sanity-checking pre-mount -a
however is to simply use mount --bind
to mount the Windows desktop over your Lubuntu one - with the added benefit that it keeps working if the Windows partition is ever missing or damaged, only differing in content:
mount --bind /path/to/windows/desktop $HOME/Desktop
In fstab
this would look like this:
/path/to/windows/desktop /home/username/Desktop none bind
As long as you make sure that this gets run after the Windows partition is already mounted (probably by putting this line further down in fstab
), this should transparently provide your windows desktop in Lubuntu without messing with the underlying folder structure.
By putting that line in/etc/fstab
it just created another mounting point under/media/myname/Data
, which has an empty folder namedDesktop
. At it renamed my other data partition to/media/myname/Data1
.
– user2340939
Apr 6 at 15:28
That... is odd. Did themount
command work?
– Entropy0
Apr 6 at 16:27
Yes, but not on restart. See my answer.
– user2340939
Apr 6 at 16:43
add a comment |
The first part of @Entropy0's answer, i.e. restoring Desktop, worked, but the second part not quite. I then made it work with the help of https://superuser.com/questions/251537/mount-specific-ntfs-directory-on-linux.
So all I had to do, is put these two lines in /etc/fstab
.
/dev/<Windows_partition_name> /media/<some_linux_username>/<new_mount_directory_name> ntfs uid=<some_linux_user_id>,gid=<some_linux_group_id>,umask=0022,nls=utf8,defaults 0 0
/media/<some_linux_username>/<new_mount_directory_name>/Desktop /home/<some_linux_username>/Desktop ntfs-3g rbind,defaults 0 0
Now when I log into the Linux OS, the Desktop is already mapped to the Windows desktop. You can do the same for Documents, Pictures, etc., or you can just symlink them to /media/<some_linux_username>/<new_mount_directory_name>/Documents
, etc., which I did.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f510214%2frm-rf-desktop-how-to-fix-it-and-or-change-the-location%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Restoring ~/Desktop
I'm assuming you already ran mkdir ~/Desktop
to create the actual desktop folder.
As you didn't specify what part of your desktop functionality is now somewhat broken, my best guess is that when you tried to start without a valid desktop folder, your system instead assumed a new default (probably ~
).
As per this old post (and a whole lot of others), it should be enough to make sure your ~/.config/user-dirs.dirs
has this line somewhere in it:
XDG_DESKTOP_DIR="$HOME/Desktop"
(You may need to log out and back in/ restart for this to take effect.)
Using the Windows Desktop in Lubuntu
As with everything in the *NIX world, there are sevaral approaches to this that would/ should work.
One of these is to make ~/Desktop
a symlink that points to your Windows desktop. However, since this did not work for you, my guess is that whatever sanity-checker makes sure that your Desktop exists gets run before the windows partition gets mounted and thus "corrects" the path. So discard that idea.
Another approach that should work in theory is to simply adjust above config line to point directly to your Windows desktop folder. However, this will likely fail for the same reason as the first approach.
What should work regardless of any sanity-checking pre-mount -a
however is to simply use mount --bind
to mount the Windows desktop over your Lubuntu one - with the added benefit that it keeps working if the Windows partition is ever missing or damaged, only differing in content:
mount --bind /path/to/windows/desktop $HOME/Desktop
In fstab
this would look like this:
/path/to/windows/desktop /home/username/Desktop none bind
As long as you make sure that this gets run after the Windows partition is already mounted (probably by putting this line further down in fstab
), this should transparently provide your windows desktop in Lubuntu without messing with the underlying folder structure.
By putting that line in/etc/fstab
it just created another mounting point under/media/myname/Data
, which has an empty folder namedDesktop
. At it renamed my other data partition to/media/myname/Data1
.
– user2340939
Apr 6 at 15:28
That... is odd. Did themount
command work?
– Entropy0
Apr 6 at 16:27
Yes, but not on restart. See my answer.
– user2340939
Apr 6 at 16:43
add a comment |
Restoring ~/Desktop
I'm assuming you already ran mkdir ~/Desktop
to create the actual desktop folder.
As you didn't specify what part of your desktop functionality is now somewhat broken, my best guess is that when you tried to start without a valid desktop folder, your system instead assumed a new default (probably ~
).
As per this old post (and a whole lot of others), it should be enough to make sure your ~/.config/user-dirs.dirs
has this line somewhere in it:
XDG_DESKTOP_DIR="$HOME/Desktop"
(You may need to log out and back in/ restart for this to take effect.)
Using the Windows Desktop in Lubuntu
As with everything in the *NIX world, there are sevaral approaches to this that would/ should work.
One of these is to make ~/Desktop
a symlink that points to your Windows desktop. However, since this did not work for you, my guess is that whatever sanity-checker makes sure that your Desktop exists gets run before the windows partition gets mounted and thus "corrects" the path. So discard that idea.
Another approach that should work in theory is to simply adjust above config line to point directly to your Windows desktop folder. However, this will likely fail for the same reason as the first approach.
What should work regardless of any sanity-checking pre-mount -a
however is to simply use mount --bind
to mount the Windows desktop over your Lubuntu one - with the added benefit that it keeps working if the Windows partition is ever missing or damaged, only differing in content:
mount --bind /path/to/windows/desktop $HOME/Desktop
In fstab
this would look like this:
/path/to/windows/desktop /home/username/Desktop none bind
As long as you make sure that this gets run after the Windows partition is already mounted (probably by putting this line further down in fstab
), this should transparently provide your windows desktop in Lubuntu without messing with the underlying folder structure.
By putting that line in/etc/fstab
it just created another mounting point under/media/myname/Data
, which has an empty folder namedDesktop
. At it renamed my other data partition to/media/myname/Data1
.
– user2340939
Apr 6 at 15:28
That... is odd. Did themount
command work?
– Entropy0
Apr 6 at 16:27
Yes, but not on restart. See my answer.
– user2340939
Apr 6 at 16:43
add a comment |
Restoring ~/Desktop
I'm assuming you already ran mkdir ~/Desktop
to create the actual desktop folder.
As you didn't specify what part of your desktop functionality is now somewhat broken, my best guess is that when you tried to start without a valid desktop folder, your system instead assumed a new default (probably ~
).
As per this old post (and a whole lot of others), it should be enough to make sure your ~/.config/user-dirs.dirs
has this line somewhere in it:
XDG_DESKTOP_DIR="$HOME/Desktop"
(You may need to log out and back in/ restart for this to take effect.)
Using the Windows Desktop in Lubuntu
As with everything in the *NIX world, there are sevaral approaches to this that would/ should work.
One of these is to make ~/Desktop
a symlink that points to your Windows desktop. However, since this did not work for you, my guess is that whatever sanity-checker makes sure that your Desktop exists gets run before the windows partition gets mounted and thus "corrects" the path. So discard that idea.
Another approach that should work in theory is to simply adjust above config line to point directly to your Windows desktop folder. However, this will likely fail for the same reason as the first approach.
What should work regardless of any sanity-checking pre-mount -a
however is to simply use mount --bind
to mount the Windows desktop over your Lubuntu one - with the added benefit that it keeps working if the Windows partition is ever missing or damaged, only differing in content:
mount --bind /path/to/windows/desktop $HOME/Desktop
In fstab
this would look like this:
/path/to/windows/desktop /home/username/Desktop none bind
As long as you make sure that this gets run after the Windows partition is already mounted (probably by putting this line further down in fstab
), this should transparently provide your windows desktop in Lubuntu without messing with the underlying folder structure.
Restoring ~/Desktop
I'm assuming you already ran mkdir ~/Desktop
to create the actual desktop folder.
As you didn't specify what part of your desktop functionality is now somewhat broken, my best guess is that when you tried to start without a valid desktop folder, your system instead assumed a new default (probably ~
).
As per this old post (and a whole lot of others), it should be enough to make sure your ~/.config/user-dirs.dirs
has this line somewhere in it:
XDG_DESKTOP_DIR="$HOME/Desktop"
(You may need to log out and back in/ restart for this to take effect.)
Using the Windows Desktop in Lubuntu
As with everything in the *NIX world, there are sevaral approaches to this that would/ should work.
One of these is to make ~/Desktop
a symlink that points to your Windows desktop. However, since this did not work for you, my guess is that whatever sanity-checker makes sure that your Desktop exists gets run before the windows partition gets mounted and thus "corrects" the path. So discard that idea.
Another approach that should work in theory is to simply adjust above config line to point directly to your Windows desktop folder. However, this will likely fail for the same reason as the first approach.
What should work regardless of any sanity-checking pre-mount -a
however is to simply use mount --bind
to mount the Windows desktop over your Lubuntu one - with the added benefit that it keeps working if the Windows partition is ever missing or damaged, only differing in content:
mount --bind /path/to/windows/desktop $HOME/Desktop
In fstab
this would look like this:
/path/to/windows/desktop /home/username/Desktop none bind
As long as you make sure that this gets run after the Windows partition is already mounted (probably by putting this line further down in fstab
), this should transparently provide your windows desktop in Lubuntu without messing with the underlying folder structure.
edited Apr 6 at 17:24
answered Apr 3 at 21:19
Entropy0Entropy0
1664
1664
By putting that line in/etc/fstab
it just created another mounting point under/media/myname/Data
, which has an empty folder namedDesktop
. At it renamed my other data partition to/media/myname/Data1
.
– user2340939
Apr 6 at 15:28
That... is odd. Did themount
command work?
– Entropy0
Apr 6 at 16:27
Yes, but not on restart. See my answer.
– user2340939
Apr 6 at 16:43
add a comment |
By putting that line in/etc/fstab
it just created another mounting point under/media/myname/Data
, which has an empty folder namedDesktop
. At it renamed my other data partition to/media/myname/Data1
.
– user2340939
Apr 6 at 15:28
That... is odd. Did themount
command work?
– Entropy0
Apr 6 at 16:27
Yes, but not on restart. See my answer.
– user2340939
Apr 6 at 16:43
By putting that line in
/etc/fstab
it just created another mounting point under /media/myname/Data
, which has an empty folder named Desktop
. At it renamed my other data partition to /media/myname/Data1
.– user2340939
Apr 6 at 15:28
By putting that line in
/etc/fstab
it just created another mounting point under /media/myname/Data
, which has an empty folder named Desktop
. At it renamed my other data partition to /media/myname/Data1
.– user2340939
Apr 6 at 15:28
That... is odd. Did the
mount
command work?– Entropy0
Apr 6 at 16:27
That... is odd. Did the
mount
command work?– Entropy0
Apr 6 at 16:27
Yes, but not on restart. See my answer.
– user2340939
Apr 6 at 16:43
Yes, but not on restart. See my answer.
– user2340939
Apr 6 at 16:43
add a comment |
The first part of @Entropy0's answer, i.e. restoring Desktop, worked, but the second part not quite. I then made it work with the help of https://superuser.com/questions/251537/mount-specific-ntfs-directory-on-linux.
So all I had to do, is put these two lines in /etc/fstab
.
/dev/<Windows_partition_name> /media/<some_linux_username>/<new_mount_directory_name> ntfs uid=<some_linux_user_id>,gid=<some_linux_group_id>,umask=0022,nls=utf8,defaults 0 0
/media/<some_linux_username>/<new_mount_directory_name>/Desktop /home/<some_linux_username>/Desktop ntfs-3g rbind,defaults 0 0
Now when I log into the Linux OS, the Desktop is already mapped to the Windows desktop. You can do the same for Documents, Pictures, etc., or you can just symlink them to /media/<some_linux_username>/<new_mount_directory_name>/Documents
, etc., which I did.
add a comment |
The first part of @Entropy0's answer, i.e. restoring Desktop, worked, but the second part not quite. I then made it work with the help of https://superuser.com/questions/251537/mount-specific-ntfs-directory-on-linux.
So all I had to do, is put these two lines in /etc/fstab
.
/dev/<Windows_partition_name> /media/<some_linux_username>/<new_mount_directory_name> ntfs uid=<some_linux_user_id>,gid=<some_linux_group_id>,umask=0022,nls=utf8,defaults 0 0
/media/<some_linux_username>/<new_mount_directory_name>/Desktop /home/<some_linux_username>/Desktop ntfs-3g rbind,defaults 0 0
Now when I log into the Linux OS, the Desktop is already mapped to the Windows desktop. You can do the same for Documents, Pictures, etc., or you can just symlink them to /media/<some_linux_username>/<new_mount_directory_name>/Documents
, etc., which I did.
add a comment |
The first part of @Entropy0's answer, i.e. restoring Desktop, worked, but the second part not quite. I then made it work with the help of https://superuser.com/questions/251537/mount-specific-ntfs-directory-on-linux.
So all I had to do, is put these two lines in /etc/fstab
.
/dev/<Windows_partition_name> /media/<some_linux_username>/<new_mount_directory_name> ntfs uid=<some_linux_user_id>,gid=<some_linux_group_id>,umask=0022,nls=utf8,defaults 0 0
/media/<some_linux_username>/<new_mount_directory_name>/Desktop /home/<some_linux_username>/Desktop ntfs-3g rbind,defaults 0 0
Now when I log into the Linux OS, the Desktop is already mapped to the Windows desktop. You can do the same for Documents, Pictures, etc., or you can just symlink them to /media/<some_linux_username>/<new_mount_directory_name>/Documents
, etc., which I did.
The first part of @Entropy0's answer, i.e. restoring Desktop, worked, but the second part not quite. I then made it work with the help of https://superuser.com/questions/251537/mount-specific-ntfs-directory-on-linux.
So all I had to do, is put these two lines in /etc/fstab
.
/dev/<Windows_partition_name> /media/<some_linux_username>/<new_mount_directory_name> ntfs uid=<some_linux_user_id>,gid=<some_linux_group_id>,umask=0022,nls=utf8,defaults 0 0
/media/<some_linux_username>/<new_mount_directory_name>/Desktop /home/<some_linux_username>/Desktop ntfs-3g rbind,defaults 0 0
Now when I log into the Linux OS, the Desktop is already mapped to the Windows desktop. You can do the same for Documents, Pictures, etc., or you can just symlink them to /media/<some_linux_username>/<new_mount_directory_name>/Documents
, etc., which I did.
edited Apr 6 at 19:18
answered Apr 6 at 16:38
user2340939user2340939
1064
1064
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f510214%2frm-rf-desktop-how-to-fix-it-and-or-change-the-location%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
-desktop, lubuntu, symlink
How are they sharing (virtual-machine, duel-boot, other)?
– ctrl-alt-delor
Apr 3 at 6:51
I have edited the question.
– user2340939
Apr 3 at 19:54