The Treehouse Blog

Fedora 27, Nvidia, Gnome, and Wayland

on Mar.26, 2018, under Linux

I’ve been having trouble recently with my home desktop having gnome-shell chew through 100% CPU and leave the system unresponsive.  Ordinarily, it seemed that updating the binary Nvidia drivers shortly thereafter would fix it, but not most recently.  I followed someone’s suggestion to switch to lightdm instead of GDM, and while that worked, lightdm does not play nicely with Gnome in some ways – specifically screen locking does not integrate, which is quite annoying.  Ultimately, I think the problem is the switch from Xorg to Wayland, and the Nvidia drivers not playing nicely with that.  I just now switched WaylandEnable=false in /etc/gdm/custom.conf.  So far that seems to be working.

Comments Off on Fedora 27, Nvidia, Gnome, and Wayland more...

Trekonomics

on Mar.25, 2018, under Philosophy

I just finished reading Trekonomics, a book on the economics in Star Trek, by Manu Saadia.  The book is interesting for trying to accumulate a lot of the economic references in Star Trek and make sense of them.  In the end, I think it falls short – while the 24th century Trek tries to represent a post-scarcity near-utopia where physical needs are met at no real cost, where automation has displaced the need for all labor, this is clearly a contradiction.  Particularly with Deep Space Nine, the Federation has finite limits on resources such as ships and non-replicable materials.  Throughout Star Trek there are people that perform repairs and maintenance – despite ubiquitous automation.  I’m not convinced we’re on the verge of becoming post-scarcity or post-labor.  While our economic progress has meant the improvement in the quality of life of essentially everyone, we are still facing challenges with automation displacing labor, not unlike what we have encountered since the industrial revolution.  Whether we reach a point where automation permanently prevents a large segment of the population from gainful employment, and how we handle it, remains to be seen.  Star Trek, understandably, does not dwell on what place the inept have in its society, instead focusing on the top of the class.  Still, an interesting read.

Comments Off on Trekonomics :, more...

Android File Manager

on Feb.25, 2018, under Android

It annoys me that Android has no native file management application. I know, I know, “it’s a phone, not a computer and phones don’t have files”, or some such nonsense. I’ve mostly used OI File Manager, since it is used as the file choose for some (old?) apps, and it’s been around a long time. Any more though, I tend to get lost in the navigation, having to close the app for it to see files again. This morning I went through a lot of the file management apps on F-Droid, and concluded that Amaze is the best for my needs currently. It seems to be actively maintained (latest release less than 6 months ago). It supports root access. The navigation seems smooth and intuitive. Have you found a better free or open source file manager? I’d be curious to know.

Comments Off on Android File Manager more...

Fedora 27 Nautilus does not open files on double-click

on Jan.15, 2018, under Linux

Recently, I’ve been encountering an annoyance on my Fedora 27 desktop machine. When I would try to open a file by double-clicking it in Nautilius, it would refresh the display, show the “wait” cursor, and then do nothing. Today I finally spent some time to trace it down. A strace of nautilus showed:

[pid 32262] execve("/usr/bin/exo-open", ["exo-open", "--launch", "FileManager", "/home/balleman/Documents/...

Manually running this exo-open command gives the results I was experiencing – it reloads Nautilus but does not open the file. exo-open is part of the Xfce desktop environment, which I’m not actively using. Removing the exo packages and dependencies on it appears to have fixed the problem. Not a perfect solution, but I will gladly take it over spending more time on this.

One reference I found to this possibly being a bug is here:
https://bugs.launchpad.net/ubuntu/+source/exo/+bug/956255

Comments Off on Fedora 27 Nautilus does not open files on double-click more...

Automated hotspot control on the Nexus 5x, continued: Android 8

on Sep.14, 2017, under Android, Happenings

I like Oreos, but every time Google hijacks a new dessert, I need to revist the HSC app to accommodate its new flavor. Sigh.

Firstly, startTethering() now checks for and fails if it is passed a null callback (see here), which I had been doing. You wouldn’t think this would be a big thing to handle. The callback class is ConnectivityManager.OnStartTetheringCallback, an abstract class that is not present in the Android SDK. I’ve still been using reflection to access parts of the System API, as it has seemed to be the easiest approach for this type of thing. However, you can’t create a subclass using reflection. With Dynamic Proxy you could do this if it were an interface, but it’s not.

So I needed to find a better way of compiling against the non-public pieces of the Android API. The way that ended up working for me was to build the SDK from the AOSP sources. Following the documentation, I had a number of build errors having to do with things being defined in multiple places, which I would comment out as I encountered them. Eventually the build was almost successful (seemed to fail on the last step or so), but it got far enough to produce the .../framework_intermediates/classes.jar, which is to have what is needed. After stumbling through various things (I’ve found no great documentation for this), I ended up going with these gradle modifications to let me get at the class in question. I copied the above classes.jar as system_libraries/framework_all-26.jar.

top-level build.gradle, added to “allprojects” block:
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs.add('-Xbootclasspath/p:hsc/system_libraries/framework_all-26.jar:android/net/ConnectivityManager.class')
}
}

app-level build.gradle, added to the “dependencies” block:
provided files('system_libraries/framework_all-26.jar')

With these changes, AndroidStudio still can’t see changes (the IDE is unable to resolve the symbols), but the build process is nevertheless successful. There’s probably a better way, maybe even something trivial, or perhaps using a different IDE that is more flexible, for one.

Secondly, this: Privileged Permission Whitelist Requirement. Enforcement of this started in Android 8.0, and it means that even putting HSC into the /system/priv-app directory is not enough to give it the necessary privileges. Fortunately, adding the necessary permissions to /system/etc/permissions/privapp-permissions-platform.xml is apparently sufficient:

<privapp-permissions package="me.alleman.brady.hsc">
<permission name="android.permission.CHANGE_NETWORK_STATE" />
<permission name="android.permission.CHANGE_WIFI_STATE" />
<permission name="android.permission.ACCESS_WIFI_STATE" />
<permission name="android.permission.CONNECTIVITY_INTERNAL" />
<permission name="android.permission.TETHER_PRIVILEGED" />
<permission name="android.permission.ACCESS_NETWORK_STATE" />
<permission name="android.permission.MANAGE_USERS" />
<permission name="android.permission.WRITE_SETTINGS" />
</privapp-permissions>

The updated package, in case you find it useful: hsc8.apk

Comments Off on Automated hotspot control on the Nexus 5x, continued: Android 8 more...

December 2018
S M T W T F S
« Mar    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Archives



Content Copyright © 2004 - 2018 Brady Alleman.
All Rights Reserved.