Giter Site home page Giter Site logo

gedit-plugin-open-as-root's Introduction

[Gedit plugin] Open as root

A gedit plugin opening the current document as root (100% compatible with Wayland).

Requirements

  • gedit ≥ 3.22
  • polkitd (it should already be here don't worry)

Installation

  • Run install.sh
  • Restart gedit
  • Enable the plugin in Preferences.

gedit-plugin-open-as-root's People

Contributors

maoschanz avatar vistaus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gedit-plugin-open-as-root's Issues

AttributeError: 'Document' object has no attribute 'get_location'

Using gedit 40.1 on GNOME 41.2 with Python 3.10.1 and GObject 3.42.0:

❯ gedit

(gedit:457309): GtkSourceView-WARNING **: 11:03:47.262: no color named ''
Traceback (most recent call last):
  File "/home/yochanan/.local/share/gedit/plugins/open_as_root.py", line 46, in update_item_state
    if self.window.get_active_document() is None or self.window.get_active_document().get_location() is None:
AttributeError: 'Document' object has no attribute 'get_location'
Traceback (most recent call last):
  File "/home/yochanan/.local/share/gedit/plugins/open_as_root.py", line 46, in update_item_state
    if self.window.get_active_document() is None or self.window.get_active_document().get_location() is None:
AttributeError: 'Document' object has no attribute 'get_location'
Traceback (most recent call last):
  File "/home/yochanan/.local/share/gedit/plugins/open_as_root.py", line 46, in update_item_state
    if self.window.get_active_document() is None or self.window.get_active_document().get_location() is None:
AttributeError: 'Document' object has no attribute 'get_location'
Traceback (most recent call last):
  File "/home/yochanan/.local/share/gedit/plugins/open_as_root.py", line 46, in update_item_state
    if self.window.get_active_document() is None or self.window.get_active_document().get_location() is None:
AttributeError: 'Document' object has no attribute 'get_location'
Traceback (most recent call last):
  File "/home/yochanan/.local/share/gedit/plugins/open_as_root.py", line 46, in update_item_state
    if self.window.get_active_document() is None or self.window.get_active_document().get_location() is None:
AttributeError: 'Document' object has no attribute 'get_location'
Traceback (most recent call last):
  File "/usr/lib/gedit/plugins/git/viewactivatable.py", line 113, in update_location
    self.location = self.buffer.get_file().get_location()
AttributeError: 'NoneType' object has no attribute 'get_file'

(gedit:457309): Gtk-CRITICAL **: 11:03:47.433: gtk_text_buffer_get_selection_bounds: assertion 'GTK_IS_TEXT_BUFFER (buffer)' failed
Traceback (most recent call last):
  File "/home/yochanan/.local/share/gedit/plugins/open_as_root.py", line 46, in update_item_state
    if self.window.get_active_document() is None or self.window.get_active_document().get_location() is None:
AttributeError: 'Document' object has no attribute 'get_location'
Traceback (most recent call last):
  File "/home/yochanan/.local/share/gedit/plugins/open_as_root.py", line 46, in update_item_state
    if self.window.get_active_document() is None or self.window.get_active_document().get_location() is None:
AttributeError: 'Document' object has no attribute 'get_location'

Not compatible with Gedit "40"

When debugging, it produces:

line 68 in action_cb
admin_uri = 'admin://' + doc.get_uri_for_display()`
AttributeError: 'Document' object has no attribute 'get_uri_for_display

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.