Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[TIP] Using xlaunch
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3, 4, 5, 6, 7  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Sun Jul 23, 2006 8:44 pm    Post subject: [TIP] Using xlaunch Reply with quote

10/02/2007 fix a problem when option/arguments have spaces, see here
27/01/2007 very small change ==> added the -L option to stat, line 317 ( -L, --dereference: follow links)
09/11/2006, a little fix, so that launching specific programs for a given application now works correctly , interesting info here
09/04/2006, corrected wrong behaviour with the XPLAYER feature, see this post for more info, don't forget to update your sudoers file (see there)
08/24/2006, the Xserver to use is now set to /usr/bin/Xorg instead of /usr/bin/X (since /usr/bin/X can be either Xorg or Xgl), download it here, info here
08/22/2006 --> minor release, grab it here, info here

***
Since 08/13/2006 xlaunch is available through the xgl-coffee overlay, it is -* keyworded so you need to do: echo 'x11-misc/xlaunch -*' >> /etc/portage/package.keyword before merging it.
***

08/08/2006 --> You can now choose a name when creating a link for a program that isn't in your PATH, see here to know why it can be usefull, and here for a bit more details on this.. :/
08/01/2006 (last update before my holidays:) ) --> added some functionnalities, see here for more details
07/31/2006
(in the evening..) --> now, if you want to launch something wich isn't in your path, you don't need anymore the --path option, but you can still use it:), see
I also added a function for a repetitive task (in the code, not when you run it)
07/31/2006(early in the morning) --> corrected and modified some comments, there are no need to update the script, if you already have it.
07/30/2006 added a link to download this growing script, some cleaning in it,and xlaunch now unset two variables that could (in special conditions) prevent it from working as expected, see there for more details
07/27/2006 big changes in xlaunch script, which is now far more user friendly, make this post reflect the changes, see here for more details


    I - Why could you be interested in this script?

    II - eh, this looks quite long to set it up :oops:

    III - The xlaunch script

      a) Background
      b) HowTo use it - The new way - The link trick
      c) Making your multimedia keys working
      d) Using XPLAYER

    IV - Why it is so good?
      a) wine
      b) xqf
      c) Differents settings for each app
      d) You tell me? ;)




I - Why could you be interested in this script?

    Hi, I wrote i little script, xlaunch, which, among other things that I will explain, launch an program on an other DISPLAY.
    For those who are not yet familiar with this, here is some of the reasons why you could want/need that:

      * You can now switch from a fullscreen app (eg: a game) to your desktop within a couple of second, with CTRL+ALF+F$. This is actually the first reason why I want to do this script (I needed something like alt+tab that works within a game)

      * For XGL users, this means, they can launch an opengl program (like googleearth, or a game), since IIRC it's not yet possible to use an opengl app directly in XGL. It doesn't have to be an fullscreen application, since it can also launch a Window Manager with the program.

      * You can use your multimedia/fun keys (on your keyboard/remote control..) inside a fullscreen app, which normaly grabs everythings from your input devices. This is handy since you can now control e.g.: your music, volume and so on, inside the game (no need to go back to your destop).

      * If you want to (easy to enable) you can create a game user, it will be used to launch the program if it's a game. There are mainly three reasons for that:
        * Many games can manage different profile, and if they are several users who can play on your computer, there will be a "~/.game_name" directory in each user's home, and some users will probably download files already downloaded by others. So if you enable this feature, it will launch games as a specific user (I'll call it XPLAYER).

        * Same comment applies to wine users, they will have to install a given game only one time, in XPLAYER's home.

        * I like to believe, that if there's a bug in my game, (like those ), it adds a bit of security, since it's run with a user, belonging to only video,audio and games groups.

        * The only two downsides I can think of, is that an other user could delete your profile, so XPLAYER is only usable on a personnal computer, where there is a minimum of trust between users ;), and that different users may have different keybindings(a different xbindkeysrc file)


      * If you use this script, you don't have to wonder which Display you can use (it finds and uses the first available).

      * If your ~/.Xauthority file (or XPLAYER's one if you use it) doesn't have the needed cookie corresponding to a given display, it will create it for you, and keep it for later use.



II - eh, this looks quite long to set it up :oops: ?

    Actually, it's never been long to configure, there was, at the beginning, only one link to do, yep one thing that's all. But I just explain how to do a lot of things, and why blah,blahblah instead of just making a listing of the needed command (actually it wouldn't be a listing, since there's only one command.. ( ln ).
    Keep in mind that I'm also explaining here howto use some of xlaunch functionnalities that you probably don't need. Do you need to have special keybindings to control e.g. your music within a game? do you need to set your mouse sensitivity? ..? I personnally do.
    Anyway, now it's easier than ever. If you're in a hurry, and want to try it now, just copy&paste the script xlaunch(from III - b), chmod it) and run it with the name of the program you want as an argument (eg: xlaunch quake3-bin ).

    Later when you'll have a bit more time then run xlaunch --help to have a brief view of what xlaunch can also do. But the help is quite short, so if you need anything, you're welcomed to read the following :)


III - The xlaunch script

    a) Background

    [The only thing really needed is that the application, you want to launch with xlaunch, appears in your PATH]
    This is no longer needed since version 20060727 : if you want to launch a program that doesn't appear in your PATH (for instance, something compiled in your HOME or whatever) then you can use the --path option for xlaunch, e.g.: xlaunch --path path/to/cool_prog
    And since version 20060731-r1, xlaunch path/to/program is enough


    But you'll find everything easier if you have a directory, which is in your PATH, where you put all your scripts. If you don't have one yet, let's create it:

    As root:
    creating your scripts directory:
    mkdir /home/scripts
    (and chmod and chown it to your need, eg: chown your_user_name_here:users /home/scripts , and chmod 755 /home/scripts )
    Now we need to add this directory to your path, there are two ways for doing this:
    Either you do it manually with echo PATH=\"\$PATH:/home/scripts\" >> ~/.bashrc (as your normal user)
    Or (the prefered way since, it will also add /home/scripts to every user,but root, PATH)
    in /etc/profile, replace:
    if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
            PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"
    else   
            PATH="/usr/local/bin:/usr/bin:/bin:${PATH}"
    fi


    with the following:
    if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
            PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"
    else   
            PATH="/usr/local/bin:/usr/bin:/bin:/home/scripts:${PATH}"
    fi


    now source it, to have the new $PATH in your env:
    Code:
    source /etc/profile




    b) The script xlaunch

    Download it *here* and save it as /home/scripts/xlaunch

    group&permissions:
    chmod 755 /home/scripts/xlaunch
    chown your_name_here:users /home/scripts/xlaunch


    b) HowTo use it -The new way - The link trick

    First I have to say the script itself is IMO well commented, thus, if you want to modify someting, it should be pretty easy to find your way out.


    The new way: you no longer have to do some linking in order to use it. A quick look into xlaunch --help will tell you that you can now run
    Code:
    xlaunch quake3 +connect 213.246.38.167:27019
    and it will launch quake3 on an other DISPLAY, with you mouse settings, keybindings and so on. It works since quake3 is in my path. but if it wasn't(and if I have enough right to execute it), then I still can run
    with fullpath:
    xlaunch -p /usr/games/bin/quake3 +connect 213.246.38.167:27019


    (it also work with relative path, ie: assuming you were in /usr/game, xlaunch -p bin/quake3 +connect 213.246.38.167:27019 would work.)
    Note: since version 20060731-r1, you actually don't need to use the --path option, xlaunch path/to/program is enough (with relative or absolute path))

    So as you can see there is, there is no longer anything to do before using it. But, honestly, even if possible, I still prefer launching :
    you can still use the link trick:
    xquake3 +connect 213.246.38.167:27019
    instead of the previous ones, it just seems more obvious to me. I've modified xlaunch so that it is now able to create the link for you. :) (keep on reading for more details :))



    * Fullscreen application:
    new way if the user who wants to create link(s) has write access to the directory where xlaunch is, then he just need to run
    with write access on /home/scripts:
    xlaunch --addlink quake3-bin quake3-cpma
    Created link for quake3-bin : xquake3-bin --> xlaunch in /home/scripts
    Created link for quake3-cpma : xquake3-cpma --> xlaunch in /home/scripts

    ButIf he doesn't have write access to this directory, then he can specify the directory where he wants these links to be created:
    without write access, specifying a directory:
    xlaunch --addlink ~/tmp quake3-bin quake3-cpma
    Created link for quake3-bin : /home/truc/tmp/xquake3-bin --> /home/scripts/xlaunch
    Created link for quake3-cpma : /home/truc/tmp/xquake3-cpma --> /home/scripts/xlaunch



    And if, in this example, /home/scripts or /home/truc/tmp is in your PATH, then you can now run the command: xquake3-cpma ...

    tip: since version 20060801, if you would like to create a 'magic link' for a program that is note in your path, you just need to specify the directory of the program:
    xlaunch --addlink path/to/program1 /PaTh/To/program2 ..
    see here and also here for more detail on this.



    If you're not satisfied with this you can still do it the old way:
    the old way: creating the link:
    cd /home/scripts
    ln -s xlaunch xquake3-bin

    Note the 'x' before the name of the executable.


    Now, if you issue xquake3-bin, it will launch quake3-bin on an other DISPLAY. If you want it also configure your mouse or whatever you can do with xset, modify your keymaps, set your WM independant keybindings.


    * Windowed application:
    You can also launch a program, that is not supposed to be run fullscreen(eg: some strategic games have several windows). To achieve this, you can modify xlaunch. Let say I want to launch The Gimp (which comes with the gimp command) on an other display.
    Try running:
    xlaunch gimp

    And you'll find that you miss a window manager (at the very least to have window borders, and to be able to move windows).

    So, in xlaunch in this in the case loop:
    Code:
    case "${FULL_PROG_NAME##*/}" in
       
        xlaunch) echo "The program can't call itself. Exiting!"
                # Well, actually it can, but it will exit later, so exiting now..
           exit 2
                ;;

        *)      xinit "${FULL_PROG_NAME}" $* -- $Xserver :$DISPLAY_TO_USE $serverargs &>/dev/null &
                ;;
    esac

    you have to add the gimp case
    Code:
    case "${FULL_PROG_NAME##*/}" in
        gimp)   xinit "${FULL_PROG_NAME}" $* -- $Xserver :$DISPLAY_TO_USE $serverargs &>/dev/null &
                DISPLAY:$DISPLAY_TO_USE WindowManager &
       
        xlaunch) echo "The program can't call itself. Exiting!"
                # Well, actually it can, but it will exit later, so exiting now..
           exit 2
                ;;

        *)      xinit "${FULL_PROG_NAME}" $* --  $Xserver :$DISPLAY_TO_USE $serverargs &>/dev/null &
                ;;
    esac


    Where you replace WindowManager with the WM of your choice. Note that if you have an other non fullscreen application, that you would like to run with the same WM, instead of adding a new case, just replace gimp) with gimp|other_app).

    Note: that you can do that even if you're launching someting that doesn't appear in your path, (your specifying the full/relative path (with for example: xlaunch --path path/to/program or xlaunch path/to/program), if your path is like very/long/path/to/program, you just have to add the case 'program' in the loop

    c) Making your multimedia keys working

    I'm personnally using xmodmap and xbindkeys ( check this out: HOWTO Use Multimedia Keys). But if you're using an other daemon than xbindkeys, it shouldn't be that hard to modify xlaunch.

    One thing you need to know, is that when your program runs in fullscreen mode, it usually grabs every keys from your input devices, this means, that daemons like xbindkeys won't get any event from them. Fortunately, there's a trick:
    In the settings of the application/game, turn off fullscreen (yes do it:) ) . the good news, is that you launch this app on an other DISPLAY without any window manager running on it, this means the window of your app/game won't have any border at all, and if your game use the same resolution as the Xserver does, then it's just fullscreen. The app/game runs in window mode, but it's like fullscreen :) .
    You may wonder why it is so cool? only because now, the program doesn't grab everything from your input devices now. and now xbindkeys can receive some events.

    Note that for games using the quake3 engine(quake3 itself, enemy-territory, tremulous and so on..), you need to bring down the console, otherwise, even with fullscreen off, they grab everythings. (once the console is down, you can use your special keys).


    d) Using XPLAYER

    As I try to say in part I, there are, in my opinion, many advantages to use a default user XPLAYER, which(?) will be used to launch games. If you want to try it out, here is how you can do:

    First we need to uncomment the XPLAYER variable in xlaunch in order to enable it.

    Then we need to create that user, I've chosen xplayer, you can use something else, but then don't forget to modify the XPLAYER variable in xlaunch
    as root run:
    creating XPLAYER:
    adduser -m -g games -G audio,video,cdrom xplayer
    # then we su to xplayer, to copy what we need
    su - xplayer


    (if you previously modified /etc/profile as suggested, then xplayer has already /home/scripts in its PATH, otherwise issue echo "PATH=\"$PATH:/home/scripts\"" >> /home/xplayer/.bashrc )


    Now, if you have one or several of these files: ~/.Xresources ~/.Xdefaults ~/.Xmodmap ~/.xbindkeysrc in your main user's HOME directory, then copy them to xplayer's HOME.
    !!!Be sure to be xplayer when copying this( to avoid permission problem)... Same comment applies to the following.!!!

    If it's not the first time you play, (is it? 8O ) You should already have some directories in your HOME created by the games ( like ~/.q3a ~./etwolf or even ~/.wine )
    => Copy( or move them..). them from your home to xplayer's home. (once I copied wine directory, I ran (as xplayer) winecfg, I don't know if it's really needed, but it worked:) )

    Now we need to configure sudo (app-admin/sudo):
    login as root, then
    configuring sudo:
    visudo


    and
    this line has change with version 20060904, be sure to have the right one now:
    add theses lines then save&exit:
    Cmnd_Alias      XLAUNCH          = /bin/su - xplayer -l -c FULL_PROG_NAME=* /home/scripts/xlaunch *

    %games          ALL=(root)              NOPASSWD: XLAUNCH


    You can also want to add this line your_main_user_name ALL=(root) NOPASSWD: /bin/su - xplayer (so you'll be able to login as xplayer without any password, if you wanted to modify something in its home)


III - Why it is so good?


    a) wine
    One of the things I particularly like with it is that I can use it for whatever I want, even launching a game via wine. e.g.: I have warcraft3 and The Frozen Throne, this is what you need to launch them with xlaunch:
    create those two little scripts
    /home/scripts/warcraft3:
    #!/bin/sh
    cd ~/.wine/drive_c/Program\ Files/Warcraft\ III
    exec `wine Warcraft\ III.exe -opengl`

    exit 0


    and
    /home/scripts/frozenthrone:
    #!/bin/sh
    cd ~/.wine/drive_c/Program\ Files/Warcraft\ III
    exec `wine Frozen\ Throne.exe -opengl`

    exit 0


    since they are games:
    settings group&permission:
    chgrp games /home/scripts/{warcraft3,frozenthrone}
    chmod 0750 /home/scripts/{warcraft3,frozenthrone}


    And, as I said , programs need to appear in your PATH, since /home/scripts is in your PATH, then warcraft3 and frozenthrone are in too. Then all you have to do now is to follow II ) b) HowTo use it - The new way -The link trick :

    creating the link to for warcraft3 and frozenthrone:
    cd /home/scripts
    xlaunch --addlink warcraft3
    xlaunch --addlink frozenthrone

    (because /home/scripts is in my PATH, this means warcraft3 and frozenthrone too)


    And when you want to play, just issue either xwarcraft3, or xfrozenthrone, and it will launch the game on an other display, su to XPLAYER, if you wanted to, and so forth and so on.


    I don't have WoW, but, I think the same could be done, you just have to adapt the wow script from the warcraft3 one


    b) xqf

    One other thing I like, is that there are no special trick to make xqf working with you game, in Preferences --> Game --> invoking --> in "command-line" change the command_for_the_game with xcommand_for_the_game (erm.. don't forget to do the symlink before ;) )
    eg: for enemy-territory, do the symlink (xlaunch -a et), and in XQF, instead of et in the "Command Line" put xet, and now you can use XQF as you normally do, and when you join a game, in will launch it on an other display. :D

    Note: you can also put xlaunch et in the "Command Line" field, but who would want that? :/



    c) Differents settings for each app

    It's also possible to set differents settings for a given program, let's for example you want to run a fullscreen program in a lower resolution than your desktop is, I explain here(second part of the post) how you can do this.
    I also explain in this post how you can set other things since it might not be obvious for every one .(happy reading)



    d) You tell me?:)

    I'd be glad to know if:
      * You read this entire post
      * You are interested in xlaunch
      * You have any constructive comments (I'd also be happy to know what they are...)
      * If I made any bashism in the script. I'd like xlaunch to run even if bash is not the default shell
      * I made typo, grammar mistakes(?) (I'm sure I did since english is not my first language), I'd be happy to learn and to correct them :)




Oh yeah I forgot, yeah I already heard about xgame, didn't tried it yet, but, I doubt xgame can easily do what xlaunch does (at least for the XQF part from what I've heard)
_________________
The End of the Internet!


Last edited by truc on Fri Dec 21, 2007 9:39 pm; edited 60 times in total
Back to top
View user's profile Send private message
aidy
l33t
l33t


Joined: 07 Apr 2005
Posts: 915

PostPosted: Sun Jul 23, 2006 10:22 pm    Post subject: Reply with quote

I'll check this out in ubuntu tomorrow

and will note of spelling mistakes
Back to top
View user's profile Send private message
Dieter@be
Guru
Guru


Joined: 03 Apr 2005
Posts: 314
Location: Wetteren, Belgium

PostPosted: Mon Jul 24, 2006 10:07 am    Post subject: Reply with quote

well, seems like the reason why i don't use xgl is getting flushed :)
_________________
Nothing beats a ride on the Gentoo learning curve.
2 Gentoo Linux boxes - 2 Arch Linux boxes - Love all four
Say no to i386 binaries! -- Adopt an unanswered topic
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Mon Jul 24, 2006 10:12 am    Post subject: Reply with quote

Dieter@be wrote:
well, seems like the reason why i don't use xgl is getting flushed :)


:? :?: Sorry, I just can't understand? What do you mean?
Back to top
View user's profile Send private message
Dieter@be
Guru
Guru


Joined: 03 Apr 2005
Posts: 314
Location: Wetteren, Belgium

PostPosted: Mon Jul 24, 2006 4:03 pm    Post subject: Reply with quote

the reason that i don't use xgl is because of all the problems with playing games etc in xgl.
but now it seems these problems are gone, so i'm considering switching to xgl :)


oh, and 1 typo:
Quote:
II - The xlaunch script a) Background The only think really needed


should be "thing" :wink:
_________________
Nothing beats a ride on the Gentoo learning curve.
2 Gentoo Linux boxes - 2 Arch Linux boxes - Love all four
Say no to i386 binaries! -- Adopt an unanswered topic
Back to top
View user's profile Send private message
stahlsau
Guru
Guru


Joined: 09 Jan 2004
Posts: 565
Location: WildWestwoods

PostPosted: Mon Jul 24, 2006 8:18 pm    Post subject: Reply with quote

hi,
great job with that script!

I've got some minor annoyances that bug me a little, but i think i can sort 'em out tomorrow.
First thing is that tremulous doesn't take the correct screenresolution from its configfile, there's always a black border around the gamewindow. But that isn't the fault of your script ;)
Second thing i've noticed is that the gamma values are wrong on the second Xserver screen. Even if i set gamma to 5 or something it doesn't change. Probably i have to enter the correct values to some configfile for the second virtual xserver to behave like the first one...i'll check that later.

Anyways, thx for the script, i'll post any things i find out about my problems :roll:
_________________
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Mon Jul 24, 2006 9:18 pm    Post subject: Reply with quote

Dieter@be wrote:
should be "thing" :wink:

thanks, corrected:)

Dieter@be wrote:
well, seems like the reason why i don't use xgl is getting flushed

:)

stahlsau wrote:
Second thing i've noticed is that the gamma values are wrong on the second Xserver screen. Even if i set gamma to 5 or something it doesn't change. Probably i have to enter the correct values to some configfile for the second virtual xserver to behave like the first one


You're talking about the gamma inside the game, right? if so:

IIRC, tremulous, is using the quake3 engine from icculus. (icculus.org/quake3 ) and I also noticed a similar thing with quake3 (from source, not quake3-bin) , when fullscreen is off then brightness (in DISPLAY settings inside the game) has no effect. (but brightness works as expected in Fullscreen) So I reported the bug here: When Fullscreen is off, Brightness has no effect but didn't get any comment yet.
So it may be the same bug :?:


Anyway, thanks
Back to top
View user's profile Send private message
stahlsau
Guru
Guru


Joined: 09 Jan 2004
Posts: 565
Location: WildWestwoods

PostPosted: Tue Jul 25, 2006 5:32 am    Post subject: Reply with quote

Quote:
So I reported the bug here: When Fullscreen is off, Brightness has no effect but didn't get any comment yet.

Ok, seems to be the same bug. I commented on it in bugzilla. Sadly this bug renders your script unusable for me :/

Now i'll just have to check out how to get it using the correct resolution. I've set 1368x1026 in the config, but it starts with 1280x1024...well.
_________________
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Tue Jul 25, 2006 9:20 am    Post subject: Reply with quote

stahlsau wrote:
Ok, seems to be the same bug. I commented on it in bugzilla. Sadly this bug renders your script unusable for me :/


You can still play in fullscreen mode, I proposed window mode to make multimedia keys working, if you don't use them, (or prefer not using them and have your gamma working back) then you can play in fullscreen(and use the xlaunch :) )


stahlsau wrote:
Now i'll just have to check out how to get it using the correct resolution. I've set 1368x1026 in the config, but it starts with 1280x1024...well.


8O you can play tremulous in "1368x1026" ! :?: wierd! and does it work when you don't use the script? Your xorg.conf is also "1368x1026" ? didn't know such a resolution was possible!

And you're not using XPLAYER, arent' you?
Back to top
View user's profile Send private message
stahlsau
Guru
Guru


Joined: 09 Jan 2004
Posts: 565
Location: WildWestwoods

PostPosted: Tue Jul 25, 2006 1:20 pm    Post subject: Reply with quote

Quote:
You can still play in fullscreen mode, I proposed window mode to make multimedia keys working, if you don't use them, (or prefer not using them and have your gamma working back) then you can play in fullscreen(and use the xlaunch :) )


hehe..sure i can use it in fullscreen mode, but then i can't minimize it...so, where's the advantage in using your scripts ;)


Quote:
you can play tremulous in "1368x1026" ! :?: wierd! and does it work when you don't use the script? Your xorg.conf is also "1368x1026" ? didn't know such a resolution was possible!


yep, i got my native resolution as 1368x1024. It's from the time when i was active in the movie- and ripping-scene. 800x600 or 756x1024 are 1.3333, which is 4:3, and that is the native tv-resolution. But 1280x1024 is 1.25, so it doens't fit. As a real cineast that i was at that time, it wasn't bearable to watch my movies with a such skewed screen, so i had to go 1368x1024, whih is about 1.336, which is bearable ;)
I think every resolution is possible with the correct modeline in your xorg.conf. For modelines, check here for example.


Quote:
And you're not using XPLAYER, arent' you?


No. I don't see the need for that atm.
_________________
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Tue Jul 25, 2006 2:09 pm    Post subject: Reply with quote

stahlsau wrote:
Quote:
You can still play in fullscreen mode, I proposed window mode to make multimedia keys working, if you don't use them, (or prefer not using them and have your gamma working back) then you can play in fullscreen(and use the xlaunch :) )


hehe..sure i can use it in fullscreen mode, but then i can't minimize it...so, where's the advantage in using your scripts ;)



What do you mean with "can't minimise"? if you're running the game with my script, even in fullscreen, you'll still have the CTRL-ALT-F$ thing working (to switch from the game to your desktop.. ) The only thing you loose is the ability to use your multimedia keys. (the only reason why I propose to run the game in window mode was to make multimedia keys wroking.)
Back to top
View user's profile Send private message
CoffeeBuzz
Apprentice
Apprentice


Joined: 15 Jun 2005
Posts: 269
Location: Canada Eh.

PostPosted: Tue Jul 25, 2006 2:17 pm    Post subject: Reply with quote

Can I get some confirmation that this works for Xgl users? If so, I might consider adding it to the overlay.
_________________
HP Pavilion zd7260us
Xgl Overlay: http://svn.xgl-coffee.org/xgl-coffee/trunk
Xgl Forums: http://forums.xgl-coffee.org
Back to top
View user's profile Send private message
stahlsau
Guru
Guru


Joined: 09 Jan 2004
Posts: 565
Location: WildWestwoods

PostPosted: Tue Jul 25, 2006 3:02 pm    Post subject: Reply with quote

Quote:
What do you mean with "can't minimise"? if you're running the game with my script, even in fullscreen, you'll still have the CTRL-ALT-F$ thing working (to switch from the game to your desktop.. ) The only thing you loose is the ability to use your multimedia keys. (the only reason why I propose to run the game in window mode was to make multimedia keys wroking.)


Oh, cool...then it's of some use ofcourse. Ty for input ;)
_________________
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
roderick
l33t
l33t


Joined: 11 Jul 2005
Posts: 908
Location: St. John's, NL CANADA

PostPosted: Wed Jul 26, 2006 7:40 pm    Post subject: Reply with quote

CoffeeBuzz wrote:
Can I get some confirmation that this works for Xgl users? If so, I might consider adding it to the overlay.


That sounds like a great Idea.

I think this is useful, even outside Xgl.
_________________
If God were a pickle, I'd still say "no pickle on my burger".
http://roderick-greening.blogspot.com/
Back to top
View user's profile Send private message
AllenJB
Veteran
Veteran


Joined: 02 Sep 2005
Posts: 1283
Location: Ashford, Kent

PostPosted: Thu Jul 27, 2006 5:17 pm    Post subject: Reply with quote

xgame can pass parameters to the program it's launching using the -c parameter, so it'll work fine with xqf. It's also a hell of a lot easier (in my opinion) to set up. Item setup is menu based and there's also a gui for it, xgame-gtk.
_________________
http://gentoo-wiki.com :: http://lug.org.uk :: http://www.linux.org/groups/ :: User Blogs
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Thu Jul 27, 2006 6:06 pm    Post subject: Reply with quote

A 'user-friendlier' vesrsion is coming tonight:) It will be a lot easier to use, and to set up. really.


I'm not fighting against xgame or whatever, but, so xgame can pass parameters to the program? good, that's a a good point cause it's the very least we can expect from a tool like this. The new version of xlaunch, I'm gonna put here, will be able to run some program without any configuration.

If you read carefully part I, you'll see that my point with xlaunch, was to launch something on an other display. but it was also to set mouse sensitivity, to have my keybindings and so on..


Last edited by truc on Fri Jul 28, 2006 11:04 am; edited 1 time in total
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Thu Jul 27, 2006 11:41 pm    Post subject: Reply with quote

CoffeeBuzz wrote:
Can I get some confirmation that this works for Xgl users? If so, I might consider adding it to the overlay.


Since nobody has answered, I did try on my own and I can say it works :)(I did a fresh install of xgl just this afternoon, launch XGL, and terminal inside, then I issue xwarcraft3, and it worked, same with everything(that uses this xlaunch script) I tried :)


Last edited by truc on Fri Jul 28, 2006 9:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Thu Jul 27, 2006 11:51 pm    Post subject: Reply with quote

Ok, new version 20060727is out ;)

    *You no longer have to create symliink to use it. xlaunch your_app will do it:) (launch your_app on an other display)

    *Fortunately you can still use the link trick, and you can even use xlaunch to create the link(s)

    *Possibility to launch application that are not in your PATH, (specifying the full path then)

    *added some conditionnal tests, to avoid doing several times the same thing

    *XPLAYER part has also been a bit modified, be sure to have to right line in the sudoers file (read III - d) if necessary)

    *added: help message (check xlaunch --help !!)


**no more configuration needed to use/test xlaunch.**

Don't forget, if you use it, to set your xset options, in the XSET_ARGS variable at the beginning of the script.


Last edited by truc on Fri Jul 28, 2006 11:05 am; edited 1 time in total
Back to top
View user's profile Send private message
stahlsau
Guru
Guru


Joined: 09 Jan 2004
Posts: 565
Location: WildWestwoods

PostPosted: Fri Jul 28, 2006 6:30 am    Post subject: Reply with quote

great job, thanks for that. It works flawlessly for now, besides the non-fullscreen-gamma-bug, which is quake3's fault. Especially those xset stuff is useful - if you don't set
Code:
xset m 0 0
X will enable mouse acceleration for the game, which in my eyes sucks really bad ;)
_________________
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Fri Jul 28, 2006 7:49 am    Post subject: Reply with quote

stahlsau wrote:
great job, thanks for that. It works flawlessly for now, besides the non-fullscreen-gamma-bug, which is quake3's fault. Especially those xset stuff is useful - if you don't set
Code:
xset m 0 0
X will enable mouse acceleration for the game, which in my eyes sucks really bad ;)


If all you want to do is to disable mouse acceleration(you don't want to set sensitivity or something like that), then I think you don't even need to instal x11-apps/xset, since :
man Xserver wrote:
-a number
sets pointer acceleration (i.e. the ratio of how much is reported to how much the user actually moved the pointer).


So if I understand correctly, adding -a 0 to the serverargs variable should disable mouse acceleration too.
:)
Back to top
View user's profile Send private message
stahlsau
Guru
Guru


Joined: 09 Jan 2004
Posts: 565
Location: WildWestwoods

PostPosted: Fri Jul 28, 2006 12:36 pm    Post subject: Reply with quote

mmh well, i had installed this anyways...for disabling beep for example.
You know quite some stuff about Xserver...don't tell me you've read the whole Xorg manpages? 8O
_________________
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Fri Jul 28, 2006 2:42 pm    Post subject: Reply with quote

stahlsau wrote:
You know quite some stuff about Xserver...don't tell me you've read the whole Xorg manpages? 8O


Actually I read man Xserver, because I needed to :) but I didn't read the whole xset man page, and I didn't even know about beep and xset :)
Back to top
View user's profile Send private message
SiTH-
n00b
n00b


Joined: 28 Apr 2004
Posts: 10
Location: cz

PostPosted: Sat Jul 29, 2006 9:07 am    Post subject: Reply with quote

./xlaunch: line 286: syntax error: unexpected end of file

Any suggestions? All I did was cut&paste.
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Sat Jul 29, 2006 9:50 am    Post subject: Reply with quote

Code:
$ cat scripts/xlaunch | wc -l
285
$ grep -v '^ *#' scripts/xlaunch | wc -l
236


This means there are 285 lines in the scripts, 236 lines without comments. Can you check, that you don't have something like this in xlaunch:

Code:
# The aim of this script is to launch program(s) on
other DISPLAY(S), it is IMO well-
# commented so you should be able to easily use it.


I'd like to store the script somewhere, so you can easily download it, but I don't know where/how :/, if you're fast enough you can try here before I go to work.

Thanks for trying it.
Back to top
View user's profile Send private message
SiTH-
n00b
n00b


Joined: 28 Apr 2004
Posts: 10
Location: cz

PostPosted: Sat Jul 29, 2006 10:03 am    Post subject: Reply with quote

Yeah, it's working now. I didn't have much time before so I don't check script for bugs..
Anyway, thank you for help. :)

Btw: lines you mentioned are in script
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2, 3, 4, 5, 6, 7  Next
Page 1 of 7

 
Jump to:  
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