Results 1 to 4 of 4

Thread: Konsole output goes where??

  1. #1
    Junior Member
    Join Date
    Jul 2004
    Location
    Kentucky, USA
    Posts
    4

    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.

  2. #2
    Junior Member
    Join Date
    Jul 2004
    Location
    Kentucky, USA
    Posts
    4

    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.

  3. #3
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    Long Island, NY USA
    Posts
    1,510
    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

  4. #4
    Senior Member registered user
    Join Date
    Mar 2004
    Location
    Berlin
    Posts
    436

    Re: It works in DOS

    Quote 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:
    Code:
    g++ foo.cc -o foo
    you start the program with
    Code:
    ./foo
    , 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

  1. rxvt spawns konsole after 3.6 --why?
    By My_old_email_is_gone in forum General Support
    Replies: 1
    Last Post: 09-15-2005, 05:49 PM
  2. problems with imwheel and acroread, gv, konsole
    By pau in forum General Support
    Replies: 0
    Last Post: 03-15-2004, 04:46 PM
  3. /etc/profile won't execute xterm or konsole
    By markgilmore1 in forum General Support
    Replies: 1
    Last Post: 02-25-2004, 04:24 PM
  4. KONSOLE QUESTION
    By pigface in forum General Support
    Replies: 3
    Last Post: 09-23-2003, 01:01 PM
  5. Keyboard signals, xawtv/radio, xterm, & konsole
    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
  •  


AMD Ryzen 7 5800X3D 8-Core 3.4GHz Socket AM4 CPU Processor 100-000000651 picture

AMD Ryzen 7 5800X3D 8-Core 3.4GHz Socket AM4 CPU Processor 100-000000651

$299.99



Intel Xeon Gold 6248R 3.0GHz 24-Core SRGZG 35.75MB LGA3647 Server CPU Processor picture

Intel Xeon Gold 6248R 3.0GHz 24-Core SRGZG 35.75MB LGA3647 Server CPU Processor

$225.00



Intel core i7-4790K CPU picture

Intel core i7-4790K CPU

$55.00



AMD Ryzen 7 5800X Desktop Processor (4.7GHz, 8 Cores, Socket AM4) picture

AMD Ryzen 7 5800X Desktop Processor (4.7GHz, 8 Cores, Socket AM4)

$172.00



Intel i7-8700 Coffee Lake 3.2GHz 6-Core Max Turbo 4.6GHz Processor picture

Intel i7-8700 Coffee Lake 3.2GHz 6-Core Max Turbo 4.6GHz Processor

$69.99



Intel 4th Gen Core i7-4790 SR1QF 3.60GHz (Turbo 4.00GHz) 8M 4-Core LGA-1150 CPU picture

Intel 4th Gen Core i7-4790 SR1QF 3.60GHz (Turbo 4.00GHz) 8M 4-Core LGA-1150 CPU

$39.99



Intel Core i7-7700T 2.9GHz 8MB Socket LGA1151 Quad Core Processor SR339 picture

Intel Core i7-7700T 2.9GHz 8MB Socket LGA1151 Quad Core Processor SR339

$39.99



Intel Core i7-9700 SRG13  3.0 GHz  Desktop CPU picture

Intel Core i7-9700 SRG13 3.0 GHz Desktop CPU

$80.00



Corsair RM750e 750W Fully Modular 80 Plus Gold ATX 3.1 PSU Certified Refurbished picture

Corsair RM750e 750W Fully Modular 80 Plus Gold ATX 3.1 PSU Certified Refurbished

$44.99



Intel Core i7-9700 3.0 GHz 8 Core Processor picture

Intel Core i7-9700 3.0 GHz 8 Core Processor

$85.00