LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 11-20-2009, 04:11 PM   #1
dogwind
LQ Newbie
 
Registered: Nov 2009
Location: Dallas, TX
Distribution: Ubuntu
Posts: 3

Rep: Reputation: 0
want to copy all user desktop settings and applications


I have an Ubuntu 8.04 desktop at work that I've been using with VirtualBox to run Windows XP in.
Today I found out how to configure my Ubuntu desktop to login directly to the MS Domain,using likewise, so that now I have two home directories:
/home/user and
/home/DOMAIN/user

So now I want to solely login to Ubuntu as user@DOMAIN.com. But whenever I do this, I lose all of my settings, applications, and configuration that I had as /home/user.

How do I easily copy all settings and applications from /home/user to /home/DOMAIN/user?

Many thanks in advance.
 
Old 11-20-2009, 04:26 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
You can probably just copy all the hidden "dot" files over from your old directory to the new directory. You may have some permission issues to fix though.
 
Old 11-20-2009, 04:34 PM   #3
mdever44
LQ Newbie
 
Registered: Nov 2009
Distribution: Gentoo
Posts: 20

Rep: Reputation: 1
This should do it.
Code:
cp -r /home/user /home/DOMAIN/user
You'll need write permissions to /home/DOMAIN if running as user, though; or read permissions to /home/user if runnning as DOMAIN. Get those with this:
Code:
chmod u+w /home/DOMAIN/user
or
Code:
chmod u+r -R /home/user
respectively. You'll want to change these back though.
Code:
chmod u-w -R /home/DOMAIN/user
Code:
chmod u-r -R /home/user
 
Old 11-20-2009, 09:10 PM   #4
dogwind
LQ Newbie
 
Registered: Nov 2009
Location: Dallas, TX
Distribution: Ubuntu
Posts: 3

Original Poster
Rep: Reputation: 0
That's what I was afraid of. I thought there might be a cleaner, easier, more sure way, such as a widget or something. But if not, so be it. I'll give it a shot. Thank you mdever44!
 
Old 11-20-2009, 09:38 PM   #5
mdever44
LQ Newbie
 
Registered: Nov 2009
Distribution: Gentoo
Posts: 20

Rep: Reputation: 1
3 lines in the terminal not clean? I suppose you could (mostly) copy and paste the code...
As a side note, the code I posted for copying will copy all of your documents as well. You may or may not want that. If you don't want that, I'll write a script that does that. In the mean time; here's a script you can just run as DOMAIN:
Code:
gksu -u user chmod -R u+r ~
cp -R /home/user ~
gksu -u user chmod -R u-r ~
EDIT:
Here's a script which only copies settings:
Code:
gksu -u user chmod -R u+r ~
mkdir ~/user
find /home/user -maxdepth 1 -wholename "/home/user/.*" -print0 | xargs -0 cp -R -t ~/user
gksu -u user chmod -R u-r ~
These can be run without the terminal; just copy them into a text file and make them executable and run.

Last edited by mdever44; 11-20-2009 at 10:16 PM.
 
Old 11-20-2009, 11:12 PM   #6
rich_c
Member
 
Registered: Apr 2008
Location: UK
Distribution: PeppermintOS
Posts: 387
Blog Entries: 74

Rep: Reputation: 81
Post

Personally, I prefer the chown approach. Here's a tutorial/tip I did some while back that should provide a basis for what you want to do with regard to permissions.
 
Old 11-23-2009, 09:02 AM   #7
dogwind
LQ Newbie
 
Registered: Nov 2009
Location: Dallas, TX
Distribution: Ubuntu
Posts: 3

Original Poster
Rep: Reputation: 0
I also don't like changing permissions, especially on the user account that already contains all of the desired settings. After further consideration, this is what I did:
telinit 1

root@machine:/home/user$ tar cvf user.tar *
root@machine:/home/user$ mv user.tar /home/DOMAIN/user
root@machine:/home/user$ cd /home/DOMAIN/user
root@machine:/home/DOMAIN/user$ tar xvf user.tar
root@machine:/home/DOMAIN/user$ chown -R DOMAIN/user:DOMAIN/user *

telinit 3

This got me mostly what I was looking for without tweaking rwx permissions, just owner/group permissions.

The biggest problem now is the DOMAIN login settings were messed up somehow. I'll fix that and update here.

Last edited by dogwind; 11-23-2009 at 02:45 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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
X applications ignore UMASK settings thejasondean Ubuntu 0 01-10-2007 05:46 AM
easy way to copy settings/config from root to user drlouis Slackware 5 12-25-2006 07:17 PM
Copy all enviornment settings to another user sunhui Linux - Software 1 11-28-2006 10:47 PM
copy KDE settings to another user jlinkels Linux - Software 1 09-02-2004 04:21 AM
Changing a user ID (and preserving desktop settings) aethereal Linux - General 1 11-21-2001 12:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 01:55 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