Difference between revisions of "User:Embrybd"
From eLinux.org
m |
|||
| Line 10: | Line 10: | ||
[[ECE597:_MythTV/DSP_Pico_Projector]] | [[ECE597:_MythTV/DSP_Pico_Projector]] | ||
| − | VBox Remote Login Script | + | == ~/.vimrc == |
| + | <pre> | ||
| + | if has("cscope") | ||
| + | set csprg=/usr/bin/cscope | ||
| + | set csto=0 | ||
| + | set cst | ||
| + | set nocsverb | ||
| + | " add any database in current directory | ||
| + | if filereadable("cscope.out") | ||
| + | cs add cscope.out | ||
| + | " else add database pointed to by environment | ||
| + | elseif $CSCOPE_DB != "" | ||
| + | cs add $CSCOPE_DB | ||
| + | endif | ||
| + | set csverb | ||
| + | endif | ||
| + | set tabstop=4 | ||
| + | set shiftwidth=4 | ||
| + | set expandtab | ||
| + | set autoindent | ||
| + | set smartindent | ||
| + | set smarttab | ||
| + | set showmatch | ||
| + | |||
| + | " Set options for 'list' | ||
| + | set listchars=tab:>-,trail:%,extends:>,precedes:< | ||
| + | set list | ||
| + | |||
| + | syntax on | ||
| + | set number | ||
| + | colorscheme desert | ||
| + | highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE | ||
| + | </pre> | ||
| + | |||
| + | == ~/.screenrc == | ||
| + | <pre> | ||
| + | hardstatus alwayslastline | ||
| + | hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m/%d %{W}%c %{g}]' | ||
| + | </pre> | ||
| + | |||
| + | == VBox Remote Login Script == | ||
<pre> | <pre> | ||
#!/bin/bash | #!/bin/bash | ||
#This script needs to be modified for your use, the port information needs to be filled | #This script needs to be modified for your use, the port information needs to be filled | ||
| − | #as well as the names of your vms. | + | #as well as the names of your vms. It also assumes ssh public key login is setup |
SERVER= | SERVER= | ||
Revision as of 21:20, 15 March 2010
Brian Embry
Senior CPE
My main experience is C and Linux. I like playing with microcontrollers
Projects: ECE597:_MythTV/DSP_Pico_Projector
~/.vimrc
if has("cscope")
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set csverb
endif
set tabstop=4
set shiftwidth=4
set expandtab
set autoindent
set smartindent
set smarttab
set showmatch
" Set options for 'list'
set listchars=tab:>-,trail:%,extends:>,precedes:<
set list
syntax on
set number
colorscheme desert
highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
~/.screenrc
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m/%d %{W}%c %{g}]'
VBox Remote Login Script
#!/bin/bash
#This script needs to be modified for your use, the port information needs to be filled
#as well as the names of your vms. It also assumes ssh public key login is setup
SERVER=
USER=
WIN7ULT=Win7-Ult
WIN7UPRT=
WIN7BETA=Win7-Beta
WIN7BPRT=
VISTA64=Vista64
VISTA64PRT=
WIDTH=1024
HEIGHT=768
LOCALPORT=5903
usage ()
{
echo "VBoxConnect <Win7-Ult | Win7-Beta | Vista64> [w] [h]"
exit 1
}
connect ()
{
echo "Connecting to $SERVER"
ssh $SERVER "VBoxManage startvm $VM --type vrdp"
ssh $SERVER "VBoxManage controlvm $VM setvideomodehint $WIDTH $HEIGHT 24"
ssh -f -L $LOCALPORT:$SERVER:$VMPORT $SERVER sleep 10
rdesktop -5 -a 24 -x m -T $VM -u $USER -p - localhost:$LOCALPORT
}
if [ -z $1 ]
then
usage
fi
case "$1" in
$WIN7ULT)
VMPORT=$WIN7UPRT
VM=$WIN7ULT
;;
$WIN7BETA)
VMPORT=$WIN7BPRT
VM=$WIN7BETA
;;
$VISTA64)
VMPORT=$VISTA64PRT
VM=$VISTA64
;;
*)
usage
;;
esac
if [ $2 ]
then
WIDTH=$2
fi
if [ $3 ]
then
HEIGHT=$3
fi
connect