You are not logged in.

#1 2011-04-02 18:31:12

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Console opening up / instead of /home/user

I recently reinstalled Archlinux due to a new build. Anyway, every time I open up a console or a file manager, it starts out in / instead of my /home folder. This happens with urxvt, terminal, pcmanfm, and thunar.

Any ideas on how to fix this?

Thanks


"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website      Configs
Forum Admin: Bruno's All Things Linux   
securitybreach<a>archlinux.us

Offline

#2 2011-04-02 18:46:50

BKLive
Member
From: Georgia
Registered: 2008-01-28
Posts: 125

Re: Console opening up / instead of /home/user

how are you running X? if you're using startx from tty and you're in / then all of your terminals and filers will open in that location (just like if you're in /usr). just a thought


Main Arch Setup: HP Pavillion p7-1209, Quad-Core i3-2120 3.3Ghz, 8GB RAM, 1TB HDD, Intel Graphics
Laptop Arch Setup: Gateway lt3103u Netbook, AMD Athlon64 1.2Ghz, 2GB RAM, 250GB HDD, ATI X1270 R600

Offline

#3 2011-04-02 18:56:40

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: Console opening up / instead of /home/user

Good ideal but when I login as user and startx, I am in the /home/username directory. So its not that.


"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website      Configs
Forum Admin: Bruno's All Things Linux   
securitybreach<a>archlinux.us

Offline

#4 2011-04-02 19:18:48

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,613

Re: Console opening up / instead of /home/user

Check /etc/passwd to see what home directory is defined your user

Offline

#5 2011-04-02 19:44:34

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: Console opening up / instead of /home/user

skunktrader wrote:

Check /etc/passwd to see what home directory is defined your user

Looks fine to me

╔═ comhack@Cerberus 03:43 PM 
╚═══ /-> cat /etc/passwd | grep comhack
comhack:x:1000:100::/home/comhack:/bin/bash

Last edited by securitybreach (2011-04-02 19:45:01)


"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website      Configs
Forum Admin: Bruno's All Things Linux   
securitybreach<a>archlinux.us

Offline

#6 2011-04-02 20:02:28

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Console opening up / instead of /home/user

Don't abuse the cat!

grep comhack /etc/passwd

:-)


Does this happen for root too?

Let's try again

cd
xterm
pwd

what's the directory you're in?

Last edited by karol (2011-04-02 20:04:48)

Offline

#7 2011-04-02 20:12:26

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: Console opening up / instead of /home/user

karol wrote:

Don't abuse the cat!

grep comhack /etc/passwd

:-)


Does this happen for root too?

Let's try again

cd
xterm
pwd

what's the directory you're in?

Yes it happens as root also.  If I run the commands I end up in the root's home directory since the command cd brings you to the home directory. In this case, using root and running your commands puts me in /root/:

╔═ comhack@Cerberus 03:10 PM 
╚═══ /-> su
Password: 
[root@Cerberus /]# cd
[root@Cerberus ~]# pwd
/root

Last edited by securitybreach (2011-04-02 20:14:44)


"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website      Configs
Forum Admin: Bruno's All Things Linux   
securitybreach<a>archlinux.us

Offline

#8 2011-04-02 20:15:29

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Console opening up / instead of /home/user

So when exactly do you start in / ? Just after login?

grep DEFAULT_HOME /etc/login.defs
login manpage wrote:

       DEFAULT_HOME (boolean)
           Indicate if login is allowed if we can't cd to the home directory. Default in no.

           If set to yes, the user will login in the root (/) directory if it is not possible to cd to her home
           directory.

Offline

#9 2011-04-02 20:17:49

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: Console opening up / instead of /home/user

I am in my /home directory until I startx, then the apps open in / instead. After running your command, I get:

╔═ comhack@Cerberus 03:44 PM 
╚═══ /-> grep DEFAULT_HOME /etc/login.defs
DEFAULT_HOME    yes

The output is also yes for root as well. I have no problem running cd to get back to ~/ .

Last edited by securitybreach (2011-04-02 20:19:18)


"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website      Configs
Forum Admin: Bruno's All Things Linux   
securitybreach<a>archlinux.us

Offline

#10 2011-04-02 20:21:15

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Console opening up / instead of /home/user

https://bbs.archlinux.org/viewtopic.php … 74#p912374
I don't think I get it, you wrote that you start X in your home directory.

What is the directory you type 'startx' in?

securitybreach wrote:
╔═ comhack@Cerberus 03:10 PM 
╚═══ /-> su
Password: 
[root@Cerberus /]# cd
[root@Cerberus ~]# pwd
/root

You forgot to run xterm between those two commands.

Offline

#11 2011-04-02 20:21:48

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: Console opening up / instead of /home/user

karol wrote:

So when exactly do you start in / ? Just after login?

login manpage wrote:

If set to yes, the user will login in the root (/) directory if it is not possible to cd to her home directory.

I am not understanding the second part. Should it be yes or no?


"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website      Configs
Forum Admin: Bruno's All Things Linux   
securitybreach<a>archlinux.us

Offline

#12 2011-04-02 20:23:16

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: Console opening up / instead of /home/user

karol wrote:

https://bbs.archlinux.org/viewtopic.php … 74#p912374
I don't think I get it, you wrote that you start X in your home directory.

What is the directory you type 'startx' in?

securitybreach wrote:
╔═ comhack@Cerberus 03:10 PM 
╚═══ /-> su
Password: 
[root@Cerberus /]# cd
[root@Cerberus ~]# pwd
/root

You forgot to run xterm between those two commands.

I use startx to start Openbox. Once openbox is started, every app opens in / including consoles. I did use your commands, and that is the output from xterm. The pwd part was done in xterm.

Last edited by securitybreach (2011-04-02 20:24:09)


"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website      Configs
Forum Admin: Bruno's All Things Linux   
securitybreach<a>archlinux.us

Offline

#13 2011-04-02 20:23:25

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Console opening up / instead of /home/user

how are you running X?

You still have yet to answer this question (starting rather, not "running"). I'm going to go out on a limb and assume that you're using autologin and startx from inittab and failing to create a login session for the user.

Offline

#14 2011-04-02 20:24:56

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: Console opening up / instead of /home/user

No I am just using startx from tty1. Nothing more. I start out in /home/comhack but after running startx and openbox loads, the problem arrises.


"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website      Configs
Forum Admin: Bruno's All Things Linux   
securitybreach<a>archlinux.us

Offline

#15 2011-04-02 20:25:38

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: Console opening up / instead of /home/user

After boot, I log in as my user then startx. When I login in to tty, I am in /home/comhack.

Last edited by securitybreach (2011-04-02 20:26:05)


"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website      Configs
Forum Admin: Bruno's All Things Linux   
securitybreach<a>archlinux.us

Offline

#16 2011-04-02 20:25:48

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Console opening up / instead of /home/user

Let's start from the beginning
- when you turn on your computer do you login to the console or straight into X?
- when you login, what directory are you in?
- if you now run startx and open xterm, what directory are you in?

If DEFAULT_HOME is set to yes you will be able to log in, even if your $HOME is "unavailable". You will be put in / in this case.

Offline

#17 2011-04-02 20:26:47

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: Console opening up / instead of /home/user

--Login to the console

--/home/comhack

--I am in /

Last edited by securitybreach (2011-04-02 20:27:02)


"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website      Configs
Forum Admin: Bruno's All Things Linux   
securitybreach<a>archlinux.us

Offline

#18 2011-04-02 20:29:30

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: Console opening up / instead of /home/user

I am heading out to work, Will check back when I get home.

Thanks


"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website      Configs
Forum Admin: Bruno's All Things Linux   
securitybreach<a>archlinux.us

Offline

#19 2011-04-03 05:10:59

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: Console opening up / instead of /home/user

Bump...

I am back home now.


"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website      Configs
Forum Admin: Bruno's All Things Linux   
securitybreach<a>archlinux.us

Offline

#20 2011-04-04 05:37:45

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: Console opening up / instead of /home/user

Any ideals?


"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website      Configs
Forum Admin: Bruno's All Things Linux   
securitybreach<a>archlinux.us

Offline

#21 2011-04-07 02:59:04

CoolWhip
Member
Registered: 2011-04-04
Posts: 51

Re: Console opening up / instead of /home/user

same problem here.. just installed arch


Arch - pronounced 'ark' as in Architecture.

Offline

#22 2011-04-07 03:42:58

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,417

Re: Console opening up / instead of /home/user

Please watch the Thread Bumping  You can avoid going awry of the rules if you post to tell us of your attempts to solve the problem or to provide new information.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#23 2011-04-07 03:43:07

xs
Member
From: San Jose, CA.
Registered: 2011-04-06
Posts: 92

Re: Console opening up / instead of /home/user

I've got this occuring as well now that I think of it. I always start in ~ and when I cd, I land in /. It doesn't really bother me but would be nice to know how this is fixed. Yeah Just realized this thread is older than hell due to bumpage.

Last edited by xs (2011-04-07 03:44:20)


I like pie. Especially with a side of Arch.

Offline

Board footer

Powered by FluxBB