Tag Archives: linux

The Nexus 7 and Fedora 17

Fedora support MTP, but the Nexus 7 is not recognised.

But it is fairly straight forward to get ADB, if your using the Developer Tools, and MTP mounting working.

  1. Create the file /etc/udev/rules.d/99-android.rules

    # Google Nexus 7 16 Gb
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e41", MODE="0666", OWNER="your-login" # MTP media (multimedia device)
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0666", OWNER="your-login" # MTP media with USB debug on(multimedia device)
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e43", MODE="0666", OWNER="your-login" # PTP media (camera)
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e44", MODE="0666", OWNER="your-login" # PTP media with USB debug on (camera)
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e40", MODE="0666", OWNER="your-login" # Bootloader
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d001", MODE="0666", OWNER="your-login" # Recovery
    # MTP Support
    ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e41", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
    ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"

  2. Restart udev

    # systemctl restart udev.service

  3. Install required software

    # yum install mtpfs libmtp

Done.
You should now be able to mount your device:

$ mtpfs /home/user/some_mount_point

The existing help I have found on MTP failed to include both Product IDs. Meaning if USB debugging was enabled on the device libmtp would not recognise your device.

Offline cached ldap and krb logins with SSSD and Active Directory

SSSD from the Fedora Project provides NSS and PAM mechanisms for cached network credentials (Notebook users can still login when disconnected). SSSD is available in the main repos for both Fedora and Ubuntu.

The following sssd.conf worked for our environment. (Making it work with FreeIPA or Open LDAP and Kerberos is far less fiddly).

[sssd]
domains = MYDOMAIN
services = nss, pam
config_file_version = 2
sbus_timeout = 30
 
[pam]
offline_credentials_expiration = 0
 
[domain/MYDOMAIN]
description = MYDOMAIN AD Server
#debug_level = 9
enumerate = true
ldap_referrals = false
min_id = 1000
 
access_provider = permit
 
id_provider = ldap
chpass_provider = krb5
 
ldap_uri = ldap://my.ldap.server
ldap_search_base = dc=my,dc=ad,dc=domain
 
ldap_id_use_start_tls = False # TLS/SSL is supported

# If you do not have anonymous binds enabled 
# User that can read from AD, any normal user should work. Update as necessary
ldap_default_bind_dn = user@my.ad.domain
# Leave this as password
ldap_default_authtok_type = password
 
# The ldap users actual password, update as necessary
ldap_default_authtok = password

# This is the important stuff for making AD LDAP work 
ldap_schema = rfc2307bis
ldap_user_principal = userPrincipalName
ldap_user_fullname = displayName
ldap_user_name = sAMAccountName
ldap_user_object_class = user
ldap_user_home_directory = unixHomeDirectory
ldap_user_shell = loginShell
ldap_user_principal = userPrincipalName
ldap_group_object_class = group
ldap_force_upper_case_realm = True

# I love this setting
override_homedir = /home/%u
 
# kerberos config
auth_provider = krb5
krb5_server = dc.my.ad.domain
krb5_realm = MY.AD.DOMAIN
# This will probably not work for changing passwords
krb5_changepw_principle = kadmin/changepw
krb5_ccachedir = /tmp
krb5_ccname_template = FILE:%d/krb5cc_%U_XXXXXX
krb5_auth_timeout = 15
cache_credentials = True

Exim/Gmail/Fedora

Ever since working with Debian I have wondered why more Linux distros don’t ship with exim on as the default mail client.

“exim -bt email@address” is reason enough

It is simpler to setup and easier to administer. If you want your fedora machine to send local email via Gmail, here is a guide.

One point to add, if you want root mail delivered somewhere, edit /etc/aliases and set an alias for root. Don’t forget to run “newaliases” when your done.

Changing the default Calendar app in gnome-shell

For various reasons I use Thunderbird as my calendaring app. One of Gnome-shells most obvious features is it’s clock applet front and centre on the screen, with it’s built in calendar. It pulls this information from Evolution.

This config change will get the applet to launch Thunderbird (or any  other app), but it will still not populate the calendar with entries from Thunderbird. But this single line, will mean that Thunderbird launches when you click on the in-built calendar.

$ gsettings set org.gnome.desktop.default-applications.office.calendar 
exec 'thunderbird'

To populate the calendar widget there is an extension for Thunderbird called: Evolution Mirror which should populate the evolution db with your Thunderbird data. You will need to install a couple of additional packages to make it work, in F16:

$ sudo yum install gnome-python2-extras gnome-python2-evolution

Corrupted drive, missing superblock,

I was passed a currupt LVM volume today and asked to recover it. It was completely screwed. “dumpe2fs” could not give me a list of superblocks for me to pass to fsck.

I could probably calculate where the superblocks should be on the filesystem by hand if I needed to, but it was much simpler than that:

# mkfs.ext3 -n

The -n is a dry run. It will show me what would happen but not actually touch the drive. This will also show you where the superblocks should be. Pass one of these to you fsck command. If the previous partition had been created with a set of unique options this may not work. But your filesystem’s hosed anyway so it may be worth the punt.

If your filesystem is completely screwed though you may recover little. And what you do recover will probably be sitting in “lost+found”, fsck will recover your filesystem but it makes no guarantee about recovering files.

Fedora 15, initial impressions

I have moved back to Fedora on my primary laptop. And not the stable. I am using the Alpha of Fedora 15. I expect bugs, so I am not going to complain about stability in an Alpha release.

I decided to dump Ubuntu as my primary desktop for a couple of reasons. I think Ubuntu is a more polished desktop, and provides a better user experience over-all, especially for a regular user, and I like its Debian heritage and package system. But I do not like Unity. I am not going to debate it’s pros/cons here it has been done all over the interwebs. I simply don’t like it, and do not think it should be built the way it is. Unity should be built upstream, as an alternative shell to Gnome, not inside Ubuntu’s closed walls, and then customized for Ubuntu later on. Canonical could learn from red-hats previous mistakes and successes in this regard.

I was also very disappointed with the way Ubuntu handled the inclusion of Banshee and with the outcomes from that debacle.

I’ve always had a soft spot for Fedora and I like the community built around it, but I was also skeptical of the Fedora choice to ship Gnome-Shell. So I gave the Alpha a spin.

And I like it. It took a little getting used to, but I moved back to the old gnome-panel interface and I missed the changes now present in gnome-shell. So much that I decided months out from release to stick with Fedora 15 as my primary installation.

I am using this as a desktop, so my comments are really only relevant in that space, but a couple of thoughts.

 

SE Linux.

Technically SELinux is brilliant. But on a desktop it gets in the way, and the alerts will make no sense to a regular user. After an update I had to set my policy to permissive to simply be able to login again (Not a real complaint, it is Alpha). But until work is done to make the whole thing a lot clearer to non-technical users every howto is still going to start with, “Turn off selinux”. If I build a live respin, I will probably disable selinux on install.

GNOME Shell

The preferences are sparse, and this is by design, but I think most users, after getting used to the interface, are going to won’t more customization option. For the technically minded people install “dconf-editor”. If you want things a little simpler check out “gnome-tweak-tool“.

But personally, after getting comfortable with the shell, I think it is a better way to work. I like managing my work-flow with dynamic workspaces. A few extra keyboard shortcuts would come in handy.

I also have a usability problem with the notification tray. When there are multiple icons, you hover over the icon, which then moves to display the name of the application. If you need to click on an icon for options it has moved some arbitrary number of pixels away. It is only a little thing, but it annoys me no end. I think rather than shuffling icons, the title could simply be displayed as a pop-op, hint style.

Adding things and customization

Getting things to work with Fedora is just a little bit tricky. 32 bit flash on 64 bit system requires a visit to the wiki. Yum doesn’t process architecture dependencies properly, so whenever an app was only available 32 bit, like Skype, it would take a bit of a forum search to find a solution for installation. And I think that has always hindered Fedora adoption. The learning curve is just a bit steeper than Ubuntu. Sure a visit to a  Fedora FAQ will normally fix you up. but it takes a bit of investigation.

But all that said. I am back on very familiar Fedora soil, and I couldn’t be happier. I will try when writing blog posts to include instructions for Fedora/RHEL/CentOS and Ubuntu/Debian. I work with all of them. But I am a little lazy, so instead there will probably be a mash of howto’s each one on whatever distro the problem I was fixing was based.

Google Chrome theme for Adwaita (gnome-shell)

Update: A much better looking and more official theme is now available in the chrome webstore http://goo.gl/CmRUk

I have been running Fedora 15. It is kinda buggy, (expected it’s alpha,) but I am actually finding gnome-shell growing on me.

Firefox 4 in included, but I still find I prefer Google Chrome, trouble is, it looks out of place on the desktop. I used this site and threw together a quick theme. It’s not perfect, but feel free to download it.