Board index mDd Board The q3df.org website

Launching serverlist links from chrome in linux with xdg

Everything related to the mDd website goes here.

Launching serverlist links from chrome in linux with xdg

Postby Newbrict » Oct 8th, '13, 9:40 pm

this is pretty specific, but if you use chrome and linux ( using xdg-open as the default protocol handler for defrag:// ) I've figured out how to launch defrag and connect to the server you click on from the serverlist on mdd

1.navigate to where your desktop entries are (usually ~/.local/share/applications)
2.add the following line to your mimeapps.list
Code: Select all
x-scheme-handler/defrag=defrag.desktop


3.create defrag.desktop in that same directory and add this to it: (modify accordingly)
Code: Select all
[Desktop Entry]
Encoding=UTF-8
Type=Application
Exec=YOUR-FULL-PATH-TO/ioquake3/iodfengine.x86_64 +connect $(echo '%u' | perl -pe "s/defrag:..//")
Name=defrag
Comment=ohboyilovedefrag


and after that you can click the links and they will work as expected
User avatar
Newbrict
 
Posts: 81
Joined: Sep 21st, '11, 12:12 am

Re: Launching serverlist links from chrome in linux with xdg

Postby <hk> » Oct 9th, '13, 1:02 pm

I'll turn that into a wiki entry.
If you don't mind.
User avatar
<hk>
Menstruating 24/7
 
Posts: 1040
Joined: May 2nd, '09, 12:06 am
Location: Ingolstadt Germany

Re: Launching serverlist links from chrome in linux with xdg

Postby Newbrict » Oct 9th, '13, 7:58 pm

<hk> wrote:I'll turn that into a wiki entry.
If you don't mind.


That's fine, also if anyone is stuck and needs help on some other system/ setup feel free to ask me


also give us a real wiki :|
User avatar
Newbrict
 
Posts: 81
Joined: Sep 21st, '11, 12:12 am

Re: Launching serverlist links from chrome in linux with xdg

Postby BlackWolf » Mar 19th, '15, 4:26 pm

This no longer works on Arch Linux, instead of putting the url in the place of %u it no just appends it to the end of the command.
BlackWolf
 
Posts: 1
Joined: Oct 25th, '14, 9:08 pm

Re: Launching serverlist links from chrome in linux with xdg

Postby ACiDC0re » Nov 14th, '15, 5:52 pm

Hi guys,

for me, the $(echo command didn't work. So my .desktop file looks like this:

Code: Select all
[Desktop Entry]
Encoding=UTF-8
Type=Application
Exec=sh /FULL/PATH/TO/q3df.sh '%u'
Name=defrag
Comment=ohboyilovedefrag


and the q3df.sh looks like this:
Code: Select all
#!/bin/sh
server="$(echo $1 | sed -e 's/defrag...//')"
/usr/games/bin/quake3-defrag +connect -4 $server


don't forget to do:
Code: Select all
chmod +x q3df.sh


works flawlessly :D
There is only one God, and his name is Death. And there is only one thing we say to Death: "Not Today!"

- Syrio Forel - Game of Thrones
User avatar
ACiDC0re
 
Posts: 19
Joined: Jan 22nd, '10, 4:58 pm
Location: Germany

Re: Launching serverlist links from chrome in linux with xdg

Postby Pan has a lot blanks in his nickname » Jan 6th, '16, 2:45 pm

This is a bad idea how it is. There is only a windows launcher because you need to check the parameter for validation. It should only accept ip:port.
Pan has a lot blanks in his nickname
 
Posts: 29
Joined: Aug 17th, '11, 1:55 am

Re: Launching serverlist links from chrome in linux with xdg

Postby mananee » Jan 11th, '16, 8:44 am

I'll turn that into a wiki entry.
บาคาร่า gclub
mananee
 
Posts: 3
Joined: Aug 22nd, '15, 5:43 am


cron