You are not logged in.

#1 2009-03-06 14:36:37

Jagged Loser
Member
Registered: 2009-02-22
Posts: 10

A Single Xinitrc For Multiple Machines?

Now that I have both a netbook and a desktop, I was wondering if it is possible to write a single .xinitrc that supports both of them, depending on the hostname of the machine it was running on? Something along the lines of:

HOST=`hostname`
if $HOST = "netbook" then

     xterm -title Netbook -geometry 80x22+10+10 &
     evilwm -nosoliddrag

or else

     xterm -title Desktop -geometry 120x45+10+10 &
     evilwm -nosoliddrag

end if

(Note: not real code)


I'm hoping to keep the dotfile on both machines in sync, and I would prefer to have just one .xinitrc if possible. Does xinit support this?

Thanks!

Offline

#2 2009-03-06 14:42:53

SamC
Member
From: Calgary
Registered: 2008-05-13
Posts: 611
Website

Re: A Single Xinitrc For Multiple Machines?

As it's just a bash script, it should.

Offline

#3 2009-03-06 15:36:12

Jagged Loser
Member
Registered: 2009-02-22
Posts: 10

Re: A Single Xinitrc For Multiple Machines?

I'll give it a try then. Looking through my home directory, .xinitrc is really the only dotfile I have that is machine specific. Now I just have to decide on a syncing method.

Offline

Board footer

Powered by FluxBB