Re: [Nix-dev] DBus and XMonad

2016-11-09 Thread Profpatsch
On 16-11-09 01:24am, Ruben Astudillo wrote:
> On 08/11/16 16:40, Profpatsch wrote:
> > I stopped using taffybar for that reason, and actually quite like my
> > fullscreen-by-default system as it is now.
> 
> How do you know if you have a hogging process then?. Do you have a open
> htop? (I am tempted about having a xmonad fullscreen-by-default).

Should that happen I just open a terminal and htop in that.

For info like battery and time I have a small script that uses notify-send
and is bound to a key in my window manager.
https://github.com/openlab-aux/vuizvui/blob/master/pkgs/profpatsch/display-infos/default.nix
It could be trivially extended to display load.

As libnotify-daemon I have twmn running, which looks quite nice.
https://github.com/Profpatsch/dotfiles/blob/katara/twmn/.config/twmn/twmn.conf

-- 
Proudly written in Mutt with Vim on NixOS.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es
May take up to five days to read your message. If it’s urgent, call me.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] DBus and XMonad

2016-11-08 Thread Peter Hoeg


Hi,


Does this mean we do have a user session bus now? That’s
one of the features I’ve been longing for for quite a while now.


We have had that for some time but we also now have it socket activated,
where everything should just work as long as you select it:

services.dbus.socketActivated = true;

--
Regards,
Peter
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] DBus and XMonad

2016-11-08 Thread Ruben Astudillo
On 08/11/16 16:40, Profpatsch wrote:
> I stopped using taffybar for that reason, and actually quite like my
> fullscreen-by-default system as it is now.

How do you know if you have a hogging process then?. Do you have a open
htop? (I am tempted about having a xmonad fullscreen-by-default).

-- 
-- Ruben
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] DBus and XMonad

2016-11-08 Thread Profpatsch
On 16-11-05 02:54pm, Nikolay Amiantov wrote:
> Hi Rodney,
> 
> On 10/19/2016 01:53 PM, Rodney Lorrimar wrote:
> > My first problem was that Taffybar and xmonad.hs were unable connect to
> > DBus with the following error:
> > 
> > connectSession: DBUS_SESSION_BUS_ADDRESS is missing or invalid.
> 
> I've pushed a fix to master with a minimal patch that fixes this
> issue[1]. It's not a complete fix like your PR does[2] but it's a
> minimal change to make things things work until upstream does its move.
> 
> 1:
> https://github.com/NixOS/nixpkgs/commit/dd8f60fbd94c09ae6bbc4553079cd199a1635dfc
> 2: https://github.com/jmillikin/haskell-dbus/pull/6

Does this mean we do have a user session bus now? That’s
one of the features I’ve been longing for for quite a while now.

I stopped using taffybar for that reason, and actually quite like my
fullscreen-by-default system as it is now. :)

-- 
Proudly written in Mutt with Vim on NixOS.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es
May take up to five days to read your message. If it’s urgent, call me.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] DBus and XMonad

2016-11-05 Thread Nikolay Amiantov
Hi Rodney,

On 10/19/2016 01:53 PM, Rodney Lorrimar wrote:
> My first problem was that Taffybar and xmonad.hs were unable connect to
> DBus with the following error:
> 
> connectSession: DBUS_SESSION_BUS_ADDRESS is missing or invalid.

I've pushed a fix to master with a minimal patch that fixes this
issue[1]. It's not a complete fix like your PR does[2] but it's a
minimal change to make things things work until upstream does its move.

1:
https://github.com/NixOS/nixpkgs/commit/dd8f60fbd94c09ae6bbc4553079cd199a1635dfc
2: https://github.com/jmillikin/haskell-dbus/pull/6

-- 
Nikolay.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] DBus and XMonad

2016-10-20 Thread Peter Hoeg

Hi,


The submitter of #19110 notes that another way to get the user service
to start would be to configure this:

   systemd.packages = [ pkgs.gnome3.gnome_terminal ];


The problem is that you either add them to systemd.packages or are
willing to accept global impurity. My guess is that the latter won't
fly.

I'm currently working on getting KDE to behave in the same way as GNOME
when it comes to dbus activated services via systemd but it's still some
time away.

/Peter
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] DBus and XMonad

2016-10-20 Thread Rodney Lorrimar
On Wed, Oct 19 2016, Rodney Lorrimar wrote:
> My next problem is that gnome-terminal will no longer start:
>
> dbus-daemon[6158]: Activating via systemd: service 
> name='org.gnome.Terminal' unit='gnome-terminal-server.service'
> dbus-daemon[6158]: Activation via systemd failed for unit 
> 'gnome-terminal-server.service': Unit gnome-terminal-server.service not found.
>
> I have found that this is due to
> https://github.com/NixOS/nixpkgs/issues/19110
>
> My workaround for that problem is simply:
>
> ln -vsf /run/current-system/sw/lib/systemd/user/* ~/.config/systemd/user

Hello List,

The submitter of #19110 notes that another way to get the user service
to start would be to configure this:

systemd.packages = [ pkgs.gnome3.gnome_terminal ];

However I'm not sure whether it's a good solution. This would mean every
program which provides a dbus-activated systemd user service needs to
added to NixOS systemd.packages.


Cheers,

Rodney
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] DBus and XMonad

2016-10-20 Thread Rodney Lorrimar
On Wed, Oct 19 2016, Ruben Astudillo wrote:

> On 19/10/16 08:19, Michael Alan Dorman wrote:
>> Rodney Lorrimar  writes:
>>> 
>>> DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-jp8hFEY1dV,guid=c6e01dc144bda2ae4ca47c84580747a5;unix:abstract=/tmp/dbus-BjlHWWC2xz,guid=3733c1a431ad4cb309cc622a580747a5
>>>
>>> I'm not quite sure why the dbus socket was unavailable, but my solution
>>> was to enable services.dbus.socketActivated in configuration.nix.
>> 
>> I have seen this, too---manifesting as an taffybar not starting---though
>> I was doing some more investigation before I enquired.
>> 
>> I was able to roll back to a version that worked, and the clearly
>> distinguishing feature was that there was only one listing in
>> DBUS_SESSION_BUS_ADDRESS; and indeed, if I set the environment variable
>> when starting taffybar, it works fine.
>> 
>>   $ 
>> DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-jp8hFEY1dV,guid=c6e01dc144bda2ae4ca47c84580747a5
>>  taffybar 
>> 
>> Works just fine.
>> 
>> I guess the question I'm left with is whether the error is in the nix
>> configuration providing us with two entries in the variable, or in the
>> haskell dbus package in not handling it properly?
>
> I've noticed this too (and fixed the same way). Before in 16.03
> DBUS_SESSION_BUS_ADDRESS only listed one abstract path, thus I it isn't
> a fault on the haskell side of things.

Hi,

I guess it must have been a change in either dbus-launch or the dbus
daemon.

The current freedesktop.org implementation handles semicolons in
DBUS_SESSION_BUS_ADDRESS. It also adds the user bus socket to the list
of addresses (if it exists). I have reported these two things to the
haskell-dbus author.


Cheers,

Rodney
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] DBus and XMonad

2016-10-19 Thread Ruben Astudillo
On 19/10/16 08:19, Michael Alan Dorman wrote:
> Rodney Lorrimar  writes:
>> 
>> DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-jp8hFEY1dV,guid=c6e01dc144bda2ae4ca47c84580747a5;unix:abstract=/tmp/dbus-BjlHWWC2xz,guid=3733c1a431ad4cb309cc622a580747a5
>>
>> I'm not quite sure why the dbus socket was unavailable, but my solution
>> was to enable services.dbus.socketActivated in configuration.nix.
> 
> I have seen this, too---manifesting as an taffybar not starting---though
> I was doing some more investigation before I enquired.
> 
> I was able to roll back to a version that worked, and the clearly
> distinguishing feature was that there was only one listing in
> DBUS_SESSION_BUS_ADDRESS; and indeed, if I set the environment variable
> when starting taffybar, it works fine.
> 
>   $ 
> DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-jp8hFEY1dV,guid=c6e01dc144bda2ae4ca47c84580747a5
>  taffybar 
> 
> Works just fine.
> 
> I guess the question I'm left with is whether the error is in the nix
> configuration providing us with two entries in the variable, or in the
> haskell dbus package in not handling it properly?

I've noticed this too (and fixed the same way). Before in 16.03
DBUS_SESSION_BUS_ADDRESS only listed one abstract path, thus I it isn't
a fault on the haskell side of things.
-- 
-- Ruben
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] DBus and XMonad

2016-10-19 Thread Michael Alan Dorman
Rodney Lorrimar  writes:
> 
> DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-jp8hFEY1dV,guid=c6e01dc144bda2ae4ca47c84580747a5;unix:abstract=/tmp/dbus-BjlHWWC2xz,guid=3733c1a431ad4cb309cc622a580747a5
>
> I'm not quite sure why the dbus socket was unavailable, but my solution
> was to enable services.dbus.socketActivated in configuration.nix.

I have seen this, too---manifesting as an taffybar not starting---though
I was doing some more investigation before I enquired.

I was able to roll back to a version that worked, and the clearly
distinguishing feature was that there was only one listing in
DBUS_SESSION_BUS_ADDRESS; and indeed, if I set the environment variable
when starting taffybar, it works fine.

  $ 
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-jp8hFEY1dV,guid=c6e01dc144bda2ae4ca47c84580747a5
 taffybar 

Works just fine.

I guess the question I'm left with is whether the error is in the nix
configuration providing us with two entries in the variable, or in the
haskell dbus package in not handling it properly?

Mike.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] DBus and XMonad

2016-10-19 Thread Rodney Lorrimar
Hello List,

I've recently had some troubles starting up my gnome3 + XMonad desktop
session.

My first problem was that Taffybar and xmonad.hs were unable connect to
DBus with the following error:

connectSession: DBUS_SESSION_BUS_ADDRESS is missing or invalid.

The value of DBUS_SESSION_BUS_ADDRESS probably came from dbus-launch:


DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-jp8hFEY1dV,guid=c6e01dc144bda2ae4ca47c84580747a5;unix:abstract=/tmp/dbus-BjlHWWC2xz,guid=3733c1a431ad4cb309cc622a580747a5

I'm not quite sure why the dbus socket was unavailable, but my solution
was to enable services.dbus.socketActivated in configuration.nix.

An additional problem is that the haskell-dbus library won't check the
socket $XDG_RUNTIME_DIR/bus after the connection fails using
DBUS_SESSION_BUS_ADDRESS. So my workaround is to change the environment
before connecting:

let bus d = "unix:path=" ++ d ++ "/bus"
maddr <- fmap bus <$> lookupEnv "XDG_RUNTIME_DIR"
case maddr of
  Just addr -> setEnv "DBUS_SESSION_BUS_ADDRESS" addr
  Nothing -> return ()

This allows me to start xmonad and taffybar.

My next problem is that gnome-terminal will no longer start:

dbus-daemon[6158]: Activating via systemd: service 
name='org.gnome.Terminal' unit='gnome-terminal-server.service'
dbus-daemon[6158]: Activation via systemd failed for unit 
'gnome-terminal-server.service': Unit gnome-terminal-server.service not found.

I have found that this is due to
https://github.com/NixOS/nixpkgs/issues/19110

My workaround for that problem is simply:

ln -vsf /run/current-system/sw/lib/systemd/user/* ~/.config/systemd/user

Now I have a working desktop session again. I have posted this in case
anyone else has similar difficulties.

In future, having a socket-activated dbus would allow the NixOS xsession
script to be partly replaced by systemd. I think that could be quite
exciting.


Cheers,

Rodney
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev