8

I want to convert some bash scripts into GUI apps using the Ubuntu SDK to create an HTML5 app.

Is this possible?

Are there any tutorials besides the 'Meanings' one that demonstrate this?

7
  • @hwez Can you create PHP based apps via the Ubuntu SDK? I want it to be something I can offer to the Ubuntu Software Center once completed. – dibs Jul 6 '14 at 0:35
  • 1
    Tell me exactly what are you wanting to do – hwez Jul 6 '14 at 0:37
  • What I'm telling you is that u can do a command to the server via php it's not going to do it on the page loader – hwez Jul 6 '14 at 0:40
  • 7
    No, Ubuntu development is not off-topic @krowe. This question is just fine. – Seth Jul 6 '14 at 0:44
  • 1
    I suspect this isn't possible solely with HTML5 apps. However, you could make a thin QML wrapper that loads a WebView with your HTML app. The QML could also call (via a C++) plugin, your shell script. But this is rather involved for a simple app :). Another thing to consider is that the AppArmor permission restrictions will likely prevent you from running any useful shell scripts in an app submitted to the App Store. (Though this isn't an issue if you're just writing something for yourself.) – Robert Schroll Jul 14 '14 at 15:24
1

What is the web server serving the apps? You can always put shell scripts in the /cgi-bin/ folder and invoke the URL.

-1

sorry i'm so late but that's it
this is how to make an os command on php

<?php 
shell_exec("os command"); ?>

<?php 
// lets try to download file

shell_exec("wget filename.zip"); ?>

//Usage : let's make a youtube downloader for

name this index.htm
<html>
<head>
<title>youtube Downloader</title>
</head>
<body>
<form name="form1" action="downloader.php" method="POST">
<div align="center">
<br><br>
<input type="text" name="youtube-id" size="25" value="Enter youtube video id ">
<br><input type="submit" value="download this video as mp4"><br>
</div>
</form>
</body>
</html>

<?php
/** 'Askubuntu' 
name this downloader.php 
be sure that shell_exec is enabled & you have installed the youtube-dl
installation
$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt-get update
$ sudo apt-get install youtube-dl
youtube-dl -o $videoid $videoid = youtube-dl download -o filename , the video link or video-id*/
$videoid = $_POST['expmonth']; 
shell_exec("youtube-dl -o $videoid $videoid");
 print '<a href="' . $videoid . '">Download</a>';
 ?>

you can make it check if the file exist print with if i just wanted to make a fast answer
enter image description here

3
  • You can change the os command by bash script installation <? shell_exec("./run.sh"); ?> – hwez Jul 6 '14 at 1:26
  • 4
    PHP is not part of the Ubuntu SDK and is not installed on the default phone image. – Robert Schroll Jul 14 '14 at 15:21
  • question about ubuntu touch , not about ubuntu desktop :-) – Tachyons Jul 17 '14 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.