maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   xterminal "top" shortcut (https://talk.maemo.org/showthread.php?t=35858)

DaveQB 2010-01-17 22:53

Re: xterminal "top" shortcut
 
Quote:

Originally Posted by Bec (Post 478528)
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

salle74 2010-01-20 08:53

Re: xterminal "top" shortcut
 
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?

mason 2010-01-20 09:54

Re: xterminal "top" shortcut
 
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 ;)

DaveQB 2010-01-20 22:30

Re: xterminal "top" shortcut
 
Quote:

Originally Posted by salle74 (Post 483791)
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

DaveQB 2010-01-20 23:08

Re: xterminal "top" shortcut
 
Quote:

Originally Posted by paulkoan (Post 474173)
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]?

salle74 2010-01-21 17:55

Re: xterminal "top" shortcut
 
Quote:

Originally Posted by DaveQB (Post 485415)
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

DaveQB 2010-01-21 21:31

Re: xterminal "top" shortcut
 
Quote:

Originally Posted by salle74 (Post 487070)
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.

salle74 2010-01-22 06:14

Re: xterminal "top" shortcut
 
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.

mgreene 2010-02-06 18:46

Re: xterminal "top" shortcut
 
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 2010-02-07 08:36

Re: xterminal "top" shortcut
 
Quote:

Originally Posted by mgreene (Post 513388)
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...


All times are GMT. The time now is 19:34.

vBulletin® Version 3.8.8