LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 01-31-2017, 03:16 PM   #1
bodisha
Member
 
Registered: Oct 2016
Posts: 36

Rep: Reputation: Disabled
Question about xterm $HOME


Hello and thanks in advance for any assistance anyone can offer me

The fast & dirty question is... Could someone please tell me which file would open an xterm session into $HOME/Desktop instead of /$HOME?

The longer version is.... I was reading about login scripts when I noticed my SSH sessions logged into $HOME while my xterm session on the console logged into /$HOME/Desktop. Initially I figured I'd find something in either the /$HOME/.bashrc, /etc/bashrc, or /etc/profile to explain it.... Which I didn't find. I figured it must be specific to something xterm is doing so I looked through .xinitrc but didn't have any luck there either. I've spent half the day trying to figure out what puts an xterm session into /$HOME/Desktop but I'm having zero luck and my OCD is going crazy about it.

Thanks!
 
Old 01-31-2017, 03:44 PM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,627

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Quote:
Originally Posted by bodisha View Post
Hello and thanks in advance for any assistance anyone can offer me

The fast & dirty question is... Could someone please tell me which file would open an xterm session into $HOME/Desktop instead of /$HOME?

The longer version is.... I was reading about login scripts when I noticed my SSH sessions logged into $HOME while my xterm session on the console logged into /$HOME/Desktop. Initially I figured I'd find something in either the /$HOME/.bashrc, /etc/bashrc, or /etc/profile to explain it.... Which I didn't find. I figured it must be specific to something xterm is doing so I looked through .xinitrc but didn't have any luck there either. I've spent half the day trying to figure out what puts an xterm session into /$HOME/Desktop but I'm having zero luck and my OCD is going crazy about it.

Thanks!
Actually, SSH is dropping you into your $HOME because that is the correct logon behavior. Your GUI (XWinodws WM) is dropping you into its current default location ( $HOME/Desktop) because it is not configured properly to NOT do that. This is common, and harmless. The .xinitrc would be the correct KIND of place to look, but I have never changed that behavior so I have never bothered to look it up for any particular WM or xterm client. It is not clear to me what WM you are using, and many of them configure this differently anyway.

One thing you might try is using the line
Quote:
cd ${HOME}
at the tail end of your .bash_profile and see if that helps.

Let me know, here, if it does.
 
Old 02-01-2017, 02:03 PM   #3
bodisha
Member
 
Registered: Oct 2016
Posts: 36

Original Poster
Rep: Reputation: Disabled
Thanks for the quick reply... I appreciate it!

Entering 'cd ${HOME}' into the .bashrc certainly works. I was trying to get more of an understanding of why a Gnome 3 shell was opening a session to $HOME/Desktop than $HOME though. I wound up loading Centos 5 & 6, as well as Fedora & Scientific Linux and the problem was happening on all of them except Centos 5.


After scouring the Internet I stumbled across a fix using the gconftool-2 utility.

As a user, run following command to change the behavior immediately:
$ gconftool-2 --set --type=bool /apps/nautilus-open-terminal/desktop_opens_home_dir true

As root, run below command to set the default behavior, which will be source when new users first log in:
# gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --set --type=bool /apps/nautilus-open-terminal/desktop_opens_home_dir true


The explanation that was mentioned stated for some reason Gnome 3 isn't implemented correctly. Which really surprises me considering it's been out there for a while. I'm not completely satisfied with the workaround I found (I'm still convinced there's a setting buried somewhere deep in the O/S'es that fix this) but at least I can point to Gnome as the problem instead of saying "I don't know". I am left with wondering if this happens on Red Hat as well.

Anyway... Thank you for taking the time to read my my post and respond.

Last edited by bodisha; 02-01-2017 at 02:05 PM.
 
Old 02-01-2017, 02:54 PM   #4
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
Quote:
Originally Posted by bodisha View Post
Thanks for the quick reply... I appreciate it!
After scouring the Internet I stumbled across a fix using the gconftool-2 utility.

As a user, run following command to change the behavior immediately:
$ gconftool-2 --set --type=bool /apps/nautilus-open-terminal/desktop_opens_home_dir true

As root, run below command to set the default behavior, which will be source when new users first log in:
# gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --set --type=bool /apps/nautilus-open-terminal/desktop_opens_home_dir true


The explanation that was mentioned stated for some reason Gnome 3 isn't implemented correctly. Which really surprises me considering it's been out there for a while. I'm not completely satisfied with the workaround I found (I'm still convinced there's a setting buried somewhere deep in the O/S'es that fix this) but at least I can point to Gnome as the problem instead of saying "I don't know". I am left with wondering if this happens on Red Hat as well.

Anyway... Thank you for taking the time to read my my post and respond.
The GNOME team tends to break things on every minor release, I wouldn't be surprised at unexpected behavior.

However, I'm running GNOME 3.22.2 on Debian 9, which does not exhibit this behavior. Neither had I experienced such on Fedora 25. Starting a terminal, any terminal, always drops me to ${HOME}.

How exactly are you opening a terminal? Through the activities overview or other?
 
  


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
Xterm doesn't start in home directory RemusX2 Linux - General 3 04-29-2006 01:40 PM
xterm default home directory Fritz_Monroe Linux - Newbie 2 08-05-2005 01:33 PM
xterm question pujolasdf Linux - Software 2 04-07-2005 02:20 PM
xterm question mikeshn Linux - General 1 10-05-2003 08:21 AM
xterm question? nautilus_1987 Linux - Software 4 05-19-2003 03:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 04:12 AM.

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