Skip to content

Commit b5308e5

Browse files
author
Thomas Venries
committed
misc: Add LICENSE and README.md
0 parents  commit b5308e5

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed

LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015-2016 Thomas "Ventto" Venriès <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Xpub
2+
===================
3+
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/Ventto/xpub/blob/master/LICENSE)
4+
[![Status](https://img.shields.io/badge/status-experimental-orange.svg?style=flat)](https://github.com/Ventto/xpub)
5+
[![Language (Bash)](https://img.shields.io/badge/powered_by-Bash-brightgreen.svg)](https://www.gnu.org/software/bash)
6+
7+
*"Xpub is a Bash script to get X variables environment even from limited env as privileged user."*
8+
9+
The purpose is to give X variables environment for tools which want to execute GUI from limited environment as privileged user (ex: udev rules).
10+
# Installation
11+
12+
*"Installation as AUR package, soon."*
13+
14+
```
15+
$ git clone https://github.com/Ventto/xpub.git
16+
$ cd xpub
17+
$ chmod +x src/xpub.sh
18+
$ ./src/xpub.sh
19+
```
20+
21+
# Usage
22+
23+
```
24+
Usage: xpub [OPTION]...
25+
26+
Information:
27+
none: Prints X environment based on the current tty
28+
-t: Prints X environment based on a given TTY
29+
30+
Miscellaneous:
31+
-h: Prints this help and exits
32+
-v: Prints version and exits
33+
```
34+
35+
# Examples
36+
37+
* Gets X user environment based on the current TTY:
38+
39+
```
40+
$ pub
41+
TTY=tty1
42+
XUSER=user1
43+
XAUTHORITY=/home/user1/.Xauthority
44+
DISPLAY=:0
45+
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1022/bus
46+
```
47+
48+
49+
* Gets X user environment based on a given TTY:
50+
51+
```
52+
$ xpub -t tty3
53+
XUSER=user2
54+
XAUTHORITY=/home/user2/.Xauthority
55+
DISPLAY=:1
56+
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1024/bus
57+
```
58+
59+
60+
61+
62+

0 commit comments

Comments
 (0)