Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
$HOME variable[solved]
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
romalong
Guru
Guru


Joined: 08 Jun 2005
Posts: 488
Location: Kiev

PostPosted: Thu Jul 21, 2005 9:06 am    Post subject: $HOME variable[solved] Reply with quote

Where may i find $HOME variable?

Last edited by romalong on Fri Jul 22, 2005 8:03 am; edited 1 time in total
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Thu Jul 21, 2005 9:10 am    Post subject: Reply with quote

echo $HOME ?
Back to top
View user's profile Send private message
katsiki
Apprentice
Apprentice


Joined: 14 Jun 2005
Posts: 233
Location: Pasadena, CA (USA)

PostPosted: Thu Jul 21, 2005 9:41 am    Post subject: Reply with quote

You can see all your environment variables using,
Code:
set
Back to top
View user's profile Send private message
romalong
Guru
Guru


Joined: 08 Jun 2005
Posts: 488
Location: Kiev

PostPosted: Thu Jul 21, 2005 9:49 am    Post subject: Ti... Reply with quote

katsiki wrote:
You can see all your environment variables using,
Code:
set


the reason why i'd like to know about this $HOME variable is because i'm heaving KDE error that says that $HOME is not set
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Thu Jul 21, 2005 9:54 am    Post subject: Reply with quote

maybe put something like "export HOME=/home/username" in ~/.bashrc ?
Back to top
View user's profile Send private message
katsiki
Apprentice
Apprentice


Joined: 14 Jun 2005
Posts: 233
Location: Pasadena, CA (USA)

PostPosted: Thu Jul 21, 2005 10:06 am    Post subject: Reply with quote

Quote:
maybe put something like "export HOME=/home/username" in ~/.bashrc ?

or in the .xinitrc, to be available before KDE starts.
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Thu Jul 21, 2005 10:09 am    Post subject: Reply with quote

If you use startx, like I do, .bashrc will be sourced first, but since this is for X anyways you're right about .xinitrc being the appropriate place to put that.
Back to top
View user's profile Send private message
romalong
Guru
Guru


Joined: 08 Jun 2005
Posts: 488
Location: Kiev

PostPosted: Thu Jul 21, 2005 10:18 am    Post subject: ... Reply with quote

lnxz wrote:
If you use startx, like I do, .bashrc will be sourced first, but since this is for X anyways you're right about .xinitrc being the appropriate place to put that.


could this error occur due to X-server wasn't configured yet?


Last edited by romalong on Thu Jul 21, 2005 11:14 am; edited 1 time in total
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Thu Jul 21, 2005 10:41 am    Post subject: Reply with quote

Does X start at all? If it does it should output warnings, errors and other information in the console you started startx from (if you're using startx).
I've never had X complain about $HOME not being set even when I haven't touched a single line in the example config file, and as far as I know xorg.conf doesn't mention $HOME.

Try using openbox or blackbox instead of KDE and drop all login managers (startx instead).
Running something like this should do the trick:
Code:
XSESSION="<your choice of wm here>" startx


If this works, without it complaining about the $HOME variable, then you can be pretty sure it's a kde problem.

Also try scouting for all other X-related logs.
Back to top
View user's profile Send private message
romalong
Guru
Guru


Joined: 08 Jun 2005
Posts: 488
Location: Kiev

PostPosted: Thu Jul 21, 2005 11:16 am    Post subject: Reply with quote

also it reports that it hasn't access to /home.
PS my /home is on separate drive and if use # mount, i can see this partition...
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Thu Jul 21, 2005 11:20 am    Post subject: Reply with quote

Could you post the entry for /home in /etc/fstab?
Back to top
View user's profile Send private message
romalong
Guru
Guru


Joined: 08 Jun 2005
Posts: 488
Location: Kiev

PostPosted: Thu Jul 21, 2005 11:43 am    Post subject: Reply with quote

lnxz wrote:
Could you post the entry for /home in /etc/fstab?


Code:

/dev/hda1   /boot     ext2    defaults,noatime     1 2
/dev/hda2   none      swap    sw                   0 0
/dev/hda3   /         ext3    noatime              0 1
/dev/sdb3    /home    ext3    noatime,nodev,nosuid    0 0

none        /proc     proc    defaults             0 0
none        /dev/shm  tmpfs   nodev,nosuid,noexec  0 0

/dev/cdroms/cdrom0    /mnt/cdrom    auto      noauto,user    0 0
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Thu Jul 21, 2005 12:13 pm    Post subject: Reply with quote

Hm. I'm quite sure the problem is with the mounting of the /home partition, but I fail to see anything very wrong in the entry.
Perhaps remove "nodev" and "nosuid" from the mount options, and add "users"?
Because if I'm not very wrong, and I might be, I think unless you pass the "users" parameter or specify uid or mode, all partitions will be mounted owned as root, thus making all files on the partition root's property unless changed by root.
Are you able to create, delete, move or copy files on the partition?
Back to top
View user's profile Send private message
romalong
Guru
Guru


Joined: 08 Jun 2005
Posts: 488
Location: Kiev

PostPosted: Thu Jul 21, 2005 12:35 pm    Post subject: Reply with quote

lnxz wrote:
Are you able to create, delete, move or copy files on the partition?


i can do anything i want with my box
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Thu Jul 21, 2005 12:43 pm    Post subject: Reply with quote

I understand, and so can I, but if KDE can't write to or find $HOME it seems a little odd that you've never run into permission problems. Have you tried mounting with the "users" option set?
You could try to remove the kde folders, if any, in your $HOME and see if kde manages to create new ones. Don't see how it could, though.
Back to top
View user's profile Send private message
romalong
Guru
Guru


Joined: 08 Jun 2005
Posts: 488
Location: Kiev

PostPosted: Thu Jul 21, 2005 12:57 pm    Post subject: Reply with quote

could this be the reason?

i've created the user under root on livecd and /home directory was on sda3 like by default (because i forgot to mount it).
then, when i logged in via kde, it couldn't see this user as the system uses fstab file mounting /home to sdb3 and in this case /home is empty...
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Thu Jul 21, 2005 1:22 pm    Post subject: Reply with quote

You made a user account during installing, no?
If not you should do "useradd -m -G wheel,tty,users etc.. <username>
If you already got the account set up, just create the user's folder in /home manually and chown -R <youruser>:<yourgroup>.

One thing you could try is unmounting /home, because when you created the folder during install you created it on the root partition and when you rebooted fstab mounted /dev/sda3 ontop of the already created folder. If the folder should turn up when you umount /dev/sda3, copy the folder with cp -R, mount /dev/sda3 back onto /home and move the copied directory to home and make sure the permissions are correct.
Back to top
View user's profile Send private message
romalong
Guru
Guru


Joined: 08 Jun 2005
Posts: 488
Location: Kiev

PostPosted: Thu Jul 21, 2005 1:27 pm    Post subject: Reply with quote

lnxz wrote:
You made a user account during installing, no?
If not you should do "useradd -m -G wheel,tty,users etc.. <username>
If you already got the account set up, just create the user's folder in /home manually and chown -R <youruser>:<yourgroup>.


yes, i've created user during install in default /home and when i boot my real gentoo it couldn't see this user in new /home thus it's mounted on another partition.
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Thu Jul 21, 2005 1:30 pm    Post subject: Reply with quote

Does anything happen when you unmount /dev/sda3?
Back to top
View user's profile Send private message
romalong
Guru
Guru


Joined: 08 Jun 2005
Posts: 488
Location: Kiev

PostPosted: Thu Jul 21, 2005 1:40 pm    Post subject: Reply with quote

lnxz wrote:
Does anything happen when you unmount /dev/sda3?


no, just unmounting :)


Last edited by romalong on Thu Jul 21, 2005 1:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
romalong
Guru
Guru


Joined: 08 Jun 2005
Posts: 488
Location: Kiev

PostPosted: Thu Jul 21, 2005 1:43 pm    Post subject: Reply with quote

just one note:

when i boot from livecd and mount my partitions i can see all of them by # mount command.
but then, when i # chroot i couldn't and i have to mount my sdb3's /home with # mount /home.
and if'd not do it /home will be that obsolete one with that user i've created before
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Thu Jul 21, 2005 1:59 pm    Post subject: Reply with quote

I'm sorry, I don't understand the problem. Delete and recreate the user with /home mounted properly, no biggie.
If you for some reason can't do that, then I don't have the faintest idea what you would have to do to fix this.
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Thu Jul 21, 2005 2:17 pm    Post subject: Reply with quote

lnxz wrote:
If you for some reason can't do that, then I don't have the faintest idea what you would have to do to fix this.

umount the home partition, mount it somewhere else (eg /mnt/home).
Code:
cp -a /home/* /mnt/home/
umount /mnt/home
mount /home
Back to top
View user's profile Send private message
romalong
Guru
Guru


Joined: 08 Jun 2005
Posts: 488
Location: Kiev

PostPosted: Thu Jul 21, 2005 2:30 pm    Post subject: ... Reply with quote

BlackEdder wrote:
lnxz wrote:
If you for some reason can't do that, then I don't have the faintest idea what you would have to do to fix this.

umount the home partition, mount it somewhere else (eg /mnt/home).
Code:
cp -a /home/* /mnt/home/
umount /mnt/home
mount /home


why do i need to use /mnt/home if both of my /home are in /? the only difference between them is partition location
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Thu Jul 21, 2005 2:37 pm    Post subject: Reply with quote

Because your /home partition is now mounted over your user directories, to be able to access your user directories you will need to umount the disk mounted at /home now. Then you will want to copy those user directories to your /home partition, so you will have to mount the home partition somewhere else.

Another solution would be ofcourse:
Code:
umount /home
mkdir -p /tmp/home
cp -a /home/* /tmp/home/
mount /home
cp -a /tmp/home/* /home/
rm -rf /tmp/home
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum