-
Konsole output goes where??
I have been working all day to run a simple "Hello, World\n" program with g++. First of all: why are there so many different windows? i.e. shell, Linux console, root console, screen session -- they all appear the same to me at this point. Secondly: I will be damned if I can figure out where std::cout << "Hello, World\n"; goes. What little knowledge I have of C++ has been gained in an IDE, so I am new to Linux, C++, and Konsole
Would someone please help me get started with Konsole? Thanks.
-
It works in DOS
The program has compiled fine to the same directory as the souce .cpp. In DOS you type the name of the directory where the code compiled, and it runs the program. This does not seem to be the case with Konsole. The code has compiled, but I can't get it to run.
-
Senior Member
registered user
It seems as though you may have complied a executable but have not changed the permissions of the file to BE executable. In linux & unix, a file needs to be allowed to run before it can be run. This would be the same as me handing you a memo of tasks to complete and you would be unable to performs those tasks until I gave you permission.
At the command line you can change the file permissions uising the chmod command.
chmod 700 somefilename
I have found a guide to file permissions here http://www.linuxlookup.com/html/guides/chmod-chown.html . Please note in the guide where they geive us both good and bad examples of file permissions. I hope this helps you.
James
-
Senior Member
registered user
Re: It works in DOS

Originally Posted by
DougE
In DOS you type the name of the directory where the code compiled, and it runs the program.
That's only true in the seldom case, when the name of the directory matches the name of the binary executable.
If you compile your program like this:
you start the program with , because normally the current directory isn't in your PATH.
You may modify your .bashrc to change this
Code:
export PATH=.:$PATH
I never had to make my compiled files executable with 'chmod' - the linker does it automatically.
And the output goes depending on the terminal, where it was started.
If you start it on tty4, the output is on tty4, if you start it in a xconsole, the output is in the xconsole...
Similar Threads
-
By My_old_email_is_gone in forum General Support
Replies: 1
Last Post: 09-15-2005, 05:49 PM
-
By pau in forum General Support
Replies: 0
Last Post: 03-15-2004, 04:46 PM
-
By markgilmore1 in forum General Support
Replies: 1
Last Post: 02-25-2004, 04:24 PM
-
By pigface in forum General Support
Replies: 3
Last Post: 09-23-2003, 01:01 PM
-
By beforewisdom in forum Hdd Install / Debian / Apt
Replies: 0
Last Post: 06-22-2003, 01:55 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Acer Aspire 14" AI Copilot+PC Laptop Core Ultra 5 226V Gen 4 ARC 16GB 1TB Refurb
$484.37

Dell Latitude 14" Laptop Computer Intel i5 Up To 32GB RAM 1TB SSD Windows 11 Pro
$372.48

1TB SanDisk Extreme Portable SSD (Recertified) - A196-SDSSDE61-1T00
$150.99

Dell ST91000640SS 1TB 2.5" 6Gb/s 64MB 7.2K RPM SAS Hard Drive Dell P/N: 0VXTPX
$16.99

Acer Predator Helios Neo 16S AI 16" i9 275HX 2S RTX 5070 Ti 32GB 1TB SSD Refurb
$1775.56

SAMSUNG T7 Portable SSD 1TB Indigo Blue USB 3.2 Gen2 External MU-PC1T0H/AM
$159.99

Acer Aspire 3 15.6" Ryzen 5 7520U 7000 Ser 16GB 1TB SSD Radeon Graphics Refurb
$385.61

HP Windows 11 Mini Desktop PC up to i7, 32GB RAM, 1TB NVMe SSD, Built-In WiFi
$182.00

Sandisk Optimus Gxpro 850p 1tb
$199.99

2026 NEW SGIN 15.6" Laptop Win11 Intel i3 16GB RAM 1TB SSD Wi-Fi 6 RJ45 USB-C
$302.99