CentOSThis forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.