This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Shared home directory

Tags: None
(comma "," separated)
AndySpiros
Registered Member
Posts
4
Karma
0
OS

Shared home directory

Sun Dec 22, 2013 2:02 pm
Hello.
I'm new to the forum, even I am a quite expert linux user. I did not find any other topic related to my question, so I'm posting a new one. Also, I'm not completely sure this is the right board and I apologize if I'm wrong.

I have two systems on my computer, a Gentoo one and a Sabayon one, both with KDE. I would like to have a shared /home/ directory, in the sense that I have a partition /dev/sda5 and want to mount it on /home on both systems. The reasons for these are multiple. In principle I don't just want to share data like documents, music, movies, but I also want to share some configuration files like .vimrc, .bashrc. The problem is that I don't want to share the kde configuration. I would like to have two separate ~/.kdegentoo and ~/.kdesabayon for the confguration. I tried to set the $KDEHOME variable on my .bashrc, but KDE keeps using ~/.kde4 as configuration folder (and yes, .bashrc is correctly parsed, $KDEHOME is actually correctly set in my workspace).

Is there a nice and clean way of having two coexisting but separate KDE workspaces in the same home directory?
User avatar
google01103
Manager
Posts
6668
Karma
25

Re: Shared home directory

Sun Dec 22, 2013 5:39 pm
can't you use links for ~/.kde4


OpenSuse Leap 42.1 x64, Plasma 5.x

AndySpiros
Registered Member
Posts
4
Karma
0
OS

Re: Shared home directory

Mon Dec 23, 2013 12:32 am
In which sense?
I would use links if I had two instances of KDE using two different configuration folders and I wanted to make them use the same. I am in the opposite situation: both are using ~/.kde4, but I want the one to use ~/.kdegentoo and the other to use ~/.kdesabayon.

Or do you mean that I could use an init script that creates ~/.kde4 as a link to either ~/.kdegentoo or ~/.kdesabayon during the startup and deletes it during the shutdown? This looks like an overcomplicated solution.

Is this page uptodate? If so, am I doing something wrong? In my shells KDEHOME is set to ~/.kdesabayon (which is correctly expanded to /home/myusername/.kdesabayon), KDE keeps using ~/.kde4 and the linked page says that KDEHOME defaults to ~/.kde if not set. Something looks quite inconsistent.
User avatar
google01103
Manager
Posts
6668
Karma
25

Re: Shared home directory

Mon Dec 23, 2013 10:46 am
I thought maybe you could parse /etc/issue or /proc/version to determine which to link to in a bash script at login, maybe a login script would work better then .bashrc


OpenSuse Leap 42.1 x64, Plasma 5.x

AndySpiros
Registered Member
Posts
4
Karma
0
OS

Re: Shared home directory

Mon Dec 23, 2013 11:31 pm
Ok, I see.
The solution should work. However, I just solved the issue using the environment variable KDEHOME. Putting it in .bashrc works now. I was probably setting it just for interactive shells, and I changed the configuration so that now it is set anyway. Obviously, I still need to check whether I am on the one or on the other distribution.

Second part of the thread: I also would like to share between the two distributions the settings and, more importantly, the status of kmail. I have some filters: when I receive mail on an account, the mail is automatically copied into my local folders and also copied into a folder of another account. So far it is working pretty well, but I wonder what would happen if I used kmail on both systems. Would the received mail be copied twice if I open kmail on the first system, then switched to the other and open kmail?
User avatar
google01103
Manager
Posts
6668
Karma
25

Re: Shared home directory

Mon Dec 23, 2013 11:47 pm
how did you set $KDEHOME for interactive shells only?

the Kmail question would be best asked on the Kmail & Pim forum and it might matter if the mail server is POP3 or IMAP, my guess is it would download again if POP3 as I think my mail client does (Opera mail) but no experience with IMAP. Also you'll need to consider if you want the mail copied to the 2nd account twice.


OpenSuse Leap 42.1 x64, Plasma 5.x

User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Shared home directory

Tue Dec 24, 2013 2:03 am
Please be aware that current versions of KMail depend on a mixture of settings in ~/.local, ~/.config and ~/.kde4 (due to usage of Akonadi / Nepomuk) so this may complicate matters. It will therefore be essential the same versions of MySQL and Virtuoso are used, otherwise they will be incompatible.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
airdrik
Registered Member
Posts
1854
Karma
5
OS

Re: Shared home directory

Wed Jan 08, 2014 10:28 pm
Setting stuff in .bashrc only applies to bash sessions (which is why it shows up in konsole when you run "echo $KDEHOME", but KDE itself doesn't recognize it) unless you set up KDE itself to source it (at least, it would be a surprise to me to find out that by default KDE does source .bashrc when you log in, since that is not a general environment setup file but a bash init file; and is not run if you run other shells like vanilla sh, csh, etc.).

as an aside: It seems somewhat surprising that KDE doesn't have a standard way of managing environment variables


airdrik, proud to be a member of KDE forums since 2008-Dec.
User avatar
google01103
Manager
Posts
6668
Karma
25

Re: Shared home directory

Wed Jan 08, 2014 11:01 pm
airdrik wrote:<snip>
as an aside: It seems somewhat surprising that KDE doesn't have a standard way of managing environment variables


isn't that what ~/.kde[4]/env is for http://userbase.kde.org/Session_Environment_Variables


OpenSuse Leap 42.1 x64, Plasma 5.x

airdrik
Registered Member
Posts
1854
Karma
5
OS

Re: Shared home directory

Wed Jan 08, 2014 11:07 pm
google01103 wrote:
airdrik wrote:<snip>
as an aside: It seems somewhat surprising that KDE doesn't have a standard way of managing environment variables


isn't that what ~/.kde[4]/env is for http://userbase.kde.org/Session_Environment_Variables

I was looking for a graphical tool in system settings, and hadn't looked any deeper than that, but I guess that works.


airdrik, proud to be a member of KDE forums since 2008-Dec.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Shared home directory

Sat Jan 11, 2014 7:27 am
System Settings offers minimal functionality to manage the content of the env/ directory via Startup and Shutdown > Autostart. It calls this "Pre-KDE Startup".


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]