Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[script] Right click open demo in Nexuiz with Gnome (Ubuntu)
04-14-2009, 01:50 PM (This post was last modified: 04-14-2009 05:43 PM by -z-.)
Post: #1
[script] Right click open demo in Nexuiz with Gnome (Ubuntu)
In the same breath as the [url=http://nexuizninjaz.com/forum/showthread.php?tid=771]Right click open a Nexuiz Map[/url] thread, I wanted to show you how to do the same with a Demo.

Open up the terminal and type the following to create the script that's going to run off the right click, and give it executable permissions.

Code:
cd "$HOME/.gnome2/nautilus-scripts" && touch "Open Nexuiz Demo" && chmod +x "Open Nexuiz Demo" && gedit "Open Nexuiz Demo" &

Your text editor will pop up. Paste the following code and set the variables to match your settings.

Code:
#!/bin/bash
# Set variables
nexuizdir="/home/tyler/svn_software/nexuiz/nexuiz_25"
nexuizbin="nexuiz-linux-x86_64-glx"

# Run it
$nexuizdir/$nexuizbin -basedir $nexuizdir +playdemo demos/$1

In your terminal again, open your Nexuiz data directory:
Code:
nautilus ~/.nexuiz/data/demos

Now right click a map >> scripts >> Open Nexuiz Demo


For your commandline junkies, you can add a little alias as a convenience:
Code:
gedit $HOME/.bashrc

Add the following (with your path) to the bottom your your bashrc):
Code:
alias nexdemo='"/home/tyler/.gnome2/nautilus-scripts/Open Nexuiz Demo"'

Save and close, type:
Code:
bash
to enter a new bash session.

Code:
cd ~/.nexuiz/data/demos
nexdemo <demoname.dem>
to open it from the command line
Inspire your neighbor, they'll inspire you back.

[url=http://maps.nexuizninjaz.com]maps.nn[/url] | [url=http://pics.nexuizninjaz.com]pics.nn[/url] | [url=http://chat.nexuizninjaz.com]chat.nn[/url] | [url=http://toolz.nexuizninjaz.com/cvar]2.5 cvar browser[/url]
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


Contact Us | Nexuiz Ninjaz Home | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication