LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-10-2007, 09:06 AM   #1
Bedanc
LQ Newbie
 
Registered: Jan 2007
Posts: 2

Rep: Reputation: 0
Running console app from desktop shortcut


My xHarbour executable runs fine in standard linux console with ibm852 encoding, when I run it manualy, opening terminal, selecting Session, New Linux Console, ...etc.

Now I created a shortcut on desktop (link to application), which runs a shell and my application, but not in standard console (but in a default shell ?) and with wrong encoding.

How should I set up the shortcut to run executable in standard linux console? I am using Fedora Core 6. Thank you!

Bedanc
 
Old 03-11-2007, 08:25 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
The details may be slightly different depending on what window manager you are running and what terminal emulator you use. I am using KDE for my window manager and I use Konsole as my terminal emulator. This example will create a desktop icon to run the top program in a terminal window directly from a desktop icon.

First create a desktop shortcut pointing to the terminal emulator that you want to use. In KDE you would position the mouse pointer anywhere on the desktop and press the right mouse button. A menu will appear. You select Create New -> Link to Application. A window will appear.

There is a box with the text "Link to Application". Change that text to whatever title you want the desktop shortcut to have. In this case I would enter "top".

Click on the icon in the same tab. A window will appear showing the available images for the desktop shortcut. Choose whatever image you want the desktop shortcut to have.

Select the "Application" tab.

In the box labeled "Command" enter konsole -e top.

Click the "Ok" button.

You will now have a desktop icon with the image that you chose and the title that you entered in the general tab. When you click on the icon a konsole window will open and it will automatically start running the top program. When you exit the top program the konsole window will close.

If you want to use a different terminal emulator then you will have to look up the method of passing a command argument to that terminal emulator software. In most cases with any Linux software you can enter the command at a command line with the --help argument.
Code:
konsole --help

xterm --help

gnome-terminal --help
Whatever window manager you use will have a very similar, if not exactly the same, procedure to create a desktop shortcut.

The same is true about using a particular environment setting for your terminal emulator. You should be able to open your terminal emulator software, create the settings that you want to use, and save that as either the default settings or as a named profile. Then your desktop shortcut would have whatever argument is required to have those settings restored passed on the command line. The konsole application uses the --profile argument for this. If I had run konsole, created settings that I wanted for the top utility such as fonts, then saved that setting as a session profile named top, I could invoke that with the following command.
Code:
konsole --profile top -e top
This may have been more than you asked for but your question appeared to be asking how to select a specific terminal emulator of your choice and how to select a specific encoding. I hope that I addressed both of these issues clearly.

Last edited by stress_junkie; 03-11-2007 at 08:58 AM.
 
  


Reply

Tags
desktop



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kylix console app not running on suse, but on other distros digidrag Programming 1 08-25-2005 07:53 AM
Problem running console app in X with no terminal (as a desktop shortcut) kornerr Linux - General 1 02-04-2005 12:08 AM
Setting up shortcut to app on desktop aikempshall Slackware 3 06-01-2004 02:46 PM
Desktop shortcut for running programs saurya_s Linux - Software 6 03-19-2004 05:48 PM
running a console app cratos Programming 8 11-06-2003 09:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration