Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

awesome: Lua output doesn't flush automatically

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
gitterrost4
n00b
n00b
Posts: 34
Joined: Sun Aug 31, 2008 9:06 am

awesome: Lua output doesn't flush automatically

  • Quote

Post by gitterrost4 » Tue Apr 12, 2011 12:26 am

Hello,
I recently switched to Awesome WM and got one problem.

I would like to be able to view output of awesomewm (both stdout and stderr) right from within Awesome. I followed the suggestion on the awesome-wiki (FAQ) and start awesome with the following line in my .xinitrc (I am starting awesome with startx):

Code: Select all

exec ck-launch-session dbus-launch /usr/bin/awesome  >> ~/.cache/awesome/stdout 2>> ~/.cache/awesome/stderr
The errorlog works perfectly. When I input wrong Lua-Code, it writes instantly to the stderr file.

However the stdout-file is not written instantly but only when awesome quits.

When I don't write the logs to files and start awesome with

Code: Select all

exec ck-launch-session dbus-launch /usr/bin/awesome
the stdout-output gets printed directly to tty1.

But why doesn't it get printed to the file instantly?
Last edited by gitterrost4 on Fri Apr 22, 2011 11:04 am, edited 1 time in total.
Top
modsRule
n00b
n00b
Posts: 38
Joined: Mon Oct 19, 2009 10:32 pm
Location: Bucks, UK

  • Quote

Post by modsRule » Tue Apr 12, 2011 4:53 pm

This doesn't answer your question, but when I make changes to the Lua configuration files, I then boot up awesome inside Xephyr to test it from inside my old awesome session, rather than rebooting my current session to test changes.

As for your issue. I would take a look into using tee instead as demonstrated here.
Top
gitterrost4
n00b
n00b
Posts: 34
Joined: Sun Aug 31, 2008 9:06 am

  • Quote

Post by gitterrost4 » Tue Apr 12, 2011 5:16 pm

I just tried. Piping output through tee doesn't work either. It neither prints to stdout nor to the file.

I think I should mention, when I redirect the output and stderr to one file, it will write the errors but not the output until it is finished.

EDIT: I don't know if this is relevant, but when the file doesn't exist when I start awesome, it is instantly created. Still empty until awesome quits though.
Top
gitterrost4
n00b
n00b
Posts: 34
Joined: Sun Aug 31, 2008 9:06 am

  • Quote

Post by gitterrost4 » Wed Apr 13, 2011 10:03 am

I have researched a bit more an think that the problem is related to how exec handles redirection. Does anybody have any hints on this?
Top
gitterrost4
n00b
n00b
Posts: 34
Joined: Sun Aug 31, 2008 9:06 am

  • Quote

Post by gitterrost4 » Fri Apr 15, 2011 2:35 pm

Bump. (Is this maybe a bug in awesome? Should I report it?)
Top
gitterrost4
n00b
n00b
Posts: 34
Joined: Sun Aug 31, 2008 9:06 am

  • Quote

Post by gitterrost4 » Fri Apr 22, 2011 11:04 am

I just found out that it's just the Lua-commands that don't get flushed.

When I call the (system-)command "echo 'test'", then it gets printed to the file I am redirecting to.

Also, when I execute the lua-command io.flush() the lua output up to this point gets flushed. Is there any way to force automatic flushing of command output in Lua?
Top
Post Reply

6 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic