Documentation ¶
Overview ¶
Package login1 provides integration with the systemd logind API. See http://www.freedesktop.org/wiki/Software/systemd/logind/
Index ¶
- type Conn
- func (c *Conn) Close()
- func (c *Conn) GetSession(id string) (dbus.ObjectPath, error)
- func (c *Conn) Inhibit(what, who, why, mode string) (*os.File, error)
- func (c *Conn) ListSessions() ([]Session, error)
- func (c *Conn) ListUsers() ([]User, error)
- func (c *Conn) LockSession(id string)
- func (c *Conn) LockSessions()
- func (c *Conn) PowerOff(askForAuth bool)
- func (c *Conn) Reboot(askForAuth bool)
- func (c *Conn) Subscribe(members ...string) chan *dbus.Signal
- func (c *Conn) TerminateSession(id string)
- func (c *Conn) TerminateUser(uid uint32)
- type Session
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is a connection to systemds dbus endpoint.
func (*Conn) GetSession ¶
func (c *Conn) GetSession(id string) (dbus.ObjectPath, error)
GetSession may be used to get the session object path for the session with the specified ID.
func (*Conn) ListSessions ¶
ListSessions returns an array with all current sessions.
func (*Conn) LockSession ¶
LockSession asks the session with the specified ID to activate the screen lock.
func (*Conn) LockSessions ¶
func (c *Conn) LockSessions()
LockSessions asks all sessions to activate the screen locks. This may be used to lock any access to the machine in one action.
func (*Conn) TerminateSession ¶
TerminateSession forcibly terminate one specific session.
func (*Conn) TerminateUser ¶
TerminateUser forcibly terminates all processes of a user.