You are not logged in.

#1 2014-03-19 20:55:32

cricketlong
Member
Registered: 2014-01-14
Posts: 7

How to startx with specified xorg.conf?

I have 2 xorg.confs and want to startx with one of them? Now what I do is replacing /etc/X11/xorg.conf with one of them when startx. I think there is a better idea and come for help.

Last edited by cricketlong (2014-03-19 20:56:16)

Offline

#2 2014-03-19 20:57:28

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to startx with specified xorg.conf?

Offline

#3 2014-03-19 21:57:12

cricketlong
Member
Registered: 2014-01-14
Posts: 7

Re: How to startx with specified xorg.conf?

thanks, I will try it

Last edited by cricketlong (2014-03-19 21:58:50)

Offline

#4 2014-03-19 21:59:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: How to startx with specified xorg.conf?

It's the same - just use the -xf86config flag

(edit: nevermind - cross posted with your edit).

Last edited by Trilby (2014-03-19 21:59:43)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2014-03-20 10:09:48

cricketlong
Member
Registered: 2014-01-14
Posts: 7

Re: How to startx with specified xorg.conf?

it works, but not perfect. I don't have sound now. alsamixer dosen't work now: cannot open mixer: No such file or directory. totaly no sound.
If I copy my_org.conf to /etc/X11/xorg.conf and simply "startx", all work perfect.

Offline

#6 2014-03-20 11:03:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: How to startx with specified xorg.conf?

Exactly what command do you use to start X when you speficy the config file?  Do you also specify the vt#?  If not, that would explain the lack of sound.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2014-03-20 11:06:01

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to startx with specified xorg.conf?

My X looks like this in the ps output:

/usr/bin/X -nolisten tcp :0 -auth /tmp/serverauth.tVhtAWxsGU vt1

Offline

#8 2014-03-20 11:10:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: How to startx with specified xorg.conf?

All that is needed is the following:

xinit -- -xf86config /path/to/file vt1
# or
xinit -- -xf86config /path/to/file vt$XDG_VTNR

The first is specifically for starting from tty 1, the second is the general form.  Startx includes the XDG_VTNR, which is why you see the difference.  I think you could also use `startx -- -xf86config /path/to/file` but I never use starts, so I'm not sure if it passes parameters to X in the same way.

EDIT: startx does take arguments for X in the same way.  So the following would also work:

startx -- -xf86config /path/to/file

This would be the same as startx, just with the new config file.

(edit: added vt prefix as noted below)

Last edited by Trilby (2014-03-20 11:14:56)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#9 2014-03-20 11:13:54

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to startx with specified xorg.conf?

I think it should be 'vt$XDG_VTNR'

$ echo $XDG_VTNR
1

Offline

#10 2014-03-20 11:57:42

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: How to startx with specified xorg.conf?

I think the default /etc/X11/xinit/xserverrc handles the $XDG_VTNR, so you don't normally need to do that.

Last edited by Raynman (2014-03-20 12:08:07)

Offline

#11 2014-03-20 11:58:44

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: How to startx with specified xorg.conf?

Raynman, you do need to if you use xinit.  Startx uses the xserverrc, xinit does not (unless you specifically call it from xinitrc).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#12 2014-03-20 11:59:51

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to startx with specified xorg.conf?

Raynman wrote:

I think the default /etc/X11/xinit/xserverrc handles the $XDG_VTNR, so you don't normally need to do that.

'Normally' i.e. when you're using 'startx', not just 'xinit'.

Offline

#13 2014-03-20 12:06:44

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: How to startx with specified xorg.conf?

Yes, sorry, I was just going to edit my post after doing some checking, but you guys are too quick smile

Offline

#14 2014-03-20 13:08:17

cricketlong
Member
Registered: 2014-01-14
Posts: 7

Re: How to startx with specified xorg.conf?

Trilby wrote:

Exactly what command do you use to start X when you speficy the config file?  Do you also specify the vt#?  If not, that would explain the lack of sound.

I satrtx like this: startx -- -xf86config my_xorg.conf

Offline

#15 2014-03-24 19:46:02

cricketlong
Member
Registered: 2014-01-14
Posts: 7

Re: How to startx with specified xorg.conf?

It works: startx -- -xf86config my_xorg.conf vt1

thanks to all!

Offline

#16 2014-03-24 20:03:34

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to startx with specified xorg.conf?

Please remember to mark the thread as solved https://bbs.archlinux.org/viewtopic.php?id=130309

Offline

Board footer

Powered by FluxBB