LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-13-2004, 01:20 PM   #1
Imon
LQ Newbie
 
Registered: Aug 2004
Location: Washington, NE England
Distribution: Machine 1 = Slackware 10, Machine 2 = Slackware 10.1, Debian (Sarge). Machine 3 = Ubuntu 5.04
Posts: 10

Rep: Reputation: 0
Question Losing ENV variables after running startx


Hi...a stupid question for my first post!

When I start xterm/rxvt sessions in my windows manager(s) (I'm using fluxbox & Window Maker) the contents of my PATH & PS1 variables are changed from what I have put into both /etc/profile & $HOME/.profile!

I guess it must be happening when I run the startx script..... I've tried calling .profile in .xinitrc but to no avail!

Were am I going wrong? (My distro is Slackware 10.0)

....also how do I change (increase) the font size in the same xterm windows?
 
Old 08-13-2004, 03:16 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
That's because non login shells such as those invoked by xterm don't read the profile startup scripts. When invoked as a nonlogin shell, bash reads .bashrc instead. To make login shells behave the same as non-login shells my .bash_profile looks like:

Code:
if [ -x /home/tim/.bashrc ]
then
  . /home/tim/.bashrc
fi
and then I put all my custom stuff into .bashrc -- replace "tim" with your user name in the above and this will work for you too.
 
Old 08-14-2004, 03:02 PM   #3
Imon
LQ Newbie
 
Registered: Aug 2004
Location: Washington, NE England
Distribution: Machine 1 = Slackware 10, Machine 2 = Slackware 10.1, Debian (Sarge). Machine 3 = Ubuntu 5.04
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks btmiller....

Its easy now I know!!

....anyone any advice on the second part of my question? ie how do I increase the font size in the xterm session....the man entry isn't very helpful!
 
Old 08-14-2004, 03:12 PM   #4
max_sipos
Member
 
Registered: Jul 2004
Posts: 96

Rep: Reputation: 15
You can also start xterm with option -ls, to make it read the standard login files. As for the font size, try starting it with -fs # where # is the point size of the font. Experiment and it should work.

Best!
Max
 
Old 08-16-2004, 11:54 AM   #5
Imon
LQ Newbie
 
Registered: Aug 2004
Location: Washington, NE England
Distribution: Machine 1 = Slackware 10, Machine 2 = Slackware 10.1, Debian (Sarge). Machine 3 = Ubuntu 5.04
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks Max, -ls also does the trick......
 
Old 08-16-2004, 12:00 PM   #6
Imon
LQ Newbie
 
Registered: Aug 2004
Location: Washington, NE England
Distribution: Machine 1 = Slackware 10, Machine 2 = Slackware 10.1, Debian (Sarge). Machine 3 = Ubuntu 5.04
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks Max, -ls also does the trick.......so now I have two working methods.

The -fs option was more difficult, eventually, after much re-reading of 'man' I also tried using -fn 10x20....this has solved my problem.

Thanks to all for yur help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
cron and shell env variables lt_wentoncha SUSE / openSUSE 5 07-16-2005 02:20 PM
setting env. variables arunsri Slackware 3 03-26-2005 06:49 AM
where are the env variables set on boot? Pete Dogg Linux - Software 1 09-10-2003 03:37 AM
setting env variables globally raven Linux - General 6 02-21-2003 09:04 AM
Open GL env.variables UB_KMA Linux - Newbie 1 08-04-2002 06:41 PM


All times are GMT -5. The time now is 08:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration