You are not logged in.

#1 2017-08-29 01:24:47

BubbaRayFett
New Member
Registered: 2017-08-28
Posts: 4

[SOLVED] .desktop file which calls .sh not working from Tint2

So I have installed uCareSystem, which automates my system updates (it comes with LXLE, and I love it, but LXLE doesn't play nice with my Sony laptop).  I've created a .desktop file, which works perfectly whenever I click on it in the file manager.  The .desktop file calls the .sh script.  However, when I click on the icon in my Tint2 launcher bar, it brings up the password box (via gksudo) for me to enter my password, and then closes without opening the terminal window and running.  Here is the .desktop file:

[Desktop Entry]
Type=Application
Name=SystemUpdate
Terminal=true
Comment=uCareSystem 
Exec=gksudo /usr/local/bin/uCareSystem/ucaresystemcore.sh
Icon=/usr/local/bin/uCareSystem/modules/ucaresystemicon.png
X-KeepTerminal=true
Path=/usr/local/bin/uCareSystem

So, I've got no clue what's keeping it from running properly.  Anyone got any ideas?

EDIT: Sorry, forgot to mention it's on 64-bit Deuterium.

Last edited by BubbaRayFett (2017-08-30 01:28:35)

Offline

#2 2017-08-29 01:45:07

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED] .desktop file which calls .sh not working from Tint2

Any useful information in .xsession-errors?

Can you post the tint2rc.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2017-08-29 05:30:01

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: [SOLVED] .desktop file which calls .sh not working from Tint2

^ that.

and: more quotes required?

worst case, a wrapper script should fix things.

Offline

#4 2017-08-29 06:34:24

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] .desktop file which calls .sh not working from Tint2

BubbaRayFett wrote:

I have installed uCareSystem, which automates my system updates

Why not use the system provided by Debian instead?

https://wiki.debian.org/UnattendedUpgrades

That requires no third-party software and has been vetted and approved by the Debian developers, unlike this "uCareSystem" which appears to be designed and intended for Ubuntu-based systems — we are *not* based on Ubuntu so this may cause problems.

Offline

#5 2017-08-29 23:00:25

BubbaRayFett
New Member
Registered: 2017-08-28
Posts: 4

Re: [SOLVED] .desktop file which calls .sh not working from Tint2

damo wrote:

Any useful information in .xsession-errors?

Didn't think to check there.  D'OH!

The program is running, but it isn't opening a terminal; what should be the output in a terminal window is recovered from the clipboard and written into .xsession-errors. 

Xsession: X session started for [user] at Tue Aug 29 17:38:11 CDT 2017
localuser:[user] being added to access control list
export DBUS_SESSION_BUS_ADDRESS='unix:abstract=/tmp/dbus-tESl9roxvW,guid=fa13d5cd1647add2d7a5d82c59a5ecd5'
export DESKTOP_SESSION='lightdm-xsession'
export DISPLAY=':0'
export GDMSESSION='lightdm-xsession'
export HOME='/home/[user]'
export LANG='en_US.UTF-8'
export LOGNAME='[user]'
export PATH='/home/[user]/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games'
export PWD='/home/[user]'
export QT_STYLE_OVERRIDE='GTK+'
export SHELL='/bin/bash'
export SSH_AGENT_PID='782'
export SSH_AUTH_SOCK='/tmp/ssh-w4RLWFEMfAzD/agent.744'
export USER='[user]'
export XAUTHORITY='/home/[user]/.Xauthority'
export XDG_GREETER_DATA_DIR='/var/lib/lightdm/data/[user]'
export XDG_RUNTIME_DIR='/run/user/1000'
export XDG_SEAT='seat0'
export XDG_SEAT_PATH='/org/freedesktop/DisplayManager/Seat0'
export XDG_SESSION_ID='1'
export XDG_SESSION_PATH='/org/freedesktop/DisplayManager/Session0'
export XDG_VTNR='7'
/usr/bin/bl-tint2restart: no tint2 processes found
tint2 : nb monitor 1, nb monitor used 1, nb desktop 1
Loading Faenza-Dark-Bunsen. Icon theme : 'Faenza-Dark-Bunsen', 'Faenza-Bunsen-common', 'Faenza-Dark', 'Faenza', 'gnome', 'hicolor',
launcher.c 215: Using icon /usr/share/icons/Faenza-Bunsen-common/apps/22/system-file-manager.png
launcher.c 215: Using icon /usr/share/icons/Faenza-Bunsen-common/apps/22/utilities-terminal.png
launcher.c 215: Using icon /usr/local/bin/uCareSystem/modules/ucaresystemicon.png
launcher.c 215: Using icon /usr/share/icons/Faenza/apps/22/synaptic.png
launcher.c 215: Using icon /usr/share/icons/hicolor/22x22/apps/flashpeak-slimjet.png
launcher.c 215: Using icon /usr/share/icons/Faenza/apps/22/libreoffice-startcenter.png
Conky: forked to background, pid is 856

Conky: desktop window (93) is root window
Conky: window type - normal
Conky: drawing to created window (0x2200001)
Conky: drawing to double buffer

(nm-applet:861): libnm-glib-CRITICAL **: nm_secret_agent_register: assertion 'priv->registered == FALSE' failed

(openbox:744): GLib-CRITICAL **: Source ID 8 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 146 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 178 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 216 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 219 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 235 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 261 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 280 was not found when attempting to remove it

(xfce4-power-manager-settings:1058): xfce4-power-manager-settings-WARNING **: Schema "apps.light-locker" not found. Not configuring Light Locker.

(openbox:744): GLib-CRITICAL **: Source ID 293 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 334 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 343 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 356 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 443 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 458 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 484 was not found when attempting to remove it

(xfce4-power-manager-settings:1103): xfce4-power-manager-settings-WARNING **: Schema "apps.light-locker" not found. Not configuring Light Locker.

(openbox:744): GLib-CRITICAL **: Source ID 565 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 638 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 664 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 726 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 746 was not found when attempting to remove it
[1445:1521:0829/174249.956854:ERROR:service_manager.cc(425)] InterfaceProviderSpec prevented connection from: content_utility to: content_browser
[1445:1521:0829/174250.013014:ERROR:service_manager.cc(425)] InterfaceProviderSpec prevented connection from: content_utility to: content_browser
[1445:1521:0829/174340.816024:ERROR:service_manager.cc(425)] InterfaceProviderSpec prevented connection from: content_utility to: content_browser
[1445:1521:0829/174500.144071:ERROR:service_manager.cc(425)] InterfaceProviderSpec prevented connection from: content_utility to: content_browser
[1445:1521:0829/174500.191812:ERROR:service_manager.cc(425)] InterfaceProviderSpec prevented connection from: content_utility to: content_browser

(openbox:744): GLib-CRITICAL **: Source ID 781 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 785 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 805 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 899 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 958 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 1010 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 1021 was not found when attempting to remove it

(openbox:744): GLib-CRITICAL **: Source ID 1034 was not found when attempting to remove it
[1445:1521:0829/174847.373722:ERROR:service_manager.cc(425)] InterfaceProviderSpec prevented connection from: content_utility to: content_browser
[1445:1521:0829/174847.389605:ERROR:service_manager.cc(425)] InterfaceProviderSpec prevented connection from: content_utility to: content_browser
[1445:1521:0829/174847.400813:ERROR:service_manager.cc(425)] InterfaceProviderSpec prevented connection from: content_utility to: content_browser
[1445:1521:0829/174847.410429:ERROR:service_manager.cc(425)] InterfaceProviderSpec prevented connection from: content_utility to: content_browser
[1445:1521:0829/174847.419760:ERROR:service_manager.cc(425)] InterfaceProviderSpec prevented connection from: content_utility to: content_browser
[1445:1521:0829/174847.429034:ERROR:service_manager.cc(425)] InterfaceProviderSpec prevented connection from: content_utility to: content_browser
[1445:1521:0829/174847.438145:ERROR:service_manager.cc(425)] InterfaceProviderSpec prevented connection from: content_utility to: content_browser
[1445:1521:0829/174847.447226:ERROR:service_manager.cc(425)] InterfaceProviderSpec prevented connection from: content_utility to: content_browser
[1445:1521:0829/174847.471562:ERROR:service_manager.cc(425)] InterfaceProviderSpec prevented connection from: content_utility to: content_browser
[1445:1521:0829/174847.479723:ERROR:service_manager.cc(425)] InterfaceProviderSpec prevented connection from: content_utility to: content_browser
[1445:1521:0829/174847.486834:ERROR:service_manager.cc(425)] InterfaceProviderSpec prevented connection from: content_utility to: content_browser
[1445:1521:0829/174847.494119:ERROR:service_manager.cc(425)] InterfaceProviderSpec prevented connection from: content_utility to: content_browser
** Message: x-terminal-emulator has very limited support, consider choose another terminal
Clipboard is null, recovering ...
_______________________________________________________
                                                       
            uCareSystem Core v3.0                      
                 ~  ''  ~                              
                                                       
 Welcome to all-in-one System Update and maintenance   
 assistant app.                                        
                                                       
                                                       
 This simple script will automatically         	     
 refresh your packagelist, download and                
 install updates (if there are any), remove any old    
 kernels, obsolete packages and configuration files    
 to free up disk space, without any need of user       
 interference.                    				     
_______________________________________________________

 uCareSystem Core will start in 5 seconds... 
#########################
          Started
#########################

Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Ign http://deb.debian.org jessie InRelease
Get:2 http://deb.debian.org jessie-updates InRelease [145 kB]
Get:3 http://security.debian.org jessie/updates/main amd64 Packages [444 kB]
Hit http://security.debian.org jessie/updates/contrib amd64 Packages
Hit http://pkg.bunsenlabs.org jessie-backports InRelease
Hit http://security.debian.org jessie/updates/non-free amd64 Packages
Hit http://deb.debian.org jessie Release.gpg
Hit http://security.debian.org jessie/updates/contrib Translation-en
Get:4 http://deb.debian.org jessie-updates/main amd64 Packages/DiffIndex [8,392 B]
Get:5 http://security.debian.org jessie/updates/main Translation-en [232 kB]
Get:6 http://pkg.bunsenlabs.org bunsen-hydrogen InRelease [5,153 B]
Hit http://security.debian.org jessie/updates/non-free Translation-en
Hit http://deb.debian.org jessie-updates/contrib amd64 Packages
Hit http://pkg.bunsenlabs.org jessie-backports/main amd64 Packages
Get:7 http://pkg.bunsenlabs.org bunsen-hydrogen/main amd64 Packages [9,935 B]
Get:8 http://deb.debian.org jessie-updates/non-free amd64 Packages/DiffIndex [736 B]
Hit http://deb.debian.org jessie-updates/contrib Translation-en
Get:9 http://deb.debian.org jessie-updates/main Translation-en/DiffIndex [3,196 B]
Get:10 http://deb.debian.org jessie-updates/non-free Translation-en/DiffIndex [736 B]
Hit http://deb.debian.org jessie Release
Hit http://deb.debian.org jessie/main amd64 Packages
Hit http://deb.debian.org jessie/non-free amd64 Packages
Hit http://deb.debian.org jessie/contrib amd64 Packages
Hit http://deb.debian.org jessie/contrib Translation-en
Hit http://deb.debian.org jessie/main Translation-en
Hit http://deb.debian.org jessie/non-free Translation-en
Ign http://pkg.bunsenlabs.org jessie-backports/main Translation-en_US
Ign http://pkg.bunsenlabs.org jessie-backports/main Translation-en
Ign http://pkg.bunsenlabs.org bunsen-hydrogen/main Translation-en_US
Ign http://pkg.bunsenlabs.org bunsen-hydrogen/main Translation-en
Fetched 912 kB in 5s (158 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
2 packages can be upgraded. Run 'apt list --upgradable' to see them.

###############################
Finished updating package lists
###############################
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be upgraded:
  bunsen-os-release bunsen-python-apt-template
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 9,810 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://pkg.bunsenlabs.org/debian/ bunsen-hydrogen/main bunsen-python-apt-template all 8.9-1 [3,344 B]
Get:2 http://pkg.bunsenlabs.org/debian/ bunsen-hydrogen/main bunsen-os-release all 8.9-1 [6,466 B]
Fetched 9,810 B in 1s (9,561 B/s)
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 100867 files and directories currently installed.)
Preparing to unpack .../bunsen-python-apt-template_8.9-1_all.deb ...
Unpacking bunsen-python-apt-template (8.9-1) over (8.7-1) ...
Preparing to unpack .../bunsen-os-release_8.9-1_all.deb ...
Unpacking bunsen-os-release (8.9-1) over (8.7-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up bunsen-python-apt-template (8.9-1) ...
Setting up bunsen-os-release (8.9-1) ...
Installing new version of config file /etc/lsb-release.bunsen ...
Installing new version of config file /etc/os-release.bunsen ...

###############################################
Finished updating packages and system libraries
###############################################

Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

###################################
Finished removing unneeded packages
###################################

No kernels are eligible for removal
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

###################################
Finished removing old kernels
###################################

Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

#####################################
Finished removing unused config files
#####################################

Reading package lists...
Building dependency tree...
Reading state information...

######################################
 Cleaned downloaded temporary packages
######################################

#########################
          Done
#########################

Offline

#6 2017-08-30 01:27:41

BubbaRayFett
New Member
Registered: 2017-08-28
Posts: 4

Re: [SOLVED] .desktop file which calls .sh not working from Tint2

So, I don't know if this is a solution, but it's definitely a workaround.

I went into the .desktop file and modified the line

Exec=gksudo /usr/local/bin/uCareSystem/ucaresystemcore.sh

to read

Exec=x-terminal-emulator -e gksudo /usr/local/bin/uCareSystem/ucaresystemcore.sh

and that does the trick.  It now comes up in a terminal window and runs properly, and the terminal windows closes when the script completes.

Still don't have an answer as to why Tint2 keeps a terminal window from opening, but I'll take working over unknown any day.

Thanks for making me think a little harder and figure this out.

Offline

#7 2017-08-30 01:33:38

BubbaRayFett
New Member
Registered: 2017-08-28
Posts: 4

Re: [SOLVED] .desktop file which calls .sh not working from Tint2

Head_on_a_Stick wrote:

Why not use the system provided by Debian instead?

https://wiki.debian.org/UnattendedUpgrades

That requires no third-party software and has been vetted and approved by the Debian developers, unlike this "uCareSystem" which appears to be designed and intended for Ubuntu-based systems — we are *not* based on Ubuntu so this may cause problems.

I guess it's because I've got control issues.  :-)  It's the same reason I insist on doing Windows updates on the family's systems manually (and one of the reasons I hate the updating in Windows 10).  I want to know what's going to be going on there when it's installed.

Offline

#8 2017-08-30 03:31:35

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,057

Re: [SOLVED] .desktop file which calls .sh not working from Tint2

BubbaRayFett wrote:

So, I don't know if this is a solution, but it's definitely a workaround.

I went into the .desktop file and modified the line

Exec=gksudo /usr/local/bin/uCareSystem/ucaresystemcore.sh

to read

Exec=x-terminal-emulator -e gksudo /usr/local/bin/uCareSystem/ucaresystemcore.sh

and that does the trick.  It now comes up in a terminal window and runs properly, and the terminal windows closes when the script completes.

Still don't have an answer as to why Tint2 keeps a terminal window from opening, but I'll take working over unknown any day.

Thanks for making me think a little harder and figure this out.

It is more by design because you do not necessarily need a window to run a shell script. x-terminal-emulator -e is usually the way I go about invoking terminals programatically. I am not sure why you are invoking gksudo for a a terminal based program, however. I would probably stick with sudo since I am already working in a terminal anyway.

Offline

#9 2017-08-30 05:01:59

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,666
Website

Re: [SOLVED] .desktop file which calls .sh not working from Tint2

tknomanzr wrote:

I am not sure why you are invoking gksudo for a a terminal based program, however. I would probably stick with sudo since I am already working in a terminal anyway.

Good point. The original use of gksudo in the .desktop file suggests the developers expected some kind of GUI to come up.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#10 2017-08-30 07:25:17

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] .desktop file which calls .sh not working from Tint2

BubbaRayFett wrote:
Head_on_a_Stick wrote:

Why not use the system provided by Debian instead?

I guess it's because I've got control issues.  :-)  It's the same reason I insist on doing Windows updates on the family's systems manually (and one of the reasons I hate the updating in Windows 10).  I want to know what's going to be going on there when it's installed.

That makes no sense at all — this ucoresystem package installs a third-party script (written by people completely unconnected to Debian, they could be anybody) that is run as root.

Here is their script:

https://gist.github.com/Head-on-a-Stick … 3c07b62803

I don't have the time to look at it properly but it seems to attempt to clear out old kernel versions (not an issue with Debian stable) and the package cache (again, not an issue with Debian stable) and not much else.

Also, if you have accidentally removed part of a metapackage then the `apt-get -y --purge autoremove` line may in fact uninstall your entire desktop so I really wouldn't advise using it at all...

To keep your BunsenLabs system up to date manually, run these commands regularly:

sudo apt update
sudo apt upgrade

I appreciate that the above procedure is rather complex and automation is thus very tempting but the true control freak would persevere through the hardship, surely?

Offline

#11 2017-08-30 18:55:35

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: [SOLVED] .desktop file which calls .sh not working from Tint2

BubbaRayFett wrote:

I guess it's because I've got control issues.  :-)  It's the same reason I insist on doing (...) manually

i can relate to that.
and that's exactly the reason why i don't use any "update managers" - i like to do it manually.

ergo:
get rid of this ubuntu kiddie script, and learn to use apt.

Offline

#12 2017-09-02 07:54:57

o9000
tint2 developer
From: Network Neighborhood
Registered: 2015-10-24
Posts: 417
Website

Re: [SOLVED] .desktop file which calls .sh not working from Tint2

I created a bug report for this: https://gitlab.com/o9000/tint2/issues/664

Offline

Board footer

Powered by FluxBB