After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728231 - Can't add startup application, "+" button doesn't respond.
Can't add startup application, "+" button doesn't respond.
Status: RESOLVED FIXED
Product: gnome-tweak-tool
Classification: Applications
Component: general
3.12.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Tweak Tool maintainer(s)
GNOME Tweak Tool maintainer(s)
: 736835 737695 744985 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-04-15 01:09 UTC by Artyom Pertsovsky
Modified: 2015-02-23 11:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
startup: Fix check for running executables (1.07 KB, patch)
2014-09-22 15:02 UTC, Rui Matos
committed Details | Review

Description Artyom Pertsovsky 2014-04-15 01:09:11 UTC
When launching gnome-tweak-tool either from Activities or from Guake terminal, it returns the following error:

Traceback (most recent call last):
  • File "/usr/lib/python2.7/site-packages/gtweak/tweaks/tweak_group_startup.py", line 194 in _on_add_clicked
    set(self._get_running_executables()))
  • File "/usr/lib/python2.7/site-packages/gtweak/tweaks/tweak_group_startup.py", line 210 in _get_running_executables
    os.getlogin(),'-o','cmd'],
OSError: [Errno 2] No such file or directory


However, if called from gnome-terminal it seems OK.

os.getlogin() - doesn't return expected value when called from anywhere outside gnome-terminal.


Running on latest Arch with all packages updated to recent versions. 
As of 15 April, 2014.
Comment 1 Casey 2014-04-18 10:48:57 UTC
This is happening on my system as well.
Archlinux
All updates current as of 4/18/14

From GUI, + button doesn't bring up the add dialog.
Same error reported from guake that the OP posted.

Starting the application from Gnome-terminal works as advertised.
Comment 2 OJK 2014-04-23 17:25:51 UTC
I can confirm this bug as well. Same workaround as mentioned above works.
Comment 3 Franziskus Kiefer 2014-05-12 06:43:41 UTC
os.getlogin() is just the wrong command there I think. A fix was posted in the Arch forum (https://bbs.archlinux.org/viewtopic.php?pid=1414443#p1414443). Using getpass.getuser() or pwd.getpwuid(os.getuid())[0] fixes the problem.
Comment 4 Matthias Clasen 2014-09-12 00:10:03 UTC
screenscraping ps like that looks just altogether wrong to me. I would just remove that code - the 'running' hint is not that important.
Comment 5 Rui Matos 2014-09-22 14:59:50 UTC
*** Bug 736835 has been marked as a duplicate of this bug. ***
Comment 6 Rui Matos 2014-09-22 15:02:02 UTC
Created attachment 286818 [details] [review]
startup: Fix check for running executables

os.getlogin() doesn't work if there's no controlling tty. In fact we
don't need the username here since ps -U accepts UIDs just fine.

--

I agree with Matthias, but anyway, I don't want to change the UI at
this point before 3.14 and this is easy to fix so
Comment 7 Yosef Or Boczko 2014-09-22 15:05:19 UTC
The patch work just fine for me, it fixed the bug. thanks!
Comment 8 Rui Matos 2014-09-29 13:34:32 UTC
Attachment 286818 [details] pushed as 8fc9474 - startup: Fix check for running executables
Comment 9 Michael Catanzaro 2014-10-01 13:13:09 UTC
*** Bug 737695 has been marked as a duplicate of this bug. ***
Comment 10 Rui Matos 2015-02-23 11:01:54 UTC
*** Bug 744985 has been marked as a duplicate of this bug. ***