vnc using lightdm and x11vnc disconnects immediately after valid login
Solution 1
The issue turns out to be relatively simple, I hadn't installed an underlying desktop provider. Also, my appliance has no video card and no video driver, so, no frame buffer in which to render.
The solution that worked for me was found in this post.
Solution 2
I finally solved this problem by switching desktop manager from lightdm
to gdm
.
here is a detailed instruction: How do I switch from LightDM to GDM?
Related videos on Youtube
user332153
Updated on September 18, 2022Comments
-
user332153 over 1 year
I create a column in mysql and I set default values like here http://i.imgur.com/HaKLIHy.png
But when I try to display data on Extra column I have a undefined values inside my jquery-flexigrid table:I suppose that is an error from my code of
index.php http://pastebin.com/TgAZEZbF
post2.php http://pastebin.com/08YHgHri
-----------------------------------
index.php<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <title>Flexigrid</title> <link rel="stylesheet" type="text/css" href="css/flexigrid.css" /> <script src="dist/Autolinker.min.js"></script> <script type="text/javascript" src="jquery-1.2.3.pack.js"></script> <script type="text/javascript" src="flexigrid.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#flex1").flexigrid ( { url: 'post2.php', dataType: 'json', colModel : [ {display: 'ID', name : 'id', width : 40, sortable : true, align: 'center'}, {display: 'ISO', name : 'iso', width : 80, sortable : true, align: 'left'}, {display: 'Name', name : 'name', width : 300, sortable : true, align: 'left'}, {display: 'Printable Name', name : 'printable_name', width : 90, sortable : true, align: 'center'}, {display: 'ISO3', name : 'iso3', width : 130, sortable : true, align: 'center', hide: false}, {display: 'Number Code', name : 'numcode', width : 80, sortable : true, align: 'center'}, {display: 'Extra', name : 'extra', width : 80, sortable : true, align: 'center', hide: true} ], buttons : [ {name: 'Add', bclass: 'add', onpress : test}, {name: 'Delete', bclass: 'delete', onpress : test}, {separator: true}, {name: 'Anime', onpress: sortAlpha}, {name: 'Ebook', onpress: sortAlpha}, {name: 'Film', onpress: sortAlpha}, {name: 'Giochi PC', onpress: sortAlpha}, {name: 'Xbox360', onpress: sortAlpha}, {name: 'PS3', onpress: sortAlpha}, {name: 'Software', onpress: sortAlpha}, {name: 'Musica', onpress: sortAlpha}, {name: 'Teatro', onpress: sortAlpha}, {name: '5', onpress: sortAlpha}, {name: 'A', onpress: sortAlpha}, {name: 'B', onpress: sortAlpha}, {name: 'C', onpress: sortAlpha}, {name: 'D', onpress: sortAlpha}, {name: 'E', onpress: sortAlpha}, {name: 'F', onpress: sortAlpha}, {name: 'G', onpress: sortAlpha}, {name: 'H', onpress: sortAlpha}, {name: 'I', onpress: sortAlpha}, {name: 'J', onpress: sortAlpha}, {name: 'K', onpress: sortAlpha}, {name: 'L', onpress: sortAlpha}, {name: 'M', onpress: sortAlpha}, {name: 'N', onpress: sortAlpha}, {name: 'O', onpress: sortAlpha}, {name: 'P', onpress: sortAlpha}, {name: 'Q', onpress: sortAlpha}, {name: 'R', onpress: sortAlpha}, {name: 'S', onpress: sortAlpha}, {name: 'T', onpress: sortAlpha}, {name: 'U', onpress: sortAlpha}, {name: 'V', onpress: sortAlpha}, {name: 'W', onpress: sortAlpha}, {name: 'X', onpress: sortAlpha}, {name: 'Y', onpress: sortAlpha}, {name: 'Z', onpress: sortAlpha}, {name: '#', onpress: sortAlpha}, {name: 'あ', onpress: sortAlpha} ], searchitems : [ {display: 'ISO', name : 'iso'}, {display: 'ISO3', name : 'iso3'}, {display: 'Printable Name', name : 'printable_name'}, {display: 'Number Code', name : 'numcode'}, {display: 'Name', name : 'name', isdefault: true} ], sortname: "id", sortorder: "asc", usepager: true, title: 'Motore di Ricerca', useRp: true, rp: 15, showTableToggleBtn: true, width: 900, height: 355 } ); }); function sortAlpha(com) { jQuery('#flex1').flexOptions({newp:1, params:[{name:'letter_pressed', value: com},{name:'qtype',value:$('select[name=qtype]').val()}]}); jQuery("#flex1").flexReload(); } function test(com,grid) { if (com=='Delete') { if($('.trSelected',grid).length>0){ if(confirm('Delete ' + $('.trSelected',grid).length + ' items?')){ var items = $('.trSelected',grid); var itemlist =''; for(i=0;i<items.length;i++){ itemlist+= items[i].id.substr(3)+","; } $.ajax({ type: "POST", dataType: "json", url: "delete.php", data: "items="+itemlist, success: function(data){ alert("Query: "+data.query+" - Total affected rows: "+data.total); $("#flex1").flexReload(); } }); } } else { return false; } } else if (com=='Add') { alert('Add New Item Action'); } } </script> </head> <body> <table id="flex1" style="display:none"></table> <br /><br /> </body> </html>
post2.php
<? error_reporting(0); function runSQL($rsql) { $hostname = "localhost"; $username = "root"; $password = ""; $dbname = "country"; $connect = mysql_connect($hostname,$username,$password) or die ("Error: could not connect to database"); mysql_set_charset('utf8',$connect); $db = mysql_select_db($dbname); $result = mysql_query($rsql) or die ('test'); return $result; mysql_close($connect); } function countRec($fname,$tname,$where) { $sql = "SELECT count($fname) FROM $tname $where"; $result = runSQL($sql); while ($row = mysql_fetch_array($result)) { return $row[0]; } } $page = $_POST['page']; $rp = $_POST['rp']; $sortname = $_POST['sortname']; $sortorder = $_POST['sortorder']; if (!$sortname) $sortname = 'name'; if (!$sortorder) $sortorder = 'desc'; if($_POST['query']!=''){ $where = "WHERE `".$_POST['qtype']."` LIKE '%".$_POST['query']."%' "; } else { $where =''; } if($_POST['letter_pressed']!=''){ $where = "WHERE `".$_POST['qtype']."` LIKE '".$_POST['letter_pressed']."%' "; } if($_POST['letter_pressed']=='#'){ $where = "WHERE `".$_POST['qtype']."` REGEXP '[[:digit:]]' "; } $sort = "ORDER BY $sortname $sortorder"; if (!$page) $page = 1; if (!$rp) $rp = 10; $start = (($page-1) * $rp); $limit = "LIMIT $start, $rp"; $sql = "SELECT id,iso,name,printable_name,iso3,numcode,extra FROM country $where $sort $limit"; $result = runSQL($sql); $total = countRec('iso','country',$where); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); header("Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" ); header("Cache-Control: no-cache, must-revalidate" ); header("Pragma: no-cache" ); header("Content-type: text/x-json"); $json = ""; $json .= "{\n"; $json .= "page: $page,\n"; $json .= "total: $total,\n"; $json .= "rows: ["; $rc = false; while ($row = mysql_fetch_array($result)) { if ($rc) $json .= ","; $json .= "\n{"; $json .= "id:'".$row['id']."',"; $json .= "cell:['".$row['id']."','".$row['iso']."'"; $json .= ",'".addslashes($row['name'])."'"; $json .= ",'".addslashes($row['printable_name'])."'"; $json .= ",'".addslashes($row['iso3'])."'"; $json .= ",'".addslashes($row['numcode'])."']"; $json .= "}"; $rc = true; } $json .= "]\n"; $json .= "}"; echo $json; ?>
I don t understand which error is it and I do not know on that line is the error code.-
Alex about 9 yearspaste your code into your post
-
charlietfl about 9 yearsseems like data property
extra
is undefined. What does data look like? -
user332153 about 9 yearscode pasted now, problem is this: if I insert
charlietfl
in mysql valuecharlietfl
appears inside mysql table but on jquery table I displayundefined
and I don't undertand why -
fx-kirin over 5 yearsFor people that come here for fix this, currently Remmina has a bug to cause this. gitlab.com/Remmina/Remmina/issues/1786
-
-
user332153 about 9 yearscan you repaste my code correctly, please? I am newbie on code and I don't undertand well json-php-mysql mechanism.
-
charlietfl about 9 yearstry adding
$json .= ",'".addslashes($row['extra'])."'";
-
user332153 about 9 yearsAfter add this piece of code my jquery table says "Processing, please wait" and all values disappears from table. Look: i.imgur.com/OMr1eG8.png. I insert this piece of code after
$json .= ",'".addslashes($row['numcode'])."']";
if I insert before change position of data in my column table i.imgur.com/F23LUdz.png For example I add giga for extra column inside mysql. while View values is set for Number Code. But adding this code I move data position in wrong columns -
user332153 about 9 yearsany idea, charlietfl?