View previous topic :: View next topic |
Author |
Message |
nnd n00b
Joined: 21 Aug 2006 Posts: 11
|
Posted: Tue Aug 22, 2006 3:13 pm Post subject: |
|
|
truc,
Do you live at this forum? I've deleted my message within 1 minute
So,
As I've said before I'm using kdm to start X.
My user belons to these groups: users dialout video.
I can't start ut2004-bin-linux-amd64 directly because of shared libraries it needs, in my script ut2004 is started by the following commands:
Code: | cd ~/ut2004/System
./ut2004-bin-linux-amd64 & |
I can't understand does you script need to be executed by root? Or does the user have to have permissions to start X?
------------------
Just remebered, I have such a configuration of kdm so it runs Xgl, not Xorg by default! Do you know how to overcome this issue?
Thank you! |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Tue Aug 22, 2006 5:10 pm Post subject: |
|
|
nnd wrote: | truc,
Do you live at this forum? I've deleted my message within 1 minute
|
Yes I do
I'm at work, and have some 'extra' time today
Quote: | I can't understand does you script need to be executed by root? |
No, not at all.
Quote: | Or does the user have to have permissions to start X? |
The user should only be able to use xinit
From what you said your user can run (it should at the very least open an xterm on an other display, it can also start a wm if you(the user) have ~/.xinitrc ).
that's really strange since your groups looks ok to me
Quote: | Just remebered, I have such a configuration of kdm so it runs Xgl, not Xorg by default! Do you know how to overcome this issue? |
It shouldn't be an issue, gentoo-wiki is down, but will look how you did modify kdm ASAP. _________________ The End of the Internet!
Last edited by truc on Tue Aug 22, 2006 5:32 pm; edited 1 time in total |
|
Back to top |
|
|
nnd n00b
Joined: 21 Aug 2006 Posts: 11
|
Posted: Tue Aug 22, 2006 5:32 pm Post subject: |
|
|
truc,
Code: | > xinit -- :1
Couldn't open log file '/var/log/Xgl.1.log' for writing: Permission denied
|
It runs X(and xterm in it), but in window(with the Xglx heading) and on the same tty.
In xterm, in this window:
Code: | >echo $DISPLAY
:1.0 |
|
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Tue Aug 22, 2006 5:36 pm Post subject: |
|
|
Quote: | It runs X(and xterm in it), but in window(with the Xglx heading) and on the same tty | ok, so a work around can be to unset the DISPLAY (just for this command) this way:
Code: | DISPLAY="" xinit -- :1 |
it should start an Xserver outside your Xgl one
EDIT: tell me if it works, than I can implement this behaviour in next release:)
and, If I'm still here, that's because I've just edited my previous post _________________ The End of the Internet! |
|
Back to top |
|
|
nnd n00b
Joined: 21 Aug 2006 Posts: 11
|
Posted: Tue Aug 22, 2006 6:08 pm Post subject: |
|
|
It works!
/me is waiting for the next release
Thank you. |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Tue Aug 22, 2006 9:38 pm Post subject: |
|
|
nnd wrote: | It works!
/me is waiting for the next release
Thank you. |
Well, I made a really minor release (20060822) then, grab it here (as usual)
I just added the "-xineram" to serverargs and the DISPLAY="" so that there is no longer the problem nnd had.
If it already works now, there is no need to upgrade _________________ The End of the Internet! |
|
Back to top |
|
|
nnd n00b
Joined: 21 Aug 2006 Posts: 11
|
Posted: Wed Aug 23, 2006 5:57 am Post subject: |
|
|
hello, truc
Unfortunately now I have another trouble...
// for shared libraries to load
Then I did the following:
Code: | xlaunch ./ut2004-bin-linux-amd64 |
and also tried:
Code: | DISPLAY="" xinit ./ut2004-bin-linux-amd64 -- :1 |
The result was the same. It runs on the other tty(dsplay) but on Xgl! (I almost sure)
I consider the reason is in my kdm configuration (as I said before kdm startx Xgl by default).
So we need either not to use kdm(e.g. use startx) or "tell" kdm not to run Xgl for this session(e.g. just fix its conf for the session using sed). I prefer the filrst way. Do you know how to do this?
Thanks. |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Wed Aug 23, 2006 8:06 am Post subject: |
|
|
nnd wrote: | hello, truc
Unfortunately now I have another trouble... |
"now": Do you mean with the version 20060822?
Quote: | // for shared libraries to load |
If I understand correctly, this means that if you want to play UT, (wihtout xlaunch for the moment) you have to go into that directory before, you run ./ut2004-bin-linux-amd64
And if you don't, the game complains about missing shared librairies, right?
If I'm right, then Code: | xlaunch ./ut2004-bin-linux-amd64 |
won't be enough.
You also need to know, how xinit handle options Code: |
clientargs serverargs
--------------^---------------{separator}--------^----------
xinit blablabla bliblo qsdfqqlmkj -- :1 |
This means: if clientargs first character isn't a '/' (it's not a full path), then clientargs is considered to be options for xterm. (eg: you can try xinit -bg black -fg limegreen -- :1 will launch xterm -bg black -fg limegreen on an other display.
But if clientargs first character is a '/', then it's considered to be the the full path to the application to run on the other display.
The good news is that your shell will expand ./ut2004-bin-linux-amd64 to /home/nnd/something/ut2004-bin-linux-amd64 (pathname expansion), but it wouldn't work if you run xinit relative/path/to/ut2004-bin-linux-amd64 -- :1
Quote: | and also tried:
Code: | DISPLAY="" xinit ./ut2004-bin-linux-amd64 -- :1 |
The result was the same. It runs on the other tty(dsplay) but on Xgl! (I almost sure) |
The same, do you mean, bad color? or in a window on your actual desktop? I can't test righ now (still at work..), but it should start an UT, on an other Display, but I don't think your previous cd ~/ut2004/System has any effect (do you have any complaints about missing shared librairies on the terminal from where you run this command ?
if you need the cd step before launching the game, then you can create a small script do do that for you, take script I gave in IV a) wine for warcraft3,
put something like
your ut script: | #!/bin/sh
cd /home/nnd/ut2004/System
./ut2004-bin-linux-amd64
exit $? |
chmod it and then try
Code: | DISPLAY="" xinit /full/path/to/your_UT_script -- :1 |
(chose the number :1 if there is no /var/tmp/.X1-lock, but if there is one, and no ]/var/tmp/.X2-lock, then use number 2 instead (and so on)
If it still start the game inside XGL, then log into the console (CTRL+ALT+F1-6) and try to run: Code: | xinit /full/path/to/your_UT_script -- :1 | is it better?
Quote: | I consider the reason is in my kdm configuration (as I said before kdm startx Xgl by default). |
But we are not using kdm when using xinit. May be there's an option for the Xgl server (but I can access randomly the wiki at work and still don't know them (the options) :/)
Quote: | So we need either not to use kdm(e.g. use startx) or "tell" kdm not to run Xgl for this session(e.g. just fix its conf for the session using sed). I prefer the filrst way. Do you know how to do this? |
same comment as above, I don't think it's necessary. But I'll try to see later (in the wiki).
Thanks to you too, we will success! _________________ The End of the Internet! |
|
Back to top |
|
|
nnd n00b
Joined: 21 Aug 2006 Posts: 11
|
Posted: Wed Aug 23, 2006 10:20 am Post subject: |
|
|
Quote: | "now": Do you mean with the version 20060822? |
Yes, I do.
Quote: | If I understand correctly, this means that if you want to play UT, (wihtout xlaunch for the moment) you have to go into that directory before, you run ./ut2004-bin-linux-amd64
And if you don't, the game complains about missing shared librairies, right? |
Correctly.
Quote: | put something like your ut script:
#!/bin/sh
cd /home/nnd/ut2004/System
./ut2004-bin-linux-amd64
exit $?
chmod it and then try Code:
DISPLAY="" xinit /full/path/to/your_UT_script -- :1
(chose the number :1 if there is no /var/tmp/.X1-lock, but if there is one, and no ]/var/tmp/.X2-lock, then use number 2 instead (and so on) |
The same result, it runs on Xgl
Quote: | If it still start the game inside XGL, then log into the console (CTRL+ALT+F1-6) and try to run:Code:
xinit /full/path/to/your_UT_script -- :1
is it better? |
No, it isn't
Quote: | The same, do you mean, bad color? or in a window on your actual desktop? |
You didn't unserstand me. Ok, I'll try to explain:
Now, ut2004 runs on the sepatate tty(display), ir really runs and with no errors. But it has bad textures, colors, etc
I saw such screenshots in Novell's Bugzilla(they were done with Xgl running). That's why I think in my case ut2004 runs on Xgl.
This is one of them: https://bugzilla.novell.com/attachment.cgi?id=74328&action=view |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Wed Aug 23, 2006 11:00 am Post subject: |
|
|
nnd wrote: | You didn't unserstand me. Ok, I'll try to explain:
Now, ut2004 runs on the sepatate tty(display), ir really runs and with no errors. But it has bad textures, colors, etc
I saw such screenshots in Novell's Bugzilla(they were done with Xgl running). That's why I think in my case ut2004 runs on Xgl.
This is one of them: https://bugzilla.novell.com/attachment.cgi?id=74328&action=view |
That's easy to see, once your game is running on the other display, come back to your desktop (CTRL+ALT+F7 ?), then in an terminal, run
and post back the result. _________________ The End of the Internet! |
|
Back to top |
|
|
nnd n00b
Joined: 21 Aug 2006 Posts: 11
|
Posted: Wed Aug 23, 2006 11:42 am Post subject: |
|
|
Of course, I've already done it. It's really running on Xgl.
Code: | > cat ~/bin/ut_test
#!/bin/sh
cd /home/nnd/ut2004/System
./ut2004-bin-linux-amd64
exit $? |
Code: | >DISPLAY="" xinit /home/nnd/bin/ut_test -- :1
>ps aux | grep X
root 2999 4.3 10.5 139672 108108 ? SL 12:49 7:06 /usr/X11R6/bin/X -br -nolisten tcp :0 vt7 -auth /var/lib/xdm/authdir/authfiles/A:0-sCvkJY
root 3334 0.1 1.3 52516 13408 tty7 SLs+ 12:49 0:14 /usr/X11R6/bin/Xorg -br vt7 -auth /tmp/.Xgl-auth-OJMYSY -nolisten tcp :93 -terminate
nnd 3470 0.0 0.1 9368 1680 ? Ss 12:49 0:00 /bin/sh /usr/X11R6/bin/kde
nnd 3513 0.0 0.0 22244 620 ? Ss 12:49 0:00 ssh-agent /bin/bash /etc/X11/xinit/xinitrc
nnd 3517 0.0 0.0 9064 676 ? S 12:49 0:00 /usr/bin/dbus-launch --sh-syntax --exit-with-session /usr/X11R6/bin/kde
nnd 2095 49.6 10.4 144336 107916 pts/2 RL 15:33 0:29 X :1
root 2097 3.5 1.2 52108 12988 tty8 SLs+ 15:33 0:02 /usr/X11R6/bin/Xorg -auth /tmp/.Xgl-auth-CmsqgZ -nolisten tcp :94 -terminate
|
I noticed to lines added:
Code: |
nnd 2095 49.6 10.4 144336 107916 pts/2 RL 15:33 0:29 X :1
root 2097 3.5 1.2 52108 12988 tty8 SLs+ 15:33 0:02 /usr/X11R6/bin/Xorg -auth /tmp/.Xgl-auth-CmsqgZ -nolisten tcp :94 -terminate |
Do you see see the second? No doubt, it's Xgl. |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Wed Aug 23, 2006 7:17 pm Post subject: |
|
|
nnd wrote: | I do not use gentoo on this computer. Does it really matter? |
No it doesn't, and it explains lot of things:) It looks like Suze and gentoo doesn't work the same way when it comes to Xgl
Code: | root 2766 0.0 0.0 11200 908 ? S 20:21 0:00 /opt/kde3/bin/kdm
root 2843 3.0 8.9 128848 92224 ? SL 20:21 0:50 \_ /usr/X11R6/bin/X -br -nolisten tcp :0 vt7 -auth /var/lib/xdm/authdir/authfiles/A:0-UnSes1
root 3224 0.1 1.2 52432 13332 tty7 SLs+ 20:21 0:03 | \_ /usr/X11R6/bin/Xorg -br vt7 -auth /tmp/.Xgl-auth-RemV3N -nolisten tcp :93 -terminate
|
So you said X (usr/X11R6/bin/X) is Xgl, That's why I asked you (by pm) to give me the result of ls -l /usr/bin/X* (Note /usr/X11R6 is usually a link to /usr)
Here is what I get on gentoo: ls -l /usr/bin/X*: | lrwxrwxrwx 1 root root 4 jun 30 19:34 /usr/bin/X -> Xorg
-rwxr-xr-x 1 root root 1680988 jun 30 19:34 /usr/bin/Xdmx
-rwxr-xr-x 1 root root 1356984 jui 27 22:09 /usr/bin/Xgl
-rwxr-xr-x 1 root root 3480452 jun 30 19:34 /usr/bin/Xnest
-rws--x--x 1 root root 1656708 jun 30 19:34 /usr/bin/Xorg
-rwxr-xr-x 1 root root 4074620 jun 30 19:34 /usr/bin/Xprt
-rwxr-xr-x 1 root root 3769328 jun 30 19:34 /usr/bin/Xvfb |
On gentoo X is a symbolic link to Xorg, and to run Xgl, we have to run /usr/bin/Xgl While on Suse, it seems /usr/bin/X is either a symbolic link to /usr/bin/Xgl, or the executable of Xgl itself.
(that's also why we, gentoo users, would have to modify kdm script to make it work with Xgl, see gentoo-wiki)
But I aslo have a good news:)
man xinit wrote: | SYNOPSIS
xinit [ [ client ] options ] [ -- [ server ] [ display ] options ]
|
We can specify whichh Xserver to use.
So, now, you should be able to try this:
Code: | xinit ~/bin/ut_test -- /usr/bin/Xorg :1 |
And now it should work (there should be no need to set DISPLAY="" )
If it works, then just tell me and I'll had an xserver_to_use variable in the script.
/me waiting _________________ The End of the Internet! |
|
Back to top |
|
|
nnd n00b
Joined: 21 Aug 2006 Posts: 11
|
Posted: Thu Aug 24, 2006 6:26 am Post subject: |
|
|
Code: | > ls -l /usr/X11R6/bin/X*
lrwxrwxrwx 1 root root 16 2006-08-20 11:24 /usr/X11R6/bin/X -> /var/X11R6/bin/X
-rwxr-xr-x 1 root root 2225920 2006-05-02 11:35 /usr/X11R6/bin/Xdmx
lrwxrwxrwx 1 root root 4 2006-07-17 16:07 /usr/X11R6/bin/XFree86 -> Xorg
-rwxr-xr-x 1 root root 1710688 2006-07-29 13:40 /usr/X11R6/bin/Xgl
-rwxr-xr-x 1 root root 27494 2006-05-02 11:32 /usr/X11R6/bin/Xmark
-rws--x--x 1 root root 2086520 2006-05-02 11:35 /usr/X11R6/bin/Xorg
-rwxr-xr-x 1 root root 4792784 2006-05-02 11:35 /usr/X11R6/bin/Xvnc
lrwxrwxrwx 1 root root 7 2006-07-17 16:02 /usr/X11R6/bin/Xwrapper -> XFree86 |
Code: | > ls -l /var/X11R6/bin/X
lrwxrwxrwx 1 root root 18 2006-08-23 21:38 /var/X11R6/bin/X -> /usr/X11R6/bin/Xgl |
So, in my case /usr/X11R6/bin/X points to /usr/X11R6/bin/Xgl!
Code: | xinit ~/bin/ut_test -- /usr/X11R6/bin/Xorg :1 |
Ok, it works like a charm Also it's possible to use default loki's ut2004 script instead of ut_test.
Quote: | there should be no need to set DISPLAY="" |
Yes, there is no need to set it.
Quote: | If it works, then just tell me and I'll had an xserver_to_use variable in the script. |
Ok, it's nice, but could you also add these routes as default: /usr/bin/Xorg and /usr/X11/bin/Xorg? I think, most systems has them.
Thank you! /me is waiting for the next release |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Thu Aug 24, 2006 7:53 am Post subject: |
|
|
version=20060824
xlaunch, will now set the Xserver to use, since on some system, /usr/bin/X is a link to /usr/bin/Xgl, while on other /usr/bin/X is a link to /usr/bin/Xorg
@nnd, Code: | ls -l /usr/X11R6
lrwxrwxrwx 1 root root 6 aoû 17 00:16 /usr/X11R6 -> ../usr |
It's like that on every system I check, so I assume it is the default
Quote: | Also it's possible to use default loki's ut2004 script instead of ut_test |
I don't know this script, I tried looking for loki+ut2004 but didn't get any interesting result, what am I missing? _________________ The End of the Internet! |
|
Back to top |
|
|
arabis Apprentice
Joined: 11 Apr 2005 Posts: 195 Location: Québec, Canada
|
Posted: Thu Aug 24, 2006 11:55 am Post subject: |
|
|
Is there someboby using an Ati card + ati-drivers who has succeeded to use this script? _________________ Acer Ferrari 4002 WLMI fr
AMD64, Turion ML-30
ATI Mobility X700
DVDR double couche |
|
Back to top |
|
|
Xamindar Veteran
Joined: 03 Oct 2004 Posts: 1155 Location: California
|
Posted: Sun Sep 03, 2006 9:48 pm Post subject: |
|
|
I don't think this script works anymore. My x servers crash when I use it. Anyone care to update? |
|
Back to top |
|
|
surferjox n00b
Joined: 24 Feb 2006 Posts: 2
|
Posted: Sun Sep 03, 2006 10:08 pm Post subject: |
|
|
Seems nice :=) |
|
Back to top |
|
|
Xamindar Veteran
Joined: 03 Oct 2004 Posts: 1155 Location: California
|
Posted: Mon Sep 04, 2006 4:40 am Post subject: |
|
|
Is it possible to set the resolution of the new xserver with this script? For example, set it to 800x600 at 16 when I launch DiabloII. |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Mon Sep 04, 2006 12:39 pm Post subject: |
|
|
Xamindar wrote: | I don't think this script works anymore. My x servers crash when I use it. Anyone care to update? |
Did it work before? do you have an ATI card ? if so, and if you're using XGL then yoou might be interested with this
Quote: | Is it possible to set the resolution of the new xserver with this script? For example, set it to 800x600 at 16 when I launch DiabloII. |
How do you set the resolution? If it's with x11-apps/xrandr? or do you have a second xorg.conf file? more info needed
EDIT: well it looks like you've got an ATI card, and that you're also running XGL. so before even trying this script, make sure you can run two xserver with you card (eg try running xinit -- :1) if you can't then just read the workaround given above. I'm thinking how to make the script working for you too (those who can't start two xserver because of ati drivers), but right now I have some school work to do, and it can't wait anymore
===========================================================
EDIT2: Sorry, just didn't want to pump the thread again
version=20060904
corrected wrong behaviour, when using XPLAYER feature and when link was added is a different directory than where the xlaunch script is.
If using this feature, then now, here is what you can add in the sudoers file:
then once inthe file, delete the previous line about xlaunch if you had one, and write this instead:
Code: | Cmnd_Alias XLAUNCH = /bin/su - xplayer -l -c FULL_PROG_NAME=* /home/scripts/xlaunch *
%games ALL=(root) NOPASSWD: XLAUNCH |
*updated first post the reflect this.
_________________ The End of the Internet!
Last edited by truc on Tue Sep 05, 2006 12:36 am; edited 1 time in total |
|
Back to top |
|
|
Xamindar Veteran
Joined: 03 Oct 2004 Posts: 1155 Location: California
|
Posted: Mon Sep 04, 2006 10:54 pm Post subject: |
|
|
truc wrote: |
EDIT: well it looks like you've got an ATI card, and that you're also running XGL. so before even trying this script, make sure you can run two xserver with you card (eg try running xinit -- :1) if you can't then just read the workaround given above. I'm thinking how to make the script working for you too (those who can't start two xserver because of ati drivers), but right now I have some school work to do, and it can't wait anymore
|
No, I have a nvidia card. When I launch a second xserver then my xgl one will randomly crash, sometimes imediately and sometimes after a couple of minutes. Your script works fine if I launch it with no other server running. Actually, your script is probably fine. Looks like it is a problem with the most rescent drivers. |
|
Back to top |
|
|
Pentahex n00b
Joined: 05 Apr 2006 Posts: 40 Location: Bemidji, Minnesota
|
Posted: Mon Sep 04, 2006 11:47 pm Post subject: |
|
|
Xamindar:
I've noticed the same behavior since the recent nvidia-driver upgrade with Xgl. I'm sure it's not related to the Xlaunch script
because the same thing happens with Xgame. The strange thing is, sometime it will work, but usually X will crash and
have to be restarted. |
|
Back to top |
|
|
baigsabeeh Guru
Joined: 28 Sep 2005 Posts: 520 Location: North Brunswick, NJ
|
Posted: Wed Sep 06, 2006 3:16 pm Post subject: |
|
|
I was wondering something. This is my first time using XLaunch and I didn't like the fact that applications ran without a windeco in the other X. So, I did xlaunch startkde when I switched back to X from XGl. This ran another KDE sessions. So, would it be ok if I did some other lightweight WM on the other X to play games with. _________________ BSD > SysV > Linux
BSD FTW! |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Wed Sep 06, 2006 6:34 pm Post subject: |
|
|
baigsabeeh wrote: | I was wondering something. This is my first time using XLaunch and I didn't like the fact that applications ran without a windeco in the other X. So, I did xlaunch startkde when I switched back to X from XGl. This ran another KDE sessions. So, would it be ok if I did some other lightweight WM on the other X to play games with. |
You obviously didn't read the whole first post.. But I can't blame you for that.. it's a bit long..
so, for full screen application,we usually don't need any window manager to run onthis display. but for windowed programs you might be interested with this part(in the first post):
III - The xlaunch script
b) HowTo use it -The new way - The link trick
Honestly I don't really like the way of doing it(modifying the script etc.. ), that's why I'm planning to rewrite xlaunch in a different way, so that, the script has not to be modified (handy if it's installed with the xgl-coffee overlay, and if the user don't have root acces). until then, it should work as you want.
_________________ The End of the Internet! |
|
Back to top |
|
|
baigsabeeh Guru
Joined: 28 Sep 2005 Posts: 520 Location: North Brunswick, NJ
|
Posted: Thu Sep 07, 2006 1:19 am Post subject: |
|
|
Here's another problem. When I launch an application in XLaunch when I'm using XGl/Compiz/cgwd, sometimes it just shows for 3 or 4 seconds and then throws me back to KDM and then I end up logging into another KDE session, manually killing that one and then going to the original. Is there a way around this. This doesn't happen if I use Xlaunch in Xorg. _________________ BSD > SysV > Linux
BSD FTW! |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Thu Sep 07, 2006 7:01 am Post subject: |
|
|
This doesn't seem to be xlaunch related, so I'm affraid I can't do anything. But it could be interesting to know if it happen only with a few program, or with each one?
Did you look at the log? if it was on DISPLAY=:1 then the log is /var/log/Xorg.1.log , Any Error (EE) _________________ The End of the Internet! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|