XBox 360 Wireless Controller not working with Kodi / XBMC - xbox360

System:
Ubuntu 14.04.2 LTS (kernel: 3.13.0-45-generic)
Kodi (14.2-BETA1 Git:2259d0b). Platform: Linux x86 64-bit
Original XBOX 360 wireless controller with Xbox 360 USB Wireless Adapter
What I did:
Install ubuntu-xboxdrv:
sudo apt-add-repository -y ppa:rael-gc/ubuntu-xboxdrv
sudo apt-get update
sudo apt-get install ubuntu-xboxdrv
Tested if it works with:
jstest: YES
sdl-jstest: YES
retroarch and mupen64plus playing N64 Mario Kart: YES
Kodi: NOOOO ????
I enabled extensive logging for kodi and uploaded a logfile here: http://xbmclogs.com/psky8dtse (until 20. March '15)
Kodi does not detect the joystick even though it is available over SDL and /dev/input/js0
UPDATE: Running Kodi as root fixes the problem. So it seems there are permission issues. Still don't know how to fix this...
UPDATE2 / FIX: I wrote a NodeJS-bridge between Kodi and the Xbox Controller: https://github.com/cgrossde/XboxControllerKodiBridge
This way only the Bridge needs to run as root and Kodi can continue to run as an unprivileged user. It includes an upstart script that it starts/stops with Kodi.

You have to add the unprivileged user to group "input" (see /etc/group), as "/dev/input" uses this group.

Related

How to develop Flutter web app on Windows Subsystems for Linux (Debian 10)

I would like to develop Flutter web app on Windows Subsystems for Linux (Debian 10). I followed this instruction. https://flutter.dev/docs/get-started/codelab-web
flutter channel beta
flutter upgrade
flutter config --enable-web
First, I input these commands in my terminal and all of them worked fine.
Second, I tried flutter doctor command and this is the result.
Downloading android-arm-release/linux-x64 tools... 2.1s
Downloading android-arm64-profile/linux-x64 tools... 1.8s
Downloading android-arm64-release/linux-x64 tools... 1.6s
Downloading android-x64-profile/linux-x64 tools... 1.6s
Downloading android-x64-release/linux-x64 tools... 1.5s
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 1.18.0-11.1.pre, on Linux, locale en_US.UTF-8)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, set ANDROID_SDK_ROOT to that location.
You may also want to add it to your PATH environment variable.
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[!] Android Studio (not installed)
[✓] Connected device (1 available)
! Doctor found issues in 3 categories.
I develop web app, so I don't need Android toolchain and Android Studio, but I need Chrome.
I think there are two ways.
install Chrome on WSL => I searched the Internet, but I couldn't find the way to do so.
user Chrome on Windows 10(not WSL) => I searched the Internet (for example:flutter chrome "windows subsystems for linux"), but I couldn't find the way to do so.
Could you give me any advice?
Try setting the environment variable CHROME_EXECUTABLE to the path of the Chrome executable installed on Windows, so Flutter can locate it.
Turns out, you just need to tell flutter where chrome.exe is located on your host windows machine!
One way to do this is to use GUI Apps, which unfortunately requires WSL version 2 and Windows 11. Read More
Making WSL and GUI Apps ready
If you don't already have wsl, run Powershell in Admin mode and run
wsl --install -d Ubuntu
sudo apt update
change the distro as you like
If you have, run these to make sure it's ready
wsl --set-default-version 2
wsl --update
wsl --shutdown
sudo apt update
Installing Google Chrome on WSL
Change directories into the temp folder: cd /tmp
Use wget to download it: sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
Get the current stable version: sudo dpkg -i google-chrome-stable_current_amd64.deb
Fix the package: sudo apt install --fix-broken -y
Configure the package: sudo dpkg -i google-chrome-stable_current_amd64.deb
To launch, enter: google-chrome
You should be good to go
Running flutter doctor should mark web development as ready, and projects should run with this command:
flutter run -d chrome --web-renderer canvaskit
My WSL2(Windows 10 build 18363) did not recognise the environment variable CHROME_EXECUTABLE.
So, I also added the environment variable WSLENV to 'CHROME_EXECUTABLE/p'.
(https://adamtheautomator.com/windows-subsystem-for-linux/#Sharing_Environment_Variables)
Then, it works!

Fish Shell causes Login Loop when is default (Fedora 26)

I have installed a fresh Fedora 26, when I install fish (comes with 2.3.1 but I upgraded to 2.6) and I set it as default shell (chsh -s /usr/local/bin/fish) works as expected... until I restart the PC and I try to login; gdm successfully logs me in, but after a few screen flashes it returns me to login screen, leaving me unable to login to my user.
I temporary solved this by login in another tty (Ctrl+Alt+F2) with my user and changed the shell back to bash: chsh -s /bin/bash.
Have someone else had this same issue? I've installed Gnome Ubuntu 17.04 and I couldn't reproduce this. Also, this is a common symptom for buggy nvidia drivers with wayland, mutter package buggy version, and incorrect home folder permissions. It was hard for me to find that fish was the actual culprit.
Update
After installing Fedora 27 and having the same issue, I started from scratch, and basically, to reproduce this is following these steps:
Install grc
Install Fish
Install Oh-My-Fish
Install Oh-My-Fish grc plugin-in

Run Flash Webpage in Headless Chrome on Ubuntu 14.04

I am trying to run my Cucumber tests headlessly with Chrome on Ubuntu 14.04 (EC2 instance so no GUI). So far my setup allows this, as the below screenshot shows:
I have an issue when I come to a page with flash on it:
I have restarted the EC2 instance and killed all chrome processes, still no joy.
To clarify, a test will start and chrome opens the page with flash on it and I get this message. If I then end the test and start it again I get the same problem. I guess this is not actually restarting chrome as it is a new instance each time?
So to run these tests I am using the headless gem here which acts as the interface to xvfb.
I have Google Chrome 57.0.2987.133 and have added libflashplayer.so to /opt/google/chrome/pluginsusing this https://askubuntu.com/questions/14629/how-do-i-enable-the-partner-repository
A few extras things I have tried include:
sudo apt-get install pepperflashplugin-nonfree
sudo update-pepperflashplugin-nonfree --install
Is there a way to get this to work so I can render flash based sites? Do I need to enable the flash plugin each time I open chrome? I'm hoping I've missed something obvious.
Update
I have tried setting the pepperflashpluginpath when creating the Chrome profile but this is still not working:
Capybara.register_driver :chrome do |app|
chrome_binary = '/usr/bin/google-chrome'
Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" => { "binary" => chrome_binary, "args" => ["--ppapi-flash-path=/usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so"] })
Capybara::Selenium::Driver.new(app, :browser => :chrome, :desired_capabilities => capabilities)
end
Thanks
There were three key parts in getting this to work.
Install Chromium Browser
sudo apt-get install chromium-browser (at time this installed version 58)
The Chrome binary is now installed at
/usr/bin/chromium-browser
Install Flash plugin
https://askubuntu.com/questions/531672/how-to-install-flash-payer-in-ubuntu-14-04-lts
First go to /etc/apt/sources.list and uncomment the lines
deb http://archive.canonical.com/ubuntu trusty partner
deb-src http://archive.canonical.com/ubuntu trusty partner
Then run
sudo apt-get update
sudo apt-get install adobe-flashplugin
This installs the flash plugin at
/usr/lib/adobe-flashplugin/libflashplayer.so
Install Chrome Driver
Then run
sudo apt-get install chromium-chromedriver
sudo ln -s /usr/lib/chromium-browser/chromedriver /usr/bin/chromedriver
That's pretty much it, these were the steps that got me running this with Cucumber headless.

Install Flash Player on Ubuntu 14.04

I have tried to install Flash Player over the "Ubuntu Software Center", but it won't work on Firefox. I had prevously installed Pepper Flash and now I have messed up with all. When I want to watch a video on Youtube, it appears "The plugin is disabled" and after a few seconds, the HTML5 Player loads and plays the video. All plugins are activated. On Facebook it won't even appear. It shows following:
I don't know how to proceed. It won't work on Facebook neither Chromium...
From time to time it shows a yellow square with a "X" in it with following message instead of this above: "Failed to load libpepflashplayer.so".
It's very annoying. How can I wipe all this players from my machine and begin from zero?
Thanks in advance
To Remove 32bit Flash Player on Ubuntu 14.04
Step 1 » Open Ubuntu Software Center.
Step 2 » Click the Installed button next to the All Software button.
Step 3 » Find the Adobe Flash Player package.
My installation was found under the Uncategorized section and has the name
Adobe Flash Player plugin version xx.
Step 4 » Click the Remove button.
To Install 64bit Flash Player on Ubuntu 14.04
Step 1 » Open /etc/apt/sources.list with a text editor (i.e. Vim, Gedit, etc.) Find and uncomment the below lines.
deb http://archive.canonical.com/ubuntu trusty partner
deb-src http://archive.canonical.com/ubuntu trusty partner
Step 2 » Update the repository. (Note: Don't type the $)
$ sudo apt-get update
Step 3 » Install flash plugin using the below command.
$ sudo apt-get install adobe-flashplugin
Step 4 » Test your installation.
Click this link to test your installation.
Source: How to Install Adobe Flash Player on Ubuntu 14.04
I also faced the same problem on my ubuntu 12.04 LTS 64bit. Use below commands to update your adobe flash player:
sudo apt-get update
It will ask for your password.
sudo apt-get install -y flashplugin-installer
You may need flashplugin-installer and browser-plugin-freshplayer-pepperflash or adobe-flashplugin depending on the browser you use.
See https://help.ubuntu.com/stable/ubuntu-help/net-install-flash.html.en for a comprehensive answer.

CUDA "No compatible Device" error on Ubuntu 11.10/12.04

I have been trying to set up an Ubuntu environment on my laptop for some time now for CUDA programming. I am currently dual booting Windows 8 and Ubuntu 12.04 and want to install CUDA 5 on Ubuntu.
The laptop has a GeForce GT 640M graphics card (See below for full specs). It is an Optimus card.
Originally I was dual booting Ubuntu 11.10 and have tried tutorials on both 11.10 and 12.04.
I have tried many tutorials of all shapes and sizes, including this tutorial. The installation process shows the device driver installing and the Toolkit installing, and the Samples failing, but when I go to test a simple Vector Add CUDA program in NSight, "No compatible CUDA Device" error is thrown.
Ubuntu Details also still shows "Unknown" for Graphics
Suggestions?
Laptop Specs:
Acer V3-771G
Intel Core i7 2670QM
nVidia GeForce GT 640M 2GB - Optimus
16GB DDR3-1600 RAM
120GB SSD + 500GB HDD + 32GB Cache SSD
Since it is an optimus device, there are some extra steps to be able to use the nvidia GPU. While it is not necessary, I suggest that you use the bumblebee wrapper program because it is the easiest solution.
After you have installed the bumblebee wrapper you can run your programs using optirun programname or start a shell with the nvidia card activated: optirun bash --login
An added bonus is that the bumblebee daemon will disable the GPU when it is not running and will save you some battery.
If you don't care about battery life and just want CUDA to be always enabled without wrapping commands you can load the nvidia kernel module and then create the necessary device nodes manually:
mknod /dev/nvidia0 c 195 0
mknod /dev/nvidiactl c 195 255
(This advanced method lets you run cuda programs from the console without starting Xorg, for example when SSH-ing to a machine without a running X server.)
See also https://askubuntu.com/questions/131506/how-can-i-get-nvidia-cuda-or-opencl-working-on-a-laptop-with-nvidia-discrete-car for a more detailed discussion.
Try the command sudo apt-get install mesa-utils.
See if the graphics is recognized and then try to install cuda
If does not recognized with the first command try:
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current
First install the following libraries & Tools:
sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
Next we will blacklist some modules(drivers), in terminal enter:
sudo gedit /etc/modprobe.d/blacklist.conf
Add the following to the end of the file(one per line like so):
blacklist amd76x_edac
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
Save the file and close the editor.
Now we want to get rid of any nvidia risiduals, in terminal:
sudo apt-get remove --purge nvidia*
Next you need to restart your machine (sudo reboot).
0) Press Ctrl+Alt+F1 at login screen(you don't have to login, we'll have to restart later anyway), then log in.
1) sudo service lightdm stop
2) cd Downloads
3) chmod +x devdriver*.run (your driver filename)
4) sudo ./devdriver*.run
You might have to run the driver-installer once, reboot(it will remove nouveau drivers) and repeat the steps again. Follow the installer instructions and it will be fine, when it asks you;
yes, you do want the 32-bit libraries and you DO want it to change the xorg.conf file.
Once the installer completes, restart (sudo reboot). You're done :]
In Order to install SDK and Toolkit,
use the steps 3 and 4 with the downloaded files. (.run)
In theory, the drivers included with CUDA 5.5 should natively support Optimus (as well as single GPU debugging for non-Optimus laptops). I haven't tried it yet because I'm waiting for a compute 3.5 Optimus laptop so that it'll support kernel recursion and HyperQ. In theory the HP Envy 15t-j000 has the GK208 version of the GT 740m, but I'd really rather have an ultrabook form factor like the upcoming Acer S3-392 with GT 735m. The NVIDIA guys at GTC assured me that Optimus should be working with the CUDA 5.5 RC. I found this 'CUDA Getting Started Guide for Linux' released this month that provides some flags for getting Optimus drivers installed correctly:
http://www.google.com/url?q=http://developer.download.nvidia.com/compute/cuda/5_5/rc/docs/CUDA_Getting_Started_Linux.pdf
Also, more information about GK208 Chips and Compute 3.5 in laptops:
https://devtalk.nvidia.com/default/topic/546357/sounds-like-gk208-laptops-cards-will-support-most-sm_35-features/
Anyone have luck with CUDA 5.5 and Optimus laptops under linux?