#hoopla

  • Startseite
  • Kontakt
  • Hoopla?!
  • Datenschutz
  • Impressum
  • « Virtualbox DNS not working within VMs after Ubuntu upgrade from 12.04 to 14.04
  • jQueryvalidate: Validiere deutsches Datum und Geburtsdatum »

Nautilus 3.10 on Ubuntu 14.04: Show full date and time in list view column

Eingetragen von fayon am 02 Mär 2015 in Linux, Arbeit

After upgrading from 12.04 to 14.04 I found that Nautilus shows the modification times of each file in lists only like "22. Jan 2014" instead of "22.01.2014 10:53:18". Some research showed that the issue is known and currently only "solveable" by either recompiling or taking a precompiled PPA. That means, it either breaks after each Nautilus update or is insecure.

I found a more generic and update-safer way to work around the issue by adding a custom column. It is far from being perfect, because sorting only works if the date format is something like YYYY-MM-DD HH:mm:ss. When using another date format like the German one DD.MM.YYYY HH:mm:ss, the lexicographic order is not particularly useful. Furthermore, it does not work on network shares yet.

In order to be able to use Python to add a Nautilus file list column, install the following package:

sudo apt-get install python-nautilus

Create the following subfolders, if they do not already exist: ~/.local/share/nautilus-python/extensions

Create a file longdate.py in the directory and add the following code:

#!/usr/bin/env python

import os
import urllib
import datetime
from gi.repository import Nautilus, GObject

class ColumnExtension(GObject.GObject, Nautilus.ColumnProvider, Nautilus.InfoProvider):
def __init__(self):
pass

def get_columns(self):
return (Nautilus.Column(name="NautilusPython::Longdate", attribute="longdate", label="Longdate", description="Get long date"),)

def update_file_info(self, file):
if file.get_uri_scheme() != 'file':
return
filename = urllib.unquote(file.get_uri()[7:])
statbuf = os.stat(filename)
formatteddate = datetime.datetime.fromtimestamp(statbuf.st_mtime).strftime('%Y-%m-%d %H:%M:%S')
file.add_string_attribute('longdate', str(formatteddate))

After saving, enter nautilus -q in the terminal in order close the program entirely. Make the program file executable. Then restart Nautilus by clicking the file symbol. In the bar above the file list left-click and choose "Longdate" to show the detailed modification date and time of each file.

Dieser Eintrag wurde eingetragen von fayon und ist abgelegt unter Linux, Arbeit.

3 Kommentare

Kommentar von: David Besucher

THANK YOU! This is a life-saver :)

01.10.16 @ 18:14

Kommentar von: Carlos Besucher

Hallo!

I have just updated (ha) from Ubuntu 12.04 to 16.04 due to EOL and I also bumped into this lack-of-timestamp issue in Nautilus.

I have tried to apply your (brilliant!) solution but it did not work as expected (well, at all). I have been searching documentation and making variations (/usr/share among others) to no avail.

I run another extension for a kind-of-statusbar that gives the space available on disk (another sadly lost feature) and it works great. Yours sure will do, but I cannot make that happen.
https://github.com/climaxx/Nautilus-Status-Bar-Replacement

Maybe could you suggest me something to make it work?

I understand that Ubuntu 16.04 runs Nautilus 3.14.3, instead of the 3.10 of Ubuntu 14.10.

Thank you for your great idea.

15.03.17 @ 19:48

Kommentar von: Carlos Besucher

Nevermind. I switched to Mint-Cinnamon and now I’m a happy user with a full desktop and plenty of options. GNOME-Nautilus is a lost cause.

02.05.17 @ 16:05


Formular wird geladen...

Kommentar-Feed für diesen Eintrag

Suche

Neueste Posts

  • MariaDB boolean comparison syntax
  • Software archeology: how to send customized HTML mails with Drupal 7
  • Connect to IP-restricted Azure MSSQL database via tunnel
  • Postgres: Convert numeric currency value to German bookkeeping standard
  • Computer scientist's way to clean up a room for online conferences
  • JTL5 + Nova Template + Youtube: "Dieses Video ist nicht verfügbar"
  • JTL5 + Nova Child Template + Google Analytics 4
  • Office 365: SMTP with Basic Auth made (im)possible
  • How to migrate from Exchange to Office365
  • Install Ubuntu 20 with a USB flash drive. Go for the old-fashioned way.

Neueste Kommentare

  • Katrin am IAA Plus: Fehlermeldung "Ware(X). Aussenhandelsstatistik Menge.fehlende Pflichtfeld"
  • Inga am IAA Plus: Fehlermeldung "Ware(X). Aussenhandelsstatistik Menge.fehlende Pflichtfeld"
  • Pulsotronic-Anlagentechnik GmbH am IAA Plus: Fehlermeldung "Ware(X). Aussenhandelsstatistik Menge.fehlende Pflichtfeld"
  • Stephan am IAA Plus: Fehlermeldung "Ware(X). Aussenhandelsstatistik Menge.fehlende Pflichtfeld"
  • Lopez am IAA Plus: Fehlermeldung "Ware(X). Aussenhandelsstatistik Menge.fehlende Pflichtfeld"
  • Heike am IAA Plus: Fehlermeldung "Ware(X). Aussenhandelsstatistik Menge.fehlende Pflichtfeld"
  • Renata am IAA Plus: Fehlermeldung "Ware(X). Aussenhandelsstatistik Menge.fehlende Pflichtfeld"
  • Sandman am Kopierstempel in Photoshop innerhalb VirtualBox funktioniert nicht
  • treviris am Kopierstempel in Photoshop innerhalb VirtualBox funktioniert nicht
  • Mike am Netzwerkscanner auf Ubuntu einrichten
  • Carlos am Nautilus 3.10 on Ubuntu 14.04: Show full date and time in list view column
  • Carlos am Nautilus 3.10 on Ubuntu 14.04: Show full date and time in list view column
  • Mohsen am IAA Plus: Fehlermeldung "Ware(X). Aussenhandelsstatistik Menge.fehlende Pflichtfeld"
  • David am Nautilus 3.10 on Ubuntu 14.04: Show full date and time in list view column
  • Conny am IAA Plus: Fehlermeldung "Ware(X). Aussenhandelsstatistik Menge.fehlende Pflichtfeld"
  • Markus am IAA Plus: Fehlermeldung "Ware(X). Aussenhandelsstatistik Menge.fehlende Pflichtfeld"
  • SK am Elster: Zertifikat verlängern gibt "Es ist ein Fehler aufgetreten! Bitte starten Sie den Browser erneut und führen Sie diese Aktion nochmal durch."
  • Menzel am IAA Plus: Fehlermeldung "Ware(X). Aussenhandelsstatistik Menge.fehlende Pflichtfeld"
  • Angelika am Elster: Zertifikat verlängern gibt "Es ist ein Fehler aufgetreten! Bitte starten Sie den Browser erneut und führen Sie diese Aktion nochmal durch."
  • Michael am IAA Plus: Fehlermeldung "Ware(X). Aussenhandelsstatistik Menge.fehlende Pflichtfeld"

©2022 by ff • Kontakt • Hilfe

Run your own website!