Reply
Thread Tools
Posts: 152 | Thanked: 41 times | Joined on Dec 2009 @ Sydney
#51
Originally Posted by Bec View Post
So how can I launch an app with root privileges eg, emelfm2 directly via the shortcut?

A detailed response much apreciated

tried so far /usr/bin/osso-xterm, sudo, sudo gainroot, emelfm2, -, ' In all imaginable combinations...
http://talk.maemo.org/showthread.php?t=38582&page=8
 
Posts: 35 | Thanked: 2 times | Joined on Dec 2009 @ sweden
#52
Hello, i have managed to get the file to the right place and it shows i apps.
My code looks like this

[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Terminal=true
Name=topx
Exec=/usr/bin/osso-xterm ssh -L 3389:xxx.xxx.1.xxx:3389 root@mydns -p XXXX
Icon=
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable

but the window dissapear and the nothing happens, can someone help med with this, new at this. Iwould like the shortcut to open upp ssh between n900 and home computer. Am i completly offroad?

Last edited by salle74; 2010-01-20 at 12:50.
 
mason's Avatar
Posts: 93 | Thanked: 36 times | Joined on Nov 2009 @ Germany / Mainz
#53
MyDocs is located under /home/user/MyDocs

just open up your shell and copy the file with :

cp /home/user/MyDocs/YourFile.desktop /usr/share/applications/hildon

and beware, linux is CaseSensitive
 
Posts: 152 | Thanked: 41 times | Joined on Dec 2009 @ Sydney
#54
Originally Posted by salle74 View Post
Hello, i have managed to get the file to the right place and it shows i apps.
My code looks like this

[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Terminal=true
Name=topx
Exec=/usr/bin/osso-xterm ssh -L 3389:xxx.xxx.1.xxx:3389 root@mydns -p XXXX
Icon=
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable

but the window dissapear and the nothing happens, can someone help med with this, new at this. Iwould like the shortcut to open upp ssh between n900 and home computer. Am i completly offroad?
osso-xterm only supports one argument.

So your best course of action is:
1. Create /usr/local/bin/ssh-localforward.sh
with contents:
Code:
#!/bin/sh
ssh -L 3389:xxx.xxx.1.xxx:3389 root@mydns -p XXXX
exit 0
2. Make executable:
Code:
chmod 755 /usr/local/bin/ssh-localforward.sh
3. Change:
Code:
Exec=/usr/bin/osso-xterm ssh -L 3389:xxx.xxx.1.xxx:3389 root@mydns -p XXXX
to:
Code:
Exec=/usr/bin/osso-xterm /usr/local/bin/ssh-localforward.sh
 
Posts: 152 | Thanked: 41 times | Joined on Dec 2009 @ Sydney
#55
Originally Posted by paulkoan View Post
Does anyone know why this doesn't work:

Code:
[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Terminal=true
Name=ssh hostname
Exec=/usr/bin/ssh hostname
Icon=
I am thinking that "Terminal=true" means that this command should be executed within an osso-term session in any case.

Yet instead we must do this:

Code:
Terminal=true
Exec=/usr/bin/osso-xterm 'ssh hostname'
What does terminal=true mean then?

Ahh does single quoting the argument to osso-xterm allow more than one argument [inside the quote]?
 
Posts: 35 | Thanked: 2 times | Joined on Dec 2009 @ sweden
#56
Originally Posted by DaveQB View Post
osso-xterm only supports one argument.

So your best course of action is:
1. Create /usr/local/bin/ssh-localforward.sh
with contents:
Code:
#!/bin/sh
ssh -L 3389:xxx.xxx.1.xxx:3389 root@mydns -p XXXX
exit 0
2. Make executable:
Code:
chmod 755 /usr/local/bin/ssh-localforward.sh
3. Change:
Code:
Exec=/usr/bin/osso-xterm ssh -L 3389:xxx.xxx.1.xxx:3389 root@mydns -p XXXX
to:
Code:
Exec=/usr/bin/osso-xterm /usr/local/bin/ssh-localforward.sh
When i launch the icon the terminal says internal fault and closes
I have made a Ssh.sh file in /usr/local/bin and chmod 755, changed the code to:Exec=/usr/bin/osso-xterm /usr/local/bin/Ssh.sh. Whats wrong? The code within Ssh.desktop look like this:
[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Terminal=true
Name=Ssh
Exec=/usr/bin/osso-xterm /usr/local/bin/Ssh.sh
Icon=
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable

Last edited by salle74; 2010-01-21 at 18:00.
 
Posts: 152 | Thanked: 41 times | Joined on Dec 2009 @ Sydney
#57
Originally Posted by salle74 View Post
When i launch the icon the terminal says internal fault and closes
I have made a Ssh.sh file in /usr/local/bin and chmod 755, changed the code to:Exec=/usr/bin/osso-xterm /usr/local/bin/Ssh.sh. Whats wrong? The code within Ssh.desktop look like this:
[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Terminal=true
Name=Ssh
Exec=/usr/bin/osso-xterm /usr/local/bin/Ssh.sh
Icon=
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable

Ok two thing. Try just running the script from an already open Xterm. Just run type in:

Code:
/usr/local/bin/Ssh.sh
If that works then double check your desktop file, keeping in mind Linux is case sensitive. So make sure its /usr/local/bin/Ssh.sh and not /usr/local/bin/ssh.sh

Take screenshots and put here if you are still stuck.

Last edited by DaveQB; 2010-01-21 at 21:36. Reason: typo
 
Posts: 35 | Thanked: 2 times | Joined on Dec 2009 @ sweden
#58
Managed to get it up and running using this tip

http://talk.maemo.org/showpost.php?p...6&postcount=15


Will try to get it into a script later this weekend
Thanks for the help.

Last edited by salle74; 2010-01-22 at 06:20.
 
Posts: 6 | Thanked: 0 times | Joined on Oct 2009
#59
OK, I have created a desktop icon that launches an application (actually a Qt application). The problem, is eventhough it launches OK, when I switch to another app, like web browser or such, my Qt app automatically closes - it doesn't show up or remain on the open apps window like Xterm, webbrowser or other apps do. Is there some special priority or something that must be set to keep a user created app alive?
 
Reflektorfalke's Avatar
Posts: 597 | Thanked: 490 times | Joined on Dec 2009 @ Germany
#60
Originally Posted by mgreene View Post
OK, I have created a desktop icon that launches an application (actually a Qt application). The problem, is eventhough it launches OK, when I switch to another app, like web browser or such, my Qt app automatically closes - it doesn't show up or remain on the open apps window like Xterm, webbrowser or other apps do. Is there some special priority or something that must be set to keep a user created app alive?
Not the big Unix-freak here, but maybe you want to try to run your command with "nohup" ???

Stumbled across this option while looking for a way to launch an application (mediaplayer in my case) in the background/minimized.
Adding a "&" should normally do that, but it didnīt work...
 
Reply

Tags
odod eht oollol

Thread Tools

 
Forum Jump


All times are GMT. The time now is 05:03.