You are not logged in.

#1 2019-01-01 15:21

souperman
Member
Registered: 2019-01-01
Posts: 21

[solved] Service [package].desktop is malformatted.??

Greetings!
As I try to run the .desktop file of Tor browser as downloaded from Tor webpage, an error pops up saying "Service '/home/user/Downloads/tor-browser_en-US/start-tor-browser.desktop' is malformatted." Now this file runs just fine in every other debian-based distros I've tried (ubuntu, antix, mx linux, bunsen labs, crunchbang ++), but not on this. Any suggestion to solve this is highly appreciated.
Thanks.

Last edited by souperman (2019-01-13 04:22)

Offline

#2 2019-01-01 16:34

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,518
Website

Re: [solved] Service [package].desktop is malformatted.??

Could you post the contents of the .desktop file?

Offline

#3 2019-01-01 16:55

souperman
Member
Registered: 2019-01-01
Posts: 21

Re: [solved] Service [package].desktop is malformatted.??

Thanks Dai_trying for replying so soon! Well Properties--->Contents say that it is a plain text document. I just want to add that, when I copy the command from Properties-->Application-->Command and paste it in terminal, it works.

Offline

#4 2019-01-01 18:27

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,518
Website

Re: [solved] Service [package].desktop is malformatted.??

Yes, .desktop files are simple text, they contain some instructions/config options to run a command from the desktop (or a menu), they must also follow the desktop entry specification which I'm guessing is not the case for your file.

Offline

#5 2019-01-02 05:14

souperman
Member
Registered: 2019-01-01
Posts: 21

Re: [solved] Service [package].desktop is malformatted.??

I've inserted the desktop file and you can see it conforms to the 'desktop entry specifications'.

Last edited by souperman (2019-01-02 05:18)


Attachments:
png Tor.png, Size: 119.45 KiB, Downloads: 23

Offline

#6 2019-01-02 10:21

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,518
Website

Re: [solved] Service [package].desktop is malformatted.??

You actually inserted a picture of your .desktop file, the actual file would have been better, I might be able to copy it but the Exec line seems (to me) to be overly complicated and may be causing a problem but I could not test it without having to use my own interpretation of a graphic, I will download tor in a VM later today to see what happens.

Offline

#7 2019-01-02 10:45

souperman
Member
Registered: 2019-01-01
Posts: 21

Re: [solved] Service [package].desktop is malformatted.??

Oh! Sorry! Here it is. And you need to open this in a TDE session, in order to know. Because, it works in my MATE session but not in TDE.

Last edited by souperman (2019-01-02 10:49)


Attachments:
desktop start-tor-browser.desktop, Size: 1.77 KiB, Downloads: 39

Offline

#8 2019-01-02 13:34

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,518
Website

Re: [solved] Service [package].desktop is malformatted.??

I found a way to make it work was to direct the .desktop file to the start-tor-browser.desktop file, so the .desktop file that resides on the Desktop would contain this:-

[Desktop Entry]
Type=Application
Name=My Tor Browser
GenericName=Web Browser
Comment=Tor Browser is +1 for privacy and -1 for mass surveillance
Categories=Network;WebBrowser;Security;
Exec='/home/user/tor-browser_en-US/Browser/start-tor-browser'
X-TorBrowser-ExecShell=./Browser/start-tor-browser --detach
Icon=/home/user/tor-browser_en-US/Browser/browser/chrome/icons/default/default128.png
StartupWMClass=Tor Browser

double clicking the original file in the tor folder will still result in the malformed error message so this is more of a workaround than a solution but it would give you a correct working .desktop file on your Desktop.

HTH

Offline

#9 2019-01-03 11:38

souperman
Member
Registered: 2019-01-01
Posts: 21

Re: [solved] Service [package].desktop is malformatted.??

It's working! Just like it should!! Thank you very much, Dai_trying. And I should say even though it's a workaround, it feels more like a solution. Although, I wonder what would happen if I change the original file's exec line? Anyway, thank you very much, again.

Offline

#10 2019-01-03 12:09

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,518
Website

Re: [solved] Service [package].desktop is malformatted.??

You can experiment with the original file by first making a copy with a different name (as a backup)

cp ~/tor-browser_en-US/start-tor-browser.desktop ~/tor-browser_en-US/backup_start-tor-browser.desktop

and then editing the original. If you encounter any problems with your modifications you could simply copy the backup file back over the modified one.

cp ~/tor-browser_en-US/backup_start-tor-browser.desktop ~/tor-browser_en-US/start-tor-browser.desktop

Any changes you save to the original .desktop file (/home/user/tor-browser_en-US/start-tor-browser.desktop) will be immediately implemented from the Desktop launcher as it launches the original .desktop file.

Offline

#11 2019-01-12 18:29

souperman
Member
Registered: 2019-01-01
Posts: 21

Re: [solved] Service [package].desktop is malformatted.??

Update: Regarding modification to the original file.

So, as I modified the Exec line in original file to

'/home/user/tor-browser_en-US/Browser/start-tor-browser'

Tor opens up fine, no errors. But, here's the catch; upon closing the open window and trying to open the file again, the same errors pops up (i.e. start-tor...malformatted). And upon checking the Exec line I see that the file has undone all the changes.

This is not important (my issue has been solved), but I thought you would like to know about what happens upon modifying the original file.
Thanks again, for all those times you've helped!

Last edited by souperman (2019-01-12 18:33)

Offline

#12 2019-01-12 20:02

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,518
Website

Re: [solved] Service [package].desktop is malformatted.??

This is expected behaviour, if you look in the file /home/user/tor-browser_en-US/Browser/start-tor-browser (line 239-244) it checks and replaces the Exec line with the correct line according to the developers, obviously if you want to prevent this (not advised as there is likely a reason for it) you could simply comment out that section.

Offline

#13 2019-01-13 06:01

souperman
Member
Registered: 2019-01-01
Posts: 21

Re: [solved] Service [package].desktop is malformatted.??

Aha! So, that's how! Nah, I will leave the guy alone, not uncomment it. Thanks Dai, I would have, obviously, never found it out myself. Thanks!!

Offline

#14 2019-01-13 09:22

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,518
Website

Re: [solved] Service [package].desktop is malformatted.??

You're welcome smile

Offline

Board footer

Powered by FluxBB