LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > 4MLinux
User Name
Password
4MLinux This forum is for the discussion of 4MLinux.

Notices


Reply
  Search this Thread
Old 12-19-2020, 08:22 PM   #1
4ML220
LQ Newbie
 
Registered: Aug 2017
Posts: 16

Rep: Reputation: Disabled
Change default user $HOME location folders paths?


Hi guys.
Cloud you plese help me how to change the default paths of the default user folders (Documents, Downloads, Music, Pictures, Screenhots, Videos) to my location on diferent /dev/sda with ntfs?

After instalation 4Mlinux v34.2 from LiveCD to PC hdd I'd like to set my own default folders paths for all system and applications.

my MBR hdd is:
/dev/sda1 ntfs winboot 100 MB
/dev/sda2 ntfs win7x64 100 GB
/dev/sda3 ntfs dataall 300 GB
/dev/sda4 extended lba
/dev/sda5 ext4 4mlinux 25 GB


So after installation the default paths are all to /dev/sda5/root/:
Documents
Downloads
Music
Pictures
Screenshots
Videos


How or where can I please set all these defaults to the diferent new default path - onto diferent device /dev/sda3/ (which is ntfs)?

By the internet info I was looking for config files simular to:
/etc/fstab.local
/etc/default/user
/etc/gconf/gconf.xml
/etc/user.conf
/root/.config/user-dirs.dirs

or for files with settings:
XDG_DOCUMENTS_DIR
or $HOME/Documents

... but didn't find any of it

Or should I - instead of changing paths - erase those folders and just do-set symlinks rather so system and all applications will recognize it?
 
Old 12-20-2020, 04:18 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Sorry, is 4MLinux a "run as root" type distro?
In any case, I'd look at
Code:
$HOME/.config/user-dirs.defaults
$HOME/.config/user-dirs.dirs
It should contain what you need.
After editing these files, either the folders change automagically, or you rename them once and for all.

Everything else you wrote does not appear to be relevant to your question.
 
Old 12-20-2020, 12:26 PM   #3
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 1,270

Rep: Reputation: 220Reputation: 220Reputation: 220
Hi,

I understand that you want to make this change in 4MLinux. The default root's home is defined in the /etc/passwd file. You can try to edit this file. You should also remove the /etc/lang folder and reboot.

.

PS.
During each startup 4MLinux checks if the /etc/lang folder exists. If the folder is missing, 4MLinux "thinks" that this a new installation and it starts to configure the system (e.g. it creates the Desktop folder, the Downloads folder and the like).

Last edited by zk1234; 12-20-2020 at 03:40 PM.
 
Old 12-20-2020, 04:52 PM   #4
4ML220
LQ Newbie
 
Registered: Aug 2017
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thank you both guys of you for the tips :-).
Yes it is about "run as root" and 4MLinux please.
I'm sorry for everything which I wrote abowe does not appear to be relevant to the question.
I was trying to give right away as many info as need 'cos - of course I did not find answers on the internet before I wrote here.

There's no such a files (or similar to any as abowe):
user-dirs.defaults
user-dirs.dirs
in whole installed system.

The /etc/passwd file shows me the "Home directory" - the absolute path to the user’s home directory.
OK, I dis some web search and I will try to add in it:

Documents:x:0:0ocuments:/dev/sda3/Documents:/usr/sbin/nologin
Downloads:x:0:0ownloads:/dev/sda3/Documents/Downloads:/usr/sbin/nologin
Music:x:0:0:Music:/dev/sda3/Documents/Music:/usr/sbin/nologin
Pictures:x:0:0:Pictures:/dev/sda3/Documents/Pictures:/usr/sbin/nologin
Screenshots:x:0:0:Screenshots:/dev/sda3/Documents/Pictures:/usr/sbin/nologin
Videos:x:0:0:Videos:/dev/sda3/Documents/Videos:/usr/sbin/nologin



I don't wanna change USER or HOME directory - I just wanna set default folders:
Documents
Downloads
Music
Pictures
Screenshots
Videos

... to another disk (sda3, ntfs).

Or should I - instead of changing defaulth paths - erase those folders and just do-set symlinks which will leads to another /disk/folder?
 
Old 12-20-2020, 06:37 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,340

Rep: Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146
Yes, as far as I know you can create a symbolic to a /disk/folder on an NTFS filesystem assuming your mounting it with the correct permissions and its mounted at boot time via /etc/fstab.
 
Old 12-22-2020, 08:33 PM   #6
4ML220
LQ Newbie
 
Registered: Aug 2017
Posts: 16

Original Poster
Rep: Reputation: Disabled
OK, done, it works well now:
So I just erased those directories & replaced them with symlinks which leads to another disk (sda3, ntfs).
Thank you guys for your help.
[SOLVED]
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Change user default folders location Denise51781 Linux - Newbie 2 11-23-2018 10:24 PM
[SOLVED] Deepin File Manager - Change location of or delete default Documents, Pictures, etc folders CastyMcBoozer Linux Deepin 3 09-12-2017 01:37 AM
[SOLVED] How can i change my HOME (/home/user) directory location to something else? QueenZ Linux - Newbie 6 08-05-2010 07:26 AM
How to change the user home & other paths like trash can Four Linux - Newbie 6 05-13-2006 01:09 PM
Automatically resolving WINDOWS paths to pre-configured Linux paths gazzy Linux - General 1 09-05-2003 11:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > 4MLinux

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration