[maemo-users] Re: IT2005 - need help creating [Desktop Entry] to launch osso-xterm with parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here's what I've done on IT2006:

Create or add to /home/user/.shrc:

-----
if [ -n "$CMD" ]; then
    $CMD
    sleep 2
    exit
fi 
-----

Then create /home/user/bin/cmdline:

-----
#/bin/sh
if [ -f /tmp/agent ]; then
    . /tmp/agent
fi
export ENV=$HOME/.shrc
CMD="$*" exec /usr/bin/osso-xterm
-----

and make it executable:

chmod +x /home/user/bin/cmdline

Now for the .desktop file (/usr/share/applications/hildon/homessh.desktop):

-----
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Home
Comment=Terminal Emulator
Exec=/home/user/bin/cmdline /home/user/bin/homessh
Icon=terminal
Terminal=false
Type=Application
Categories=System;TerminalEmulator;
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable
-----

and, finally, the actual ssh script (/home/user/bin/homessh):

-----
#!/bin/sh

ssh username at home.yourdomain.com
-----

don't forget to make it executable:

chmod +x /home/user/bin/homessh

I also use this mechanism to launch ssh-agent so I don't have to keep
typing in passwords.

/usr/share/applications/hildon/agent.desktop:

-----
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Agent
Comment=Terminal Emulator
Exec=/home/user/bin/cmdline /home/user/bin/agent
Icon=terminal
Terminal=false
Type=Application
Categories=System;TerminalEmulator;
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable
-----

and /home/user/bin/agent:

-----
#!/bin/sh
ssh-agent >/tmp/agent
. /tmp/agent
ssh-add
-----

-Greg



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Big List of Linux Books]    

  Powered by Linux