LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-31-2016, 07:59 AM   #1
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
using only one /home with more than one Linux root system


I got to thinking just a few minutes ago about what @Hydrurga has said in another post where Hydrurga and I where in. commenting on it is a good idea to wipe out the home as well as the root directories on a fresh install. Due to probability of conflict of old files mingling with the new install files that are within the home directory.

As well as what others have said about it not being a good idea to run a dual system setup so that both Linux Systems use the same /home due to the .xinitrc, .xprofile, among other basic files that are used by the system when starting a session. This all being said with warrant.

if one uses just one /home partition and two or more distros. They all share this same /home the results being that things then can get confusing for the system because the other system too access the same files and can make changes to them resulting in conflict between the two different systems.

A thought entered into my mind that all one would have to do is a little bit of programming to have the system check which distro is starting up then have it go to a blocked off section just for that distro to use to keep it from mingling where it is not suppose to.

seeings how this is just the beginning of a thought. I have not completed it. Not everything sticking little detail has been worked out to see if this theory will work or not. The furthest I've gotten is this little bit of code. I have not tried it on a start up of the system though, (yet).

Code:
#!/bin/bash

distro=$( cat /etc/*-release | grep ^ID )
cksum="ID=\"void\""

if [[ "$distro" == "$cksum" ]] ; then
echo "$distro"
else
echo "Don\'t Know"
fi
Knowing prior to running it what the output of the code will look like the variable cksum then can be set. Knowing the output of the second distro would look like then the test could be set to check against it.
resulting in something like this.

Code:
#!/bin/bash

distro=$( cat /etc/*-release | grep ^ID )
cksum="ID=\"void\""

if [[ "$distro" == "$cksum" ]] ; then


#run everything that is used by void in this block

else

#run everything that is used by the other distro no matter what it is in 
this block.

fi
This thought only goes towards the .bashrc file and or the .xinitrc because most distro's that uses a login manager do not use the .xinitrc, whereas all distro's do use the .bashrc

But what I have here is a proto type of what could be used to build off of in order to run two distro's sharing the same /home and not acquiring conflict between the two as a result of each distro modifying configuration files within the /home/user directory.

most configuration files the changes would be wanted. FireFox or whatever web browser, added bookmarks, and settings changed with one distro would not the user want to see them same bookmarks if he or she where to run the other distro using the same /home/user to alleviate having to go though the internet and finding them again then adding them again, or having to reboot back into that other distro to use them?

So I guess the next question would be. What application configuration files would really be needed to be worried about in order to keep the two systems from fighting against each other in changing what they should leave alone by giving them their own part of that configure file to use for themselves?

The only thing that does come to my mind is just the .x files used for a session that most systems do not use if using a log in manager.

I am assuming it'd only need to go into the .xinitrc file, but I could be wrong. Anyone want to venture into this and add your thoughts?

all comments welcomed within the guild lines and rules of LQ.

Last edited by BW-userx; 03-31-2016 at 08:25 AM.
 
Old 03-31-2016, 09:55 AM   #2
petelq
Member
 
Registered: Aug 2008
Location: Yorkshire
Distribution: openSUSE(Leap and Tumbleweed) and a (not so) regularly changing third and fourth
Posts: 627

Rep: Reputation: Disabled
I've used one /home folder for quite some time now. At the moment I have opensuse tumbleweed and leap, both with kde plasma. But in the past I've also had Ubuntu and others.
All I do to make it work is to have two separate users (both me) and a joint /home2 for my own files common to both. For example a libreoffice calc file can be opened in any of the distros I've used.
I've had no problems with that.

Last edited by petelq; 03-31-2016 at 09:56 AM.
 
Old 03-31-2016, 10:11 AM   #3
offgridguy
Senior Member
 
Registered: Nov 2015
Location: Alberta Canada
Distribution: Windows10, Debian
Posts: 1,109

Rep: Reputation: 147Reputation: 147
Thumbs up

Quote:
Originally Posted by petelq View Post
I've used one /home folder for quite some time now. At the moment I have opensuse tumbleweed and leap, both with kde plasma. But in the past I've also had Ubuntu and others.
All I do to make it work is to have two separate users (both me) and a joint /home2 for my own files common to both. For example a libreoffice calc file can be opened in any of the distros I've used.
I've had no problems with that.
I have never used a separate partition for home, although I have read about the merit of doing so.
I always thought it should be easy and trouble free.
Thanks Pete.
 
Old 03-31-2016, 10:19 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
I've always/only used Xfce on the same /home partition for about 5 years now.
I would not expect different Desktop Environments to play well across distributions.
 
Old 03-31-2016, 10:21 AM   #5
przemo
Member
 
Registered: Feb 2016
Location: cork.ie
Distribution: Slackware-current
Posts: 162

Rep: Reputation: Disabled
dunno that your idea might work especially for different kinds of desktop environment but i found no problem from copying my whole /home/user from debian to slackware on ssd and back after reinstaling debian on hde, but i use only tiny dwm

ps. but there is no problem with sharing one /home among many users with different accounts this is pretty old idea and cool client`s/server setup with /home via NFS.

Last edited by przemo; 04-01-2016 at 03:34 AM.
 
Old 03-31-2016, 07:10 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Wondering about using links and filesystem permissions to do this.????
 
Old 03-31-2016, 08:10 PM   #7
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
It was implied, but I should have been explicitly stated as /home/user but it was like 5AM when I wrote that. If I can use that for an excuse. Like Slackware off the command line startx uses .xinitrc to find out what DT/WM to start. whereas Debian uses a login manager to tell the system what DT/WM to start.

two: as stated if one only uses the same DT/WM in all of the different Distros then it should not matter. But every time I've brought up using the same /home/user for different distros with dual boot (long time ago) and later times seen others with that same Idea. I'll read others stating it is not a good Idea due to the mingling of config files.
 
Old 03-31-2016, 08:20 PM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by przemo View Post
dunno that your idea might work especially for different kinds of desktop environment but i found no problem from copying my whole /home from debian to slackware on ssd and back after reinstaling debian on hde, but i use only tiny dwm

ps. but there is no problem with sharing one /home among many users with different accounts this is pretty old idea and cool client`s/server setup with /home via NFS.
I've done likewise mostly with just using config files that I needed from debian to a different distro and they worked fine.


With all of this reading thus far,I don't even see what problems may arise, at the present moment without actually applying a live testing. Which would require VBox so I'd not have to deal with my actual installed system.
 
Old 04-01-2016, 10:02 AM   #9
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
From my little bit of toying around a shared home is not a good idea for exactly the reason of occasional file conflicts. I get around this with a /data partition with my stuff in it, then symlinked into each installations /home. Data is always the same and /home gets wiped out when I re-install or whatever. Best of both worlds.
 
Old 04-01-2016, 10:13 AM   #10
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by jmgibson1981 View Post
From my little bit of toying around a shared home is not a good idea for exactly the reason of occasional file conflicts. I get around this with a /data partition with my stuff in it, then symlinked into each installations /home. Data is always the same and /home gets wiped out when I re-install or whatever. Best of both worlds.
symlinked? like
Code:
sudo ln -s /path/to/data/partition /home/user/datax <or some dir name> ?
I've always just mounted the data partition in fstab
Code:
/dev/sdax   /media/data   ext4 <or whatever format it happens to be that day> defaults 0 3
then it just shows up in the file manager when ever I open one up. But a link works to obviously.
 
Old 04-01-2016, 11:57 AM   #11
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
The individual folders typically in home get linked from my data partition into /home. So for my use it runs as though it is all normal and seamless. I don't just link /data into /home.
 
Old 04-01-2016, 08:59 PM   #12
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
To build on what jmgibson1981 said, if you try to use one /home across multiple distros in a multi-boot system, there is a good chance that you will encounter conflicts amongst settings and data stored in the hidden dot-config files.
 
Old 04-01-2016, 09:30 PM   #13
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by frankbell View Post
To build on what jmgibson1981 said, if you try to use one /home across multiple distros in a multi-boot system, there is a good chance that you will encounter conflicts amongst settings and data stored in the hidden dot-config files.
that is a rather general statement, can you give me stats on that, actual data to prove this theory?
 
Old 04-01-2016, 09:39 PM   #14
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
No, I can't give you stats from my personal experience. I have heard testimony from persons who have run into problems in such situations, but I can't provide citations, as I didn't bookmark them.

I can give you a for instance: Suppose you installed two distros that both used Gnome and you configured your Gnome one way in one distro. That configuration would then take effect in the other distro also, even if you didn't want it to.

If you do give it a whirl, please let us know how it works out.

All I can say is that, based on my experience with Linux, it's not something I would attempt.

Last edited by frankbell; 04-01-2016 at 09:41 PM.
 
Old 04-01-2016, 10:07 PM   #15
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,111
Blog Entries: 21

Rep: Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474
Quote:
Originally Posted by BW-userx View Post
that is a rather general statement, can you give me stats on that, actual data to prove this theory?
Kinda a example

http://antix.freeforums.org/viewtopic.php?f=53&t=6317

Edit: I do the same as jmgibson1981. I symlink which folders I want to keep off of home taking up space in /media/_data and arrange the /media/_data mount as user on bootup by editing /etc/fstab. That keeps my /home slim and trim. Makes re-installs or edition upgrades a breeze also,

Last edited by rokytnji; 04-01-2016 at 10:19 PM.
 
  


Reply



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
User does int getting home directory in root home in ubuntu 10.04 lucid lynx sunrised24 Linux - Server 2 03-07-2012 09:21 AM
I erased /home/root and now can not administer the system tfallon Linux - Newbie 4 01-10-2010 03:43 PM
Help me build a great home 64-bit home Linux system walterbyrd Linux - Hardware 14 01-10-2009 08:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:02 PM.

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