LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-12-2006, 09:41 AM   #1
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
Independant monitors: launching an app to a monitor from CLI / script


A while back i knocked up a little script to launch a program in "full screen mode" without using a WM. Primarily this was/is used to run games from CLI or terminal on one monitor on a new X session.

Now i am looking to expand that and provide the game on one monitor and other apps / WM on the second. My difficulty comes in finding the right command line to do such a thing!

A quick recap on what I've got so far (files are trimmed for readability):

File: gamelist
Code:
# Starcraft
gamelist[0]="Starcraft (wine)"
games[0]="wine /mnt/windrive/drive_c/Program\ Files/Starcraft/Starcraft.exe"
res[0]="640480"
depth[0]="16"

...

# Neverwinter Nights
gamelist[2]="Neverwinter Nights (native)"
games[2]="cd /mnt/windrive/Linux/NWN/ && nwn"
res[2]="12801024"
depth[2]="24"
File: run (blue bits is the major problem area)
Code:
source $HOME/scripts/gamelist
...
xinit /bin/bash -c "${games[$2]} & xterm -display :2.1 &" -- :2 -config xorg.gaming.conf -layout "${res[$2]}" -depth "${depth[$2]}"
Run is called like: run -p 2 # for NWN

In xorg.gaming.conf i have a lot of server layout section that look like:

Code:
Section "ServerLayout"
        Identifier  "800600"
        Screen  0 "800600" 0 0
        Screen  1 "12801024a" RightOf "800600"
        InputDevice "Mouse1" "CorePointer"
        InputDevice "Keyboard1" "CoreKeyboard"
EndSection
And using the command: startx -- -config xorg.gaming.conf

I can verify that it works as intended, in that i get two distinct (ie non-Twinview / mergedFB) displays under xfce.

I also found that manually calling `xterm -display :2.1` sends an xterm to the second monitor once i am in game-mode.

Any thoughts on getting programA on the left and programB on the right?

I can supply the full code to the scripts & config files I'm using if it'll help - the most important parts are already here =)

Yours,
- Piete - currently scratching his head in confusion.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
launching app under wine only works in root mtdew3q Linux - Newbie 3 04-22-2007 09:22 PM
launching an app into a specific workspace? jasonv Fedora 0 11-14-2004 04:58 PM
Launching an app through telnet? P_Shep Linux - Newbie 2 10-22-2004 09:51 AM
Oddly sluggish: app launching in KDE nvn Slackware 5 08-02-2004 05:05 AM
two independant monitor on one box pawn-o-matic Linux - Laptop and Netbook 3 07-18-2004 01:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration