LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to set properties for xterm and screen for each user? (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-set-properties-for-xterm-and-screen-for-each-user-796695/)

Andrew Dufresne 03-20-2010 12:41 PM

How to set properties for xterm and screen for each user?
 
Hi,

I use xterm with a particular font size and type. But every time I start xterm I have to give them in arguments
Code:

xterm -fa terminus -fs 12
Is there some configuration file where I can out the above parameters and xterm will pick them itself. But I don't want these properties to be set globally. Every user should be able to set it for himself.

I have searched all the hidden folders and rc files in my home folder, but didn't find anyone related to xterm. What should I do?

Similarly every time I start screen, I have to issue
Quote:

:caption always
:caption string %w


Can I make it automatic by editing some configuration file?

Is there any way through which every xterm I start will have a screen session already open in it?

Any help would be greatly appreciated!


smoker 03-20-2010 01:19 PM

create a .screenrc file in your home directory
http://www.mattcutts.com/blog/screen...tips-screenrc/

Use .bashrc to alias your xterm command
http://tldp.org/LDP/abs/html/sample-bashrc.html

alias xterm2='xterm -fa terminus -fs 12 -e screen &'

You have to log out and back in to use the alias.

Andrew Dufresne 03-23-2010 12:47 AM

Quote:

Originally Posted by smoker (Post 3905666)
create a .screenrc file in your home directory
http://www.mattcutts.com/blog/screen...tips-screenrc/

Use .bashrc to alias your xterm command
http://tldp.org/LDP/abs/html/sample-bashrc.html

alias xterm2='xterm -fa terminus -fs 12 -e screen &'

You have to log out and back in to use the alias.


Thanks smoker, your reply was very helpful.

I found that & is unnecessary in
Quote:

alias xterm2='xterm -fa terminus -fs 12 -e screen'
With the help of the link your gave, my .screenrc now contains

Quote:

caption always "%{kB}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{kB}%?%+Lw%?"
hardstatus alwayslastline "%{BW}%16=%l %{BW}%50=%d/%m/%Y %{BW}%80=%c%="
vbell off
One more thing, I use Window Maker instead of GNOME or others. In its main menu there is an option of xterm, but when I clicked on it, it will gave me the default xterm, without using properties that I set above.

A little grep and find, solved the problem:
Open file
Quote:

~/GNUstep/Defaults/WMRootMenu
Search for xterm, under applications, the file is not really hard to understand, and add the parameters there.

Quote:

(XTerm, EXEC, "xterm -fa terminus -fs 12 -bg white -fg black -e screen"),
Regards




All times are GMT -5. The time now is 06:33 AM.