views:

405

answers:

2

I have the following in my .screenrc

 source ~/bin/Screen/multiUserSettings

It gives me

No such file or directory

although I have it.

The following code says me that unknown command ".".

. ~/bin/Screen/multiUserSettings

It is strange, since I can source by . in .vimrc and .zshrc, for instance.

The file multiUserSettings

 # allow the following people full control
 addacl root,aledesma,mymanager,mycoworker1,mycoworker2
 aclchg aledesma +rwx ?#??

 # allow everyone readonly access
 aclchg *,!aledesma -rwx ?#??

 # setup 10,000 lines of available scrollback ? copy/paste
 defscrollback 10000

 # fix scrollback in putty
 termcapinfo xterm* ti@:te@

How can you source in .screenrc?

A: 

Try to use

source /home/yourname/bin/Screen/multiUserSettings

instead. My guess is that screen does not support expanding ~ in that context.

If that does not work I think you should investigate to find out exactly which file name it complains "No such file or directory" about. You can use strace to log system calls for this.

hlovdal
Thank you for your answer! It solves the problem!
Masi
A: 

using an absolute path is not portable across machines (for instance, if you use git or svn to sync your .rc files across servers you log into). Much better is to use the $HOME variable, which works in a .screenrc file. E.g.:

source $HOME/bin/Screen/multiUserSettings

This way, if one machine on which you use your .screenrc has a home directory of /home/yourname, and another has /Users/yourname, and another has /opt/export/yourname, it'll all still just work.

Brandon