Bug 989098 - Update to 1.1.5 breaks CLI functionality
Update to 1.1.5 breaks CLI functionality
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: parcellite (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Christoph Wickert
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-27 10:29 EDT by Ankur Sinha (FranciscoD)
Modified: 2013-08-14 22:42 EDT (History)
2 users (show)

See Also:
Fixed In Version: parcellite-1.1.6-1.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-14 22:41:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File with entire output (19.91 KB, text/plain)
2013-07-30 00:34 EDT, Ankur Sinha (FranciscoD)
no flags Details

  None (edit)
Description Ankur Sinha (FranciscoD) 2013-07-27 10:29:37 EDT
Description of problem:
The latest update seems to break CLI functionality

Version-Release number of selected component (if applicable):
1.1.5


How reproducible:
Always

Steps to Reproduce:
1. Try echo "foo bar" | parcellite
2. 
3.

Actual results:
It doesn't work:

[asinha@localhost  ~]$ echo "haha" | parcellite
Unable to access XDG_SESSION_COOKIE for pid 13375
Unable to access XDG_SESSION_COOKIE for pid 13423
haha

** (parcellite:13423): WARNING **: Binding '<Ctrl><Alt>X' failed!


** (parcellite:13423): WARNING **: Binding '<Ctrl><Alt>H' failed!


** (parcellite:13423): WARNING **: Binding '<Ctrl><Alt>A' failed!


** (parcellite:13423): WARNING **: Binding '<Ctrl><Alt>P' failed!


^C

Expected results:
Should work normally as 1.1.4 does:

[asinha@localhost  ~]$ norm 0x1 Waiting on chars
CLI: Got 428 '[asinha@localhost  ~]$ echo "haha" | parcellite
Unable to access XDG_SESSION_COOKIE for pid 13375
Unable to access XDG_SESSION_COOKIE for pid 13423
haha

** (parcellite:13423): WARNING **: Binding '<Ctrl><Alt>X' failed!


** (parcellite:13423): WARNING **: Binding '<Ctrl><Alt>H' failed!


** (parcellite:13423): WARNING **: Binding '<Ctrl><Alt>A' failed!


** (parcellite:13423): WARNING **: Binding '<Ctrl><Alt>P' failed!


^C'
Setting CLI '[asinha@localhost  ~]$ echo "haha" | parcellite
Unable to access XDG_SESSION_COOKIE for pid 13375
Unable to access XDG_SESSION_COOKIE for pid 13423
haha

** (parcellite:13423): WARNING **: Binding '<Ctrl><Alt>X' failed!


** (parcellite:13423): WARNING **: Binding '<Ctrl><Alt>H' failed!


** (parcellite:13423): WARNING **: Binding '<Ctrl><Alt>A' failed!


** (parcellite:13423): WARNING **: Binding '<Ctrl><Alt>P' failed!


^C'


*** 
Downgrading gets functionality back.
Comment 1 Ankur Sinha (FranciscoD) 2013-07-27 10:40:42 EDT
Looks like 1.1.5 doesn't detect a running parcellite at all. 

To clarify, this is 1.1.4:

[asinha@localhost  ~]$ echo "foo bar1" | parcellite
parcellite found
CLI fifo 6 PRI fifo 5
Using cli fifo for write
writing 'foo bar1
'
norm 0x1 Waiting on chars
CLI: Got 9 'foo bar1
'
[asinha@localhost  ~]$ Setting CLI 'foo bar1
'

[asinha@localhost  ~]$

**************************************************************************

This is 1.1.5:
[asinha@localhost  ~]$ echo "foo bar" | parcellite
Unable to access XDG_SESSION_COOKIE for pid 18244
Unable to access XDG_SESSION_COOKIE for pid 18355

** (parcellite:18355): WARNING **: Binding '<Ctrl><Alt>X' failed!


** (parcellite:18355): WARNING **: Binding '<Ctrl><Alt>H' failed!


** (parcellite:18355): WARNING **: Binding '<Ctrl><Alt>A' failed!


** (parcellite:18355): WARNING **: Binding '<Ctrl><Alt>P' failed!



******

and it just waits here until I use ^C. I can confirm that two parcellites are running now:

[asinha@localhost  ~]$ ps aux | egrep parcellite
asinha   18244  0.4  0.3 456992 11904 pts/9    Sl   00:38   0:00 parcellite
asinha   18355  0.3  0.2 456024  9560 pts/9    Sl+  00:39   0:00 parcellite
Comment 2 Christoph Wickert 2013-07-27 17:29:45 EDT
I can confirm this behavior, however I don't know if it ever was supposed to work this way. What makes you think it was? Did I overlook something in the docs or on the website?
Comment 3 Ankur Sinha (FranciscoD) 2013-07-28 05:52:07 EDT
(In reply to Christoph Wickert from comment #2)
> I can confirm this behavior, however I don't know if it ever was supposed to
> work this way. What makes you think it was? Did I overlook something in the
> docs or on the website?

The CLI has worked properly until 1.1.5. The man page even has a section that goes "CLI EXAMPLES", and so does "parcellite -h".
Comment 4 Christoph Wickert 2013-07-28 06:43:20 EDT
Thanks for the pointer. I've forwarded your report to the upstream developers at 
https://sourceforge.net/p/parcellite/bugs/99/
Comment 5 rickyrockrat 2013-07-29 11:02:28 EDT
This is the upstream dev.
Can you please post the output of this command:
set|grep XDG
Also, what window manager are you running? (LXDE/XFCE/GNOME/KDE, etc?)
Thanks.
Comment 6 Christoph Wickert 2013-07-29 13:10:33 EDT
Thanks for taking care of this.

$ set|grep XDG
XDG_CONFIG_DIRS=/etc/xdg
XDG_DATA_DIRS=/usr/local/share:/usr/share
XDG_MENU_PREFIX=xfce-
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_ID=1
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_VTNR=1

As you can see from the menu prefix, I am running Xfce. Not sure what Ankur uses.
Comment 7 rickyrockrat 2013-07-29 18:06:02 EDT
I suspect the XDG variables are not being set, which will break some things.
https://bugzilla.redhat.com/show_bug.cgi?id=465852

So you don't have XDG_SESSION_COOKIE set?

Please try the SVN version 426 - it checks DISPLAY and XDG_SEAT.
Comment 8 Ankur Sinha (FranciscoD) 2013-07-29 21:22:38 EDT
Hi,

$ set | egrep XDG
XDG_MENU_PREFIX=gnome-
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SESSION_ID=1
XDG_VTNR=1

I'm on Gnome3. I've downgraded to 1.1.4 for the time being, and it seems to be working just fine. 

Thanks for looking into this,
Warm regards,
Ankur
Comment 9 rickyrockrat 2013-07-29 23:18:28 EDT
Ankur, can you build from SVN?
The steps below should work.

svn co https://svn.code.sf.net/p/parcellite/code/trunk parcellite
cd parcellite
./autogen.sh
./configure
make
echo Test |src/parcellite

Then report back here your results.

You will need the build basics,  pkg-config and libgtk2.0-dev. 

I've not run Fedora since Fedora 3 (though I did start with RedHat 5.1), so perhaps Christoph can help with the packages needed to build.

Thanks.
Comment 10 Ankur Sinha (FranciscoD) 2013-07-30 00:34:03 EDT
Created attachment 780326 [details]
File with entire output

I don't think the svn commit worked either. 

Please note that I applied this patch before building: http://pkgs.fedoraproject.org/cgit/parcellite.git/tree/parcellite-1.1.5-de.po.patch

I just re-read the man page, and it mentions a `parcellite -d` command for daemonizing parcellite. I don't think this is working either. I currently use the fedora default method, which is an xdg autostart file, and it doesn't appear to use the `-d` option either. 

As you'll see at the end of the output, `parcellite -c` didn't work either. This is also working with 1.1.4:

[asinha@localhost  parcellite]$ parcellite -c #after clearing history completely

parcellite found
CLI fifo 6 PRI fifo 5
Using cli fifo for write
writing ''
[asinha@localhost  parcellite]$ echo "test" | parcellite
parcellite found
CLI fifo 6 PRI fifo 5
Using cli fifo for write
writing 'test
'
norm 0x1 Waiting on chars
CLI: Got 5 'test
'
[asinha@localhost  parcellite]$ Setting CLI 'test
'

[asinha@localhost  parcellite]$ parcellite -c

parcellite found
CLI fifo 6 PRI fifo 5
Using cli fifo for write
writing ''
test
[asinha@localhost  parcellite]$ 


Thanks, 
Warm regards,
Ankur
Comment 11 rickyrockrat 2013-07-30 11:19:35 EDT
Ankur,
Please get the latest SVN. This should work now.

Go to the parcellite directory and do:
svn up
make
echo Test | src/parcellite

parcellite -d doesn't really have an effect. I need to take it out of documentation.
Thanks
Comment 12 rickyrockrat 2013-07-30 11:50:48 EDT
Actually, Daemon mode just restores clipboard contents if it is lost. It does nothing else, no clipboard history, no clipboard synchronization or anything. It just sits there and checks to see if either clipboard becomes empty.
Comment 13 Ankur Sinha (FranciscoD) 2013-07-30 21:49:02 EDT
(In reply to rickyrockrat from comment #11)
> Ankur,
> Please get the latest SVN. This should work now.
> 
> Go to the parcellite directory and do:
> svn up
> make
> echo Test | src/parcellite
> 

[asinha@localhost  parcellite]$ ls
ABOUT-NLS       build-debpkg.sh  config.log     configure.ac  doc                  intltool-merge      Makefile     po          rel.sh          _svnversion_test
aclocal.m4      ChangeLog        config.rpath   COPYING       INSTALL              intltool-merge.in   Makefile.am  README      src             TODO
AUTHORS         config.guess     config.status  data          install-sh           intltool-update     Makefile.in  rel.common  stamp-h1        uninstall-pre-0.5.py
autogen.sh      config.h         config.sub     deb           intltool-extract     intltool-update.in  missing      rel.deb.sh  svnversion.log
autom4te.cache  config.h.in      configure      depcomp       intltool-extract.in  m4                  NEWS         rel.ppa.sh  svnversion.sh
[asinha@localhost  parcellite]$ ls src/
attr_list.c  daemon.c  eggaccelerators.c  history.c  keybinder.c  main.c  Makefile     parcellite         preferences.c  utils.c
attr_list.h  daemon.h  eggaccelerators.h  history.h  keybinder.h  main.h  Makefile.am  parcellite.h       preferences.h  utils.h
attr_list.o  daemon.o  eggaccelerators.o  history.o  keybinder.o  main.o  Makefile.in  parcellite-i18n.h  preferences.o  utils.o
[asinha@localhost  parcellite]$ ./src/parcellite &
[1] 17584
[asinha@localhost  parcellite]$ ps aux | egrep parcellite
asinha   17584  1.2  0.2 456276  9596 pts/8    Sl   11:45   0:00 ./src/parcellite
asinha   17623  0.0  0.0 108032   860 pts/8    S+   11:45   0:00 egrep --color=auto parcellite
[asinha@localhost  parcellite]$ echo -n "test"  | ./src/parcellite
[asinha@localhost  parcellite]$ ./src/parcellite -c

[asinha@localhost  parcellite]$ kill 17584
[1]+  Terminated              ./src/parcellite
[asinha@localhost  parcellite]$ ./src/parcellite

afadf
^C



Hrm. Still doesn't seem to take input from the pipe correctly. Am I testing it right?

Thanks,
Warm regards,
Ankur
Comment 14 Ankur Sinha (FranciscoD) 2013-07-30 21:50:34 EDT
(In reply to rickyrockrat from comment #12)
> Actually, Daemon mode just restores clipboard contents if it is lost. It
> does nothing else, no clipboard history, no clipboard synchronization or
> anything. It just sits there and checks to see if either clipboard becomes
> empty.

Ah. Ok. I assumed it's supposed to work like a Unix daemon (http://en.wikipedia.org/wiki/Daemon_(computing)) with the -d option. So, to get parcellite running, you have to run `parcellite &` to push it to the background then (Otherwise it waits for input and one must ^C to get out)?
Comment 15 rickyrockrat 2013-07-31 12:09:24 EDT
Ankur,
That is correct. Did the SVN fix the problem for you? If so, I will release 1.1.6, since this will effect many users.

Thanks.
Comment 16 Ankur Sinha (FranciscoD) 2013-07-31 21:47:34 EDT
(In reply to rickyrockrat from comment #15)
> Ankur,
> That is correct. Did the SVN fix the problem for you? If so, I will release
> 1.1.6, since this will effect many users.
> 
> Thanks.

SVN revision 434 seems to fix the piping issue. 

****

[asinha@localhost  parcellite]$ echo "yay" | src/parcellite
test
[asinha@localhost  parcellite]$ ./src/parcellite -c

yay
[asinha@localhost  parcellite]$

***

The -c option works again. The -d option still doesn't "daemonify", but I guess it isn't supposed to. Can you get rid of it altogether (from the docs as well) if it isn't serving any purpose?


Thanks for looking into this, and the quick fix.
Warm regards,
Ankur
Comment 17 Fedora Update System 2013-08-04 14:21:34 EDT
parcellite-1.1.6-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/parcellite-1.1.6-1.fc19
Comment 18 Fedora Update System 2013-08-04 14:22:56 EDT
parcellite-1.1.6-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/parcellite-1.1.6-1.fc18
Comment 19 Christoph Wickert 2013-08-04 14:27:00 EDT
Ok, I can confirm this is fixed now, Thanks rickyrockrat for helping out here!

Ankur, feel free to give karma to the update to get it into stable sooner.
Comment 20 Ankur Sinha (FranciscoD) 2013-08-04 17:55:51 EDT
(In reply to Christoph Wickert from comment #19)
> Ok, I can confirm this is fixed now, Thanks rickyrockrat for helping out
> here!
> 
> Ankur, feel free to give karma to the update to get it into stable sooner.

Karma given. Thank you rockyrockrat and Christoph for the quick fix. 

Warm regards,
Ankur
Comment 21 Fedora Update System 2013-08-05 20:11:34 EDT
Package parcellite-1.1.6-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing parcellite-1.1.6-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-14246/parcellite-1.1.6-1.fc19
then log in and leave karma (feedback).
Comment 22 Fedora Update System 2013-08-14 22:41:07 EDT
parcellite-1.1.6-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 23 Fedora Update System 2013-08-14 22:42:45 EDT
parcellite-1.1.6-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.