You are not logged in.

#1 2012-11-16 21:40:30

BennyBolton
Member
From: Christchurch New Zealand
Registered: 2011-10-14
Posts: 63
Website

xcommand - run commands in X server

xcommand is a very small and simple script I made.
Essentially you start "xcommand --daemon &" when X starts and it binds to a unix socket.
You can then pass a command to it using "xcommand <command>" and xcommand will run this command, e.g. "xcommand notify-send testing"

aur package: https://aur.archlinux.org/packages/xcommand


HP DV6 + Arch + Openbox

Offline

#2 2012-11-16 22:55:43

BennyBolton
Member
From: Christchurch New Zealand
Registered: 2011-10-14
Posts: 63
Website

Re: xcommand - run commands in X server

Updated to 0.1.1
I have this problem to nc.openbsd and unix sockets where it locks up or something with 100% cpu usage, so i added customization where if you have a ~/.xcommandrc it will source it for the variables NC_LISTEN and NC_WRITE and i made one for myself which binds to a tcp socket instead. e.g.

#!/bin/bash

NC_LISTEN="nc.openbsd -lk localhost 1234"
NC_WRITE="nc.openbsd localhost 1234"

I don't know if other people have this problem with nc.openbsd and unix sockets so for now the defaults remain to bind to a unix socket (~/.xcommand.socket)

EDIT: Updated to 0.1.1-2, removed line when it would delete socket on exit

Last edited by BennyBolton (2012-11-16 23:03:42)


HP DV6 + Arch + Openbox

Offline

#3 2012-11-17 12:04:26

Pajaro
Member
Registered: 2004-04-21
Posts: 878

Re: xcommand - run commands in X server

What use do you give to this application?

Offline

#4 2012-11-17 20:47:37

BennyBolton
Member
From: Christchurch New Zealand
Registered: 2011-10-14
Posts: 63
Website

Re: xcommand - run commands in X server

I use it for two things so far
- calling slimlock on a sleep hook
- opening a shutdown dialog when i press the power button


HP DV6 + Arch + Openbox

Offline

Board footer

Powered by FluxBB