View Single Post
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#1
My pc serves as my music player and is hooked up to a competent pair of speakers. Most of the times I want to listen to a song though I'm not near the computer, but I have my phone in my hand. I wanted to be able to take advantage of the big speakers instead of listening to the tinny sound of the phone speakers, without having to move an inch.

As I mostly use YouTube and such to listen to individual songs, I wanted to be able to redirect the current url to firefox on my desktop.

The solution I found is to install nanoweb on the desktop (apache works fine too), change it to run as my desktop user, not www-data (you have to edit /etc/nanoweb.conf for that) and have it run the following index.php

PHP Code:
<?php
$u 
$_GET['url'];
if (isset(
$u)&&trim($u!="")){
   
exec('DISPLAY=:0 firefox "'.$u.'"');

?>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<form action=index.php>
   <input name=url autofocus>
   <button>go</button>
</form>
Now when I visit http://192.168.1.XX from my phone, an input box shows up where I can paste a url which opens in a tab in firefox on the pc.

You can also enter the url directly as such

Code:
http://192.168.1.xx/?url=maemo.org
Next step is to install sharetus on my N9 and configure it to be able to share to my little service with a click.
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla –– contactlaunch –– timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob

Last edited by qwazix; 2013-05-15 at 21:00. Reason: Added double quotes around firefox parameter so that it handles url with spaces
 

The Following 3 Users Say Thank You to qwazix For This Useful Post: