Latest update = can't run scripts anymore from desktop

Forum rules
Before you post please read this

Latest update = can't run scripts anymore from desktop

Postby igor83 on Sat Jan 19, 2013 2:12 am

After the latest update (backport) for Linux Mint Mate (13, I think), I can't launch scripts from the desktop. chmod +x regen.sh has been performed, but nothing happens when I click on the launcher. And trying to launch "sudo ~/regen.sh" doesn't work either, nor does "bash ~/regen.sh" or "terminal ~/regen.sh".

No error messages, nothing, but clicking on the launcher, nothing at all happens...

The exact same script works without any difficulty whatsoever in Linux Mint Nadia KDE.

If I create a Launcher that tries to run Application within terminal, I get an error message about Xterm and a child process which I do not understand.

Mate overall has given me more difficulty than KDE and Xfce. With Xfce or KDE, if something arises it's usually something I can google and figure out. With Mate, I don't see anything about this via google searches. It is just one of those Mate things. And I have seen some hits on Xterm and the child process, but the proposed fix didn't work for changing xterm to gnome-terminal.
My desktop runs 64-bit Kubuntu 13.04, my htpc runs 64-bit Linux Mint Nadia Xfce, my answering machine runs 64-bit windows 7, and my laptop runs 64-bit Linux Mint Nadia KDE. Each seems suited to its purpose.
Image
User avatar
igor83
Level 4
Level 4
 
Posts: 317
Joined: Wed Aug 08, 2012 8:23 pm

Linux Mint is funded by ads and donations.
 

Re: Latest update = can't run scripts anymore from desktop

Postby bjornmu on Sat Jan 19, 2013 3:11 am

Maybe something in the script that doesn't work after downgrading, or is *any* script affected? It might help if you post at least the top of the script here.
User avatar
bjornmu
Level 3
Level 3
 
Posts: 159
Joined: Wed Dec 19, 2012 2:50 am
Location: Trondheim, Norway

Re: Latest update = can't run scripts anymore from desktop

Postby xenopeek on Sat Jan 19, 2013 7:31 am

And to be clear, when you write "I can't launch scripts from the desktop," do you mean you can't launch any scripts, or only scripts located on your desktop?
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14987
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Latest update = can't run scripts anymore from desktop

Postby igor83 on Sat Jan 19, 2013 3:43 pm

xenopeek wrote:And to be clear, when you write "I can't launch scripts from the desktop," do you mean you can't launch any scripts, or only scripts located on your desktop?


My post was a bit unclear, I must admit; thanks for replying anyway. I wrote it late at night after pulling my hair out. :)

What puzzles me is that I've set up a launcher on my desktop's KDE environ, and it works fine. Trying to get a launcher working on my laptop's MATE environ has proved challenging. However, if I open a terminal in Mate, I can run regen.sh without difficulty. That's what is confusing, that the script seems ok. It runs in KDE from the GUI, and it runs in Mate only from a terminal, but not from the GUI's launcher. Clicking on the launcher does nothing.

In Mate, I have set up a launcher icon to run an Application, /home/igor/games/regenforlinux/regen.sh. Permissions on this launcher do permit executing the file as a program. The script, regen.sh, has been chmod +x'ed so that it can execute. Its security is as follows (output of ls -l command):

Code: Select all
-rwxrwxrwx 1 igor igor 7176 Jan 19 00:37 regen.sh


I don't wish to post the content of regen.sh here as doing so would create a duplicate search engine result. Its content is already online here, in both a .zip file and posted in plain text in a little box.

My guess is there is a security consideration I've overlooked, but I can't think what it may be. Security in Linux is still something of a gray area for me. I've tried adding sudo as a prefix in the launcher, as well as mate-terminal; the former asks for the root password and does nothing, and the latter does not seem to work.
My desktop runs 64-bit Kubuntu 13.04, my htpc runs 64-bit Linux Mint Nadia Xfce, my answering machine runs 64-bit windows 7, and my laptop runs 64-bit Linux Mint Nadia KDE. Each seems suited to its purpose.
Image
User avatar
igor83
Level 4
Level 4
 
Posts: 317
Joined: Wed Aug 08, 2012 8:23 pm

Re: Latest update = can't run scripts anymore from desktop

Postby bjornmu on Sat Jan 19, 2013 4:03 pm

OK here's a trick I often use when I want to check if something is actually run: replace it with something that breaks or does something traceable.

For example, you can try replacing regen.sh with something like this:
Code: Select all
#!/bin/sh
echo "Kilroy was here" > /tmp/fromregen


Then try running the script from the GUI. If it writes to /tmp/fromregen, then you know that the script could be started. It won't tell you what the problem is, but help narrow down where the is.
User avatar
bjornmu
Level 3
Level 3
 
Posts: 159
Joined: Wed Dec 19, 2012 2:50 am
Location: Trondheim, Norway

Re: Latest update = can't run scripts anymore from desktop

Postby xenopeek on Sat Jan 19, 2013 5:03 pm

I downloaded the file you linked to, extracted the Linux folder as-is and didn't change any file permissions. Then I added a new Application launcher to the panel on Linux Mint 13 MATE, and for the command browsed to the location of the regen.sh and picked that. At the top of the regen.sh I something similar as bjornmu has shown, writing a file to my desktop instead. Then I launched it, and it successfully created the file so the script is indeed run.

I'm not sure what could be wrong here :(
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14987
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Latest update = can't run scripts anymore from desktop

Postby igor83 on Sun Jan 20, 2013 7:40 pm

xenopeek wrote:I downloaded the file you linked to, extracted the Linux folder as-is and didn't change any file permissions. Then I added a new Application launcher to the panel on Linux Mint 13 MATE, and for the command browsed to the location of the regen.sh and picked that. At the top of the regen.sh I something similar as bjornmu has shown, writing a file to my desktop instead. Then I launched it, and it successfully created the file so the script is indeed run.

I'm not sure what could be wrong here :(


I created simple.sh, composed of:

$ cat simple.sh
Code: Select all
    #!/bin/sh
    echo "Kilroy was here" > /tmp/fromregen
    sleep 8


I right-click on the desktop, create a launcher, added simple.sh as an Application (after chmod +x) and it won't execute. Nothing happens, actually, when I double-click. I checked /tmp, and the file was not created.

Thanks for your help. I think I'm going to just ignore this problem for the time being; something seems broken in my Mate installation after the latest update. When the next version of Linux Mint comes out, I think I'll install the Xfce flavor on this old laptop of mine. I've had fewer problems with Xfce, and I particularly like Linux Mint's spin, especially for hardware as old as a Thinkpad R60. For the time being, I can simply drop to a Terminal to execute scripts. Old-fashioned, but it works.

It may be advisable not to enable backported updates, at least for the time being, if you happen to launch scripts on a regular basis from your desktop.
My desktop runs 64-bit Kubuntu 13.04, my htpc runs 64-bit Linux Mint Nadia Xfce, my answering machine runs 64-bit windows 7, and my laptop runs 64-bit Linux Mint Nadia KDE. Each seems suited to its purpose.
Image
User avatar
igor83
Level 4
Level 4
 
Posts: 317
Joined: Wed Aug 08, 2012 8:23 pm

Re: Latest update = can't run scripts anymore from desktop

Postby xenopeek on Mon Jan 21, 2013 6:18 am

Did you give the full path to the script to run as the command?
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14987
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Latest update = can't run scripts anymore from desktop

Postby igor83 on Wed Jan 23, 2013 8:08 pm

xenopeek wrote:Did you give the full path to the script to run as the command?


Yes, I know that trick, that Linux requires the full path, whether in a terminal or a desktop launcher.
Full paths for both the test case and regen.sh.

Nothing doing.

However regen.sh works well on my KDE desktop so it's not a biggie. Just means I have to drop to a terminal to execute a script in Linux Mint Maya Mate. I'm planning to reinstall when the next version Linux Mint rolls out. I'm actually leaning more towards KDE at this time because KDE makes life so pleasant. If I need to buy an SSD to speed things up, well then, I will do so... but I doubt that will be necessary.
My desktop runs 64-bit Kubuntu 13.04, my htpc runs 64-bit Linux Mint Nadia Xfce, my answering machine runs 64-bit windows 7, and my laptop runs 64-bit Linux Mint Nadia KDE. Each seems suited to its purpose.
Image
User avatar
igor83
Level 4
Level 4
 
Posts: 317
Joined: Wed Aug 08, 2012 8:23 pm

Re: Latest update = can't run scripts anymore from desktop

Postby HodariUbunifu on Mon Mar 25, 2013 12:03 pm

Hi,
if it is not obsolete: The problem is,that the launcher still coming from Gnome wants to use an xterm 'xterm', where Mate by default provides only the Mate Terminal 'mate-terminal'
As a work around you can install xterm by the software manager.
Myself i'd like more to change the launcher that way, that it uses mate-terminal instead of xterm but haven't figured out yet. Anybody ideas ?
HodariUbunifu
Level 1
Level 1
 
Posts: 2
Joined: Mon Mar 25, 2013 11:50 am

Re: Latest update = can't run scripts anymore from desktop

Postby HodariUbunifu on Mon Mar 25, 2013 12:14 pm

It is solved already.Read here und use the second solution.
viewtopic.php?f=206&t=123062&hilit=launcher+xterm
HodariUbunifu
Level 1
Level 1
 
Posts: 2
Joined: Mon Mar 25, 2013 11:50 am

Re: Latest update = can't run scripts anymore from desktop

Postby igor83 on Mon Mar 25, 2013 2:46 pm

HodariUbunifu wrote:It is solved already.Read here und use the second solution.
viewtopic.php?f=206&t=123062&hilit=launcher+xterm


You may get dinged for resurrecting an old thread, but since it has resumed life, I will observe that I replaced Mate with KDE months ago and like KDE better. I also prefer Xfce where my htpc is concerned, because Xfce gives me just enough functionality for htpc purposes and is indeed fast and extremely fast booting. From the time the BIOS has initialized to when Thunar opens up my video folder is 18 seconds, using a slow, slow 5400 rpm "Green" Western Digital hard drive. I do not see any reason to use OpenElec, since Linux Mint Xfce can serve the same purpose as that distro, although I think OpenElec is intended for low-tech users, not exactly my description.
My desktop runs 64-bit Kubuntu 13.04, my htpc runs 64-bit Linux Mint Nadia Xfce, my answering machine runs 64-bit windows 7, and my laptop runs 64-bit Linux Mint Nadia KDE. Each seems suited to its purpose.
Image
User avatar
igor83
Level 4
Level 4
 
Posts: 317
Joined: Wed Aug 08, 2012 8:23 pm

Linux Mint is funded by ads and donations.
 

Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 3 guests