Android Open Source - TuxRemote Command

From Project

Back to project page TuxRemote.


The source code is released under:

GNU General Public License

If you think the Android project TuxRemote listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

//from www .  j  a v a2s.  co  m
import android.content.Context;
import android.util.Log;
import android.widget.ImageView;

import com.squareup.picasso.Picasso;


public class Command {
    public String name = null;
    public String cmd = null;
    public String icon = null;

     * Constructor
     * @param name : String, command name.
     * @param cmd  : String, command shell.
     * @param icon : int, drawable ressource like "R.drawable.ressource", default close icon for icon = 0.
    public Command(String name, String cmd, String icon){ = name;
        this.cmd = cmd;
        this.icon = icon;

    public Command copy(){
        return new Command(
                "", ""+this.cmd, ""+this.icon

    public void setIconToView(Context context, ImageView view){
        if(this.icon != null) {
            if (this.icon.equals("close")) {
            } else{
                File filePath = context.getFileStreamPath(this.icon);

    public String getName(){

    public static Command cmdClose(String hexaId){
        return new Command("close", "DISPLAY=:0 wmctrl -i -c "+hexaId, "close");

    public String getCmd() {
        return cmd;

    public void setCmd(String cmd) {
        this.cmd = cmd;

Java Source Code List