David Ljuba
2014-Aug-19 22:23 UTC
[LightDM] groovy gvm tool not initialized in lightdm-session
Hi, Sorry if I am spamming this list but this question is related to lightdm and I am not subscribed to mailing list. It appears that lightdm-session script does not initialize gvm (groovy version manager) tool and then sublime text editor with "groovy build" and SublimeREPL plugin can not be run. Gvm tool is tried to be loaded at the end of ~/.profile with this line: #THIS MUST BE AT THE END OF THE FILE FOR GVM TO WORK!!! ---------> this line is appended by gvm installation [[ -s "/home/david/.gvm/bin/gvm-init.sh" ]] && source "/home/david/.gvm/bin/gvm-init.sh and ~/.profile script is called on the start of lightdm-session script which generates this log: ? ~ lightdm-session Running X session wrapper Loading profile from /etc/profile Loading profile from /home/david/.profile */usr/sbin/lightdm-session: 36: /home/david/.profile: [[: not found* Loading resource: /etc/X11/Xresources/x11-common Loading modmap: /home/david/.Xmodmap ... I first found this error in log: ? ~ cat ~/.xsession-errors /usr/sbin/lightdm-session: 36: /home/david/.profile: [[: not found after some research I found this http://stackoverflow.com/questions/13702425/source-command-not-found-in-sh-shell After changing "shebang" of lightdm-session script (sudo vim /usr/sbin/lightdm-session) from #!/bin/sh to #!/bin/bash error message disappeared and now I can use groovy (installed using gvm tool) from Sublime text editor and Sublime REPL plugin with easy. I have two computers with Ubuntu 14.04 Unity with same problem resolved by shebang correction. Is it possible to fix this problem somehow? David Ljuba -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/lightdm/attachments/20140820/208b9dc7/attachment.html>
Raimund Steger
2014-Aug-20 09:12 UTC
[LightDM] groovy gvm tool not initialized in lightdm-session
On Wed, August 20, 2014 00:23, David Ljuba wrote:> Hi, > Sorry if I am spamming this list but this question is related to lightdm > and I am not subscribed to mailing list. > > It appears that lightdm-session script does not initialize gvm (groovy > version manager) tool and then sublime text editor with "groovy build" > and SublimeREPL plugin can not be run. > > Gvm tool is tried to be loaded at the end of ~/.profile with this line: > > #THIS MUST BE AT THE END OF THE FILE FOR GVM TO WORK!!! ---------> this > line is appended by gvm installation > [[ -s "/home/david/.gvm/bin/gvm-init.sh" ]] && source > "/home/david/.gvm/bin/gvm-init.sh > > and ~/.profile script is called on the start of lightdm-session script > which generates this log: > > ? ~ lightdm-session > Running X session wrapper > Loading profile from /etc/profile > Loading profile from /home/david/.profile > */usr/sbin/lightdm-session: 36: /home/david/.profile: [[: not found*Since .profile is also the initialization file of Bourne shells, I think it's a good idea to use compatible syntax in it. For a simple -s test as in your example, you could probably simply replace [[ ]] with [ ] and "source" with ".". Raimund -- Worringer Str 31 Duesseldorf 40211 DE home: <rs at mytum.de> +49-179-2981632 icq 16845346 work: <rs at interface-ag.de>