Urban Terror Forums: Run UrbanTerror on a second Xserver - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Run UrbanTerror on a second Xserver Rate Topic: -----

#1 Guest_crache

Posted 14 July 2005 - 05:06 PM

I will write up here a quick guide to show you how to run urbanterror on a second xserver. I have been doing this for quite some time now, mostly for the advantage of being able to [control-alt-f7] back to my desktop and browse the web, chat etc; then [control-alt-f8] back to the game without any problems. It's better than being able to minimize in windows.

Requirements:
You have UrT setup and working
You have the Expect program installed
http://expect.nist.gov/

In my home directory, I have a scripts folder to which I create desktop icons for my games. *somewhere* have a directory containing these files:

urbanterror.exp

#!/usr/bin/expect -f
set timeout -1
spawn /home/josh/scripts/quake/su
expect "Password: "
sleep 1
send "YOURPASSWORDr"
send "export __GL_FSAA_MODE=1r"
send "export __GL_SYNC_TO_VBLANK=1r"
send "/home/urbanterror/ut.shr"
expect "to shut down"
sleep 1
send "exitr"
expect eof



This script logs in as the user you want to play urbanterror as, and starts the scripts from its home directory. Edit it to your needs. In the same directory as this file, place:
su

#/bin/bash
su - urbanterror



Now, if you already have UrT setup, copy your .q3a arena folder from your home directory over to the /home/urbanterror/ directory so that your settings are the same. Inside the /home/urbanterror/ directory, place these files:

ut.sh

#!/bin/bash
connect="$1"
source /etc/profile
export __GL_FSAA_MODE=1
export __GL_SYNC_TO_VBLANK=1
export DISPLAY=:1
cat > ./urbanterror.sh << EOF
#!/bin/sh
export __GL_FSAA_MODE=1
export __GL_SYNC_TO_VBLANK=1
/usr/games/bin/quake3 +set fs_game q3ut3 $connect
EOF
startx -- :1



.xinitrc
In your .xinitrc file, make sure it is set to run this:

/home/urbanterror/urbanterror.sh


make sure all your scripts are executable. The $connect was me playing around trying to get XQF to send the server through these scripts. It's been a while and I don't know if I had it working or not, as I only used XQF when the in game browser wasn't working. Any questions, suggestions comments are appreciated.

-crache

#2 User is offline   mitsubishi Icon

  • Account: mitsubishi
  • Country:
  • Joined: 28-February 10
  • Posts: 13,481

Posted 20 July 2005 - 03:38 AM

I never saw the advantage of sth like that to be honest. I mean if the 1st xserver still runs what's the advantage? If it's only for desktop cleaness you can use a 2nd virtual desktop for example.

I recall a related method. To run only an xserver with quake3 without a desktop environment in order to save up RAM. That's reasonable. However it would still be reasonable only to those that don't have enough ram or their desktop manager runs by default lots of applets etc. that take up cpu time.

edit:

In case it helps, there's sth particularly usefull I discovered for quake3, that works at least here. Q3, ET, D3 can be minimized, moved etc. after using "~"(q3's console) in q3 window-mode. If the resolution of the game is not the same with the desktop's,
a) running quake3
b) then changing X's resolution with ctrl+alt+-/+
c) bringing down q3's console,
d) moving the mouse down-right to pull q3 somewhere up-left.
e) turning off q3's console,

does the trick to center quake3 on the new lowest resolution unless q3 was placed partly out of the desktop's borders.

to go back
a) changing to desktop's resolution with ctrl+alt+-/+
b) bringing down q3's console
c) moving q3 around or minimizing it

brings you back to the desktop while q3 still runs and didn't get any command to change its video.

It's weird I know but I use that method in no time now since it turned into a habit. Setting the x server's config to only use the game's and the desktop's resolution (to not go into various useless resolutions every time to find the right one) helps.

ps. hm, I wonder if there's a way to automate those steps..

#3 User is offline   HoboHumpinSlut (old) Icon

  • Joined: 07-February 04
  • Posts: 2,308

Posted 20 July 2005 - 03:36 PM

[quote name='"fs"]hm' date=' I wonder if there's a way to automate those steps..[/quote']
bind a key in q3 to echo some text, pipe stdout of q3 into a shell script, in the script look for that text and use xrandr to change the resolution. if you got a nice WM like fluxbox you can save the window coordinates to place the q3 window at (initially).

#4 User is offline   mitsubishi Icon

  • Account: mitsubishi
  • Country:
  • Joined: 28-February 10
  • Posts: 13,481

Posted 20 July 2005 - 04:39 PM

k. the part of placing the window at the right spot may by tricky since I use windowmaker so I'm not sure if I can do that. well, I'm used to that "method" at the moment so personally I'm not that in a hurry to find a shortcut to it. it would be interesting to have a window manager-independed script for it, but.. anyway. who cares that much.

#5 User is offline   HoboHumpinSlut (old) Icon

  • Joined: 07-February 04
  • Posts: 2,308

Posted 20 July 2005 - 06:55 PM

well, it's the window manager that manages windows...

bullet_loaderAdvertisement

#6 User is offline   mitsubishi Icon

  • Account: mitsubishi
  • Country:
  • Joined: 28-February 10
  • Posts: 13,481

Posted 20 July 2005 - 07:33 PM

right. then, not much we can do there. everyone's on their own manager.

btw, all that seems it would be easier if q3 would swap from window to full screen mode without reloading its video. it puzzles me why it can be done by moving around window manager parts and when the game is asked to do it, it reloads itself.

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942