baslinux AT lists.ibiblio.org
Subject: Baslinux mailing list
List archive
- From: "Ian Scott" <mriscott AT yahoo.co.uk>
- To: <baslinux AT lists.ibiblio.org>
- Subject: [BL] aliases and .xinitrc
- Date: Wed, 16 Mar 2005 09:58:56 -0000
> I was able to make separate .xinitrc's for each X program I
> want to load
> automatically when running X:
>
> .xinitrc.opera -
> icewm&
> opera& (the exec was not needed)
> rxvt (this stays there when you exit opera, and X closes when
> you exit the rxvt)
>
> Then I made an alias to point xinit at this file instead of
> the default
> .xinitrc (in /root): xinit -- /etc/.xinitrc.opera (and
> Xvesa and screen
> resolution and -terminate)
>
> Worked also for xv and xpdf.
>
> How would I modify either the alias or the .xinitrc so as to
> load a file
> at the same time (xpdf-alias filename.pdf)?
>
> I tried putting $1 after opera in .xinitrc and also in the
> alias and it
> only messed things up.
>
You'll have to be a bit clever to do this ...
.xinitrc won't take arguments, so I reckon you need to write a script -
perhaps /usr/local/bin/runxpdf:
# write another script - /usr/local/bin/runpdf - to open your chosen doc in
xpdf
echo xpdf $1 >/usr/local/bin/runpdf
# change permissions so this script can be excecuted
chmod 777 /usr/local/bin/runpdf
# now start x
xinit -- ... your xinit command
(the lines starting with # are comments - they are only there to show you
what the lines do, and are not required)
- and then in the .xinitrc, call /usr/local/bin/runpdf instead of xpdf
Hope that makes sense
Ian
- [BL] aliases and .xinitrc, Ian Scott, 03/16/2005
Archive powered by MHonArc 2.6.24.