landscape client not updating tags on landscape interface - ubuntu-16.04

I need to modify tags for computers (ubuntu 16.04) already registered on landscape. When i change the tag in /etc/landscape/client.conf and restart the service , i cannot see the updated new tag on landscape.
systemctl restart landscape-client
When i try to run landscape-config on the client, i get a duplicate on landscape.
landscape-config --silent
I want to update the tags on command line from clients side so i can automate it , not thrrought the landscape interface.

I got the answer, and its not possible to do that on command line but we can do it on the landscape interface or using api
https://landscape.canonical.com/static/doc/api/computers.html#addtagstocomputers

Related

Back button not working on android emulator

I try to start an android sdk emulator, but when I press the back button this error appears:
INFO | Critical: Failed to load https://maps.googleapis.com/maps/api/mapsjs/gen_204?csp_test=true: The 'Access-Control-Allow-Origin' header has a value 'qrc://' that is not equal to the supplied origin. Origin 'qrc://' is therefore not allowed access. (qrc:/html/js/common.js:0, (null))
INFO | Critical: Failed to load https://maps.googleapis.com/maps/api/mapsjs/gen_204?csp_test=true: The 'Access-Control-Allow-Origin' header has a value 'qrc://' that is not equal to the supplied origin. Origin 'qrc://' is therefore not allowed access. (qrc:/html/js/common.js:0, (null))
I use Ubuntu and try to start the emulator through terminal, I use the avdmanager of the google cmdline-tools (latest version) and this is the AVD that I try to use:
Name: my_avd_29ii
Path: /home/user/.android/avd/my_avd_29ii.avd
Target: Google APIs (Google Inc.)
Based on: Android 10.0 (Q) Tag/ABI: google_apis/x86
Sdcard: 512 MB
The best option would (Needs to be done for every emulator you install)
Windows
%USERPROFILE%\.adnroid\avd\<Emulator Name>.avd
Edit config.ini
Change hw.keyboard=no to hw.keyboard=yes
Mac
~/.adnroid/avd/<Emulator Name>.avd
Edit config.ini
Change hw.keyboard=no to hw.keyboard=yes
The answer is based on this article
After looking around I found that there were two ways to push hardware events to the emulator:
First method
This method uses telnet, like so:
telnet 127.0.0.1 5554
auth <auth-key>
event send EV_KEY:KEY_BACK:0
event send EV_KEY:KEY_BACK:1
This is going to simulate the pressing down (0) the releasing (1) of a button.
Second method
This method uses adb, like so:
adb shell input keyevent KEYCODE_BACK
Ok so what?
After trying both, I realized that telnet didn't work but adb did work. I also checked the source code of emulator and saw that telnet relies on the same set of functions that are used by the tool-window. So it's probably a bug, and we can wait for the update to fix it, or...
In the meantime
I downloaded the source code, wrote a janky workaround, and built it. Basically instead of using the keypress method, I use the adb method. If you want here it is. It's quite voluminous so be patient. I included a small script to automatically replace the emulator, just run:
$ chmod +x replace
# ./reaplace path-to-android-sdk
This adds a new flag -use-adb-toolwindow to emulator. When you activate it it will use adb (successfully) for most of keyboard inputs, and home, back, apps and power buttons. Like I said it's a quick fix, but for me it works fine.
Note:
I have no clue where the bug is, so I didn't do any report, hopefuly as more people get this issue it will become clearer.

How to change the orientation (rotate) of an HDMI output in WAYLAND on a raspberrypi

I am building a kiosk application that is to run on a raspberry pi 4.
The linux system was built using buildroot.
The display server is WESTON, which is an implementation of Wayland.
My application needs the output to be displayed on tv screen in the potrait position.
Reading the docs for WAYLAND, i have included the followin snippet in my "weston.ini" configuration file
[output]
name=HDMI-A-1
transform=90
However, WESTON fails to launch with the error message in the log file saying:
Invalid transform "90" for output HDMI-A-1
Setting "transform=normal", WESTON launches successfully and displays in landscape form.
I'm i missing an extra step in building weston?
Any hints and suggestions are highly welcome
Regards
try
[output]
name=HDMI-A-1
transform=rotate-90
This is what I use in my pinball project
BTW, is there way to enumerate outputs names before starting weston ?

Enable VncServer 6.2.1 ARMv6 experimental capture mode by command line

I'm not able to enable the Raspberry Pi's VNC capture mode from the command line.
ExperimentalRaspiCapture mode allows you to remotely view videos running.
If not enabled, you cannot watch videos. As my application has disabled the raspbian graphical mode, I only have operations from the command line and I do not have access to the internet on them, only local network.
I did tests on an alternative raspberry and in graphical mode I enabled this option according to the tutorial on page vncserver experimental direct capture mode missing and it worked for me, but I have several raspberries and enabling it by command line is my best option at the moment, but I can't enable it.
I already tried the tutorial on the page:
How do I get VNC access to Kano OS working correctly?
But it did not work.
Any idea? Has anyone managed to do this?
Thanks.
Use vnc version: VNC (R) Server 6.2.1 (r32538) ARMv6
I use the raspberry:
*Linux raspberrypi 4.14.34-v7 *
I found the problem. I wasn't doing it right. I have to change the file in the root user and then restart the serviced. ;)
Edit the config file '/root/.vnc/config.d/vncserver-x11'
adding the following:
CaptureTech=raspi
ExperimentalRaspiCapture=1
ServerPreferredEncoding=JPEG
and then restarted:
sudo systemctl restart vncserver-x11-serviced

Raspberry webserver change website name

In my browser i can type 192.168.178.33:8000 to access the webpages on my raspberry or
http://raspberrypi:8000/
Somewhere must be set that the web browser translate http://raspberrypi:8000/ into 192.168.178.33:8000 I tried to find a nameserver but I've no idea what or where I can change this
Is there a simple way to change
http://raspberrypi:8000/ into http://whateverIWantHere:8000/
You can edit your hosts file. The location is different for each OS and may also be different for different versions of the OS. Note that you only need to do the changes on the computer where you want to translate it.
Windows 10:
C:\Windows\System32\Drivers\etc\hosts
Linux/Raspbian:
/etc/hosts
Add the following line to the end of the file:
192.168.178.33 raspberrypi
You may have to restart, I'm not sure if the changes will apply immediately. And you can now type 192.168.178.33:8080 in your browser.

Is there any example for ejabberd mod_carboncopy?

I am trying to add in Mod_carboncopy for Ejabberd, but not sure how to configure it in the web admin panel. Or would i have to config it in the config.yml instead??
I am not sure what is the expected behavior or how to config it, so i need some point to see where to start from.
1.) If i can config it in the web admin panel in the options for mod_carboncopy?
2.) Do i have to config it in config.yml
3.) After i config it do i have to reboot the server??
4.) After that is set up. Would i see the copy straight away in a RAW input for device 2, if device 1 sends out a message??
Thanks for your time!
I have just finished it. It is actually quite simple.
All you have to do is make sure your ejabberd is 15.03 or later, which has the carboncopy on by default. Then if you are using strophe, it is very simple to write the plugin. All you have to do is to enable it through IQ. Then everythings good to go!!