Re: starting 8-bit color depth X server from a script
Re: starting 8-bit color depth X server from a script
- Subject: Re: starting 8-bit color depth X server from a script
- From: Jeremy Huddleston <email@hidden>
- Date: Thu, 28 Jan 2010 16:10:21 -0800
You should not be using startx manually.
You should almost never explicitly start X11.app from a script. You should just launch the command yourself.
If you want to ensure that the depth is 8 bits, you can set it in X11's preferences (defaults write org.x.X11 depth 8)... of course that only works for org.x.X11... if you're using xquartz.macosforge.org on SL, you'd need to set it on org.macosforge.xquartz.X11 instead.
This example script can be used to figure out the correct identifier from $DISPLAY, set the depth to 8, then launch xterm:
#!/bin/bash
d=${DISPLAY##*/}
d=${d%:*}
[[ -n ${d} ]] && d="org.x.X11"
defaults write $d depth 8
xterm
On Jan 28, 2010, at 13:49, Ben Eisenbraun wrote:
>
> Hi,
>
> Can I pass a color depth argument when starting X11 from a script? I.e. I
> want to start an 8-bit color depth X server from a shell script. Is there
> a way to do it that will work within the launchd framework, or should I
> just skip the launchd DISPLAY setting and use startx?
>
> -ben
>
> --
> | Ben Eisenbraun | Software Sysadmin |
> | Structural Biology Grid | http://sbgrid.org |
> | Harvard Medical School | http://hms.harvard.edu |
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> X11-users mailing list (email@hidden)
>
> This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden