All Projects → Ventto → xpub

Ventto / xpub

Licence: MIT license
POSIX Shell script to get user's display environment variables of any TTY from anywhere.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to xpub

i3-workscreen
In i3wm compatible manner - dynamically re-configures your (multi)-monitor setup on the fly when you hotplug/unplug display cabel(s)
Stars: ✭ 29 (-19.44%)
Mutual labels:  display, udev
runx
Provide X server on MS Windows with cookie authentication.
Stars: ✭ 67 (+86.11%)
Mutual labels:  xauthority, x
Django Rules
Awesome Django authorization, without the database
Stars: ✭ 1,255 (+3386.11%)
Mutual labels:  rules
BetterDummy
Unlock your displays on your Mac! Smooth scaling, HiDPI unlock, XDR/HDR extra brightness upscale, DDC, brightness and dimming, dummy displays, PIP and lots more!
Stars: ✭ 9,601 (+26569.44%)
Mutual labels:  display
Streamalert
StreamAlert is a serverless, realtime data analysis framework which empowers you to ingest, analyze, and alert on data from any environment, using datasources and alerting logic you define.
Stars: ✭ 2,634 (+7216.67%)
Mutual labels:  rules
Rules
自用Clash 策略组及规则 及Subconverter 相关资源备份
Stars: ✭ 94 (+161.11%)
Mutual labels:  rules
bmcweb
A do everything Redfish, KVM, GUI, and DBus webserver for OpenBMC
Stars: ✭ 109 (+202.78%)
Mutual labels:  dbus
Json Rules Engine
A rules engine expressed in JSON
Stars: ✭ 1,159 (+3119.44%)
Mutual labels:  rules
vscode-commands
Run commands from Tree View / Status Bar / Quick Pick.
Stars: ✭ 45 (+25%)
Mutual labels:  run
Winhue
Controlling the Philips Hue lighting system from your Windows PC.
Stars: ✭ 167 (+363.89%)
Mutual labels:  rules
Sprat-type
Display typeface
Stars: ✭ 58 (+61.11%)
Mutual labels:  display
Yaraguardian
Django web interface for managing Yara rules
Stars: ✭ 156 (+333.33%)
Mutual labels:  rules
Rules
Generic Rules engine in golang
Stars: ✭ 96 (+166.67%)
Mutual labels:  rules
pub-rules
Rules - Powerful and feature-rich validation library for both Dart and Flutter.
Stars: ✭ 24 (-33.33%)
Mutual labels:  rules
White Book
有关于 CNBlackListR 项目的说明
Stars: ✭ 94 (+161.11%)
Mutual labels:  rules
laravel-admin
LaravelAdmin是基于PHP开发的基础管理后台系统,做到开箱即用,为新项目开发省去了基础功能开发的步骤;此系统采用前后端分离模式,后端使用Laravel,前端使用vue;主要包含:登录、注销、可视化数据大屏、管理员、角色管理、菜单管理、权限管理、错误日志、登录日志、访问日志、获取服务器CPU使用率、内存使用率等功能。后端主要使用Artisan命令行、Jobs消息队列、 Rules验证规则、Restful API、Composer扩展包、Redis秒杀、Extend自定义扩展类:微信授权、钉钉告警推送、MongoDB、阿里云OSS、七牛云存储、七牛云直播、php-jwt TOKEN、Phpoffice、MySql数据库字典、Elasticsearch等技术。
Stars: ✭ 45 (+25%)
Mutual labels:  rules
Ultimateapplockerbypasslist
The goal of this repository is to document the most common techniques to bypass AppLocker.
Stars: ✭ 1,186 (+3194.44%)
Mutual labels:  rules
Flogo
Project Flogo is an open source ecosystem of opinionated event-driven capabilities to simplify building efficient & modern serverless functions, microservices & edge apps.
Stars: ✭ 1,891 (+5152.78%)
Mutual labels:  rules
dbussy
Python binding for D-Bus using asyncio
Stars: ✭ 88 (+144.44%)
Mutual labels:  dbus
device-epd
E-Paper Display Device
Stars: ✭ 26 (-27.78%)
Mutual labels:  display

Xpub

License Vote for xpub

"Xpub is a Shell script to get user's display environment variables of any X graphical session from anywhere."

Perks

  • No requirement: POSIX-compliant.
  • Omniscient: Provides X environment variables of any session from any user.
  • Usefull: Run graphical commands from udevrules (see below).
  • Extra: Display graphical command on a specific session.
  • Support: XWayland users, keep calm.

Installation

  • Package (AUR)
$ yaourt -S xpub
  • Manually
$ git clone https://github.com/Ventto/xpub.git
$ cd xpub
$ chmod +x src/xpub.sh

Usage

Usage: xpub [-t TTY]

Without option, prints the X session information of the current user.

  -h:   Prints this help and exits.
  -v:   Prints the version and exits.
  -t:   prints the current TTY's user X session information.

Examples

From terminal

sudo is required.

  • Get information of your current session:
$ xpub
TTY=tty2
XUSER=alice
XAUTHORITY=/home/alice/.Xauthority
DISPLAY=:0
DBUS_SESSION_BUS_ADDRESS=/path
  • Get information of a specific session:
$ xpub -t tty2
XUSER=alice
XAUTHORITY=/home/alice/.Xauthority
DISPLAY=:0
DBUS_SESSION_BUS_ADDRESS=/path

Udev rules

IMPORT{program}="/usr/bin/xpub", \
RUN+="/bin/su $env{XUSER} -c '/usr/bin/notify-send Hello'"

After editing your rules, you may need to run udevadm control --reload-rules.

For root

$ export $(xpub) ; su "${XUSER}" -c '/usr/bin/notify-send Hello'

Shell scripts

xenv=$(xpub 2>/tmp/xpub.log)

if [ $# -ne 0 ]; then
    exit 1
else
    export ${xenv}
fi

su "${XUSER}" -c "/usr/bin/notify-send Hello"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].