Dwm reading from stdin?

Hej,
everywhere I read dwm would display what it reads on stdin. but everything I see is the version number and nothing I send to the fifo, it should actually read from, appears. Is the wiki-way (setting xsetroot -name) the right way to display something in the bar? I'd find the stdin solution more elegant.
this is how I start dwm:
mkfifo $fifo &
displayinfo.sh > $fifo &
exec dwm < $fifo 2> $errorlog

Please note that with xsetroot you get exactly the same result (stdin is displayed in dwm statusbar). I was following the suckless mailing list in that period but I am not sure to remember the reason of this change, perhaps code simplification (since one can get the same result with xsetroot which comes with any X installation).

Similar Messages

  • Writing to STDOUT, then reading from STDIN?

    I have been researching this lately, as i've been programming 5 years and never had the opportunity to use it.
    The documentation on the official Java tutorial is pretty scarce, but it SEEMS like i should be able to write to STDOUT, then have it wait for me until i read from STDIN.
    I tried the following code:
    PrintStream os = System.out;
    System.setOut(os);
    InputStream is = System.in;
    System.setIn(is);
    os.write("I HOPE THIS WORKS!!!!!!!!!".getBytes());
    int available = is.available();
    byte BYTE[] = new byte[6]; //just trying to read the first 6 bytes, for the heck of it!
    is.read(BYTE);However, when i run the os.write method, the String just prints to the console. i thought my code was sufficient to reassign it and prevent it from being output there. what am i missing here?
    thanks!

    960093 wrote:
    but it SEEMS like i should be able to write to STDOUT, then have it wait for me until i read from STDIN. Correct.
    >
    I tried the following code:You however are missing the point that a stream has two ends. The streams you are grabbing do not let you control both ends (within java.)
    So you need to create a stream, rather than using an existing one.

  • How to write to stdout and read from stdin using unix pipe = '|'

    Hi,
    How can I read the output written by 1 program to stdout as the input
    (from stdin) to another program?
    Example:
    $java pgm1 | pgm2
    pgm1's output is of multiple lines with tab delimited words in each line. I need to know when each line ends as well.
    Thanks,
    -Ambika

    I tried reading from System.in - using a Buffered reader and the readline() method as follows:
    BufferedReader buffIn = new BufferedReader(new InputStreamReader(System.in));
    while(!(get= buffIn.readLine()).equalsIgnoreCase("")){
    System.out.println("get:<"+get+">");
    but unless I explicitly use the keyboard (type), it doesn't seem to be able to read input.
    I also tried to use
    Properties.load(System.in) - which is really what I'd love to be able to do to reduce processing on my end - but no luck there either!
    Is there anything I need to set the System.in or something?

  • Reading from a file doesn't work...

    Hi All,
    I am tring to read from a file tickets.txt and when I do this
    BufferedReader inFile = new BufferedReader (new FileReader("tickets.txt"));
    StringTokenizer tokens = new StringTokenizer(inFile.readLine(), ":");StringTokenizer throws a null pointer exception... and I couldn't work out why... so I did this in between BufferedReader and StringToken
    System.out.println(inFile);And it printed this on the screen... which is not in my file...
    java.io.BufferedReader@1c78e57
    Please Help,
    Mike

    C:\Program Files\Java Studio_JDK\s1studio\bin
    is what it prints... which is not where my file is...
    but it created a file there ... and I added stuff to the new file I found and it still prints null?
    some of my code...
    PrintWriter pw = new PrintWriter (new BufferedWriter (new FileWriter ("tickets.txt")));
    BufferedReader inFile = new BufferedReader (new FileReader("tickets.txt"));
    System.out.println(inFile.readLine());
    BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in));thats all in the main and thats all that really has anything to do with tickets.txt right now... everything else is commented out for now...once I manage to read the file then I will uncomment it...(the methods and stuff)
    Thanks,
    Mike

  • GetRuntime().exec() hangs reading Linux stdin

    Hi All,
    First, my apologies if I’m in the wrong forum and would appreciate directions.
    I am having trouble getting the process to accept input from stdin. Commands that just write to stdout and/or stderr work fine. Each buffered stream has its own thread. I have even appended a <cr> to the input text but to no avail. For example, this script hangs on the read (even adding a sleep before the read is no help); but runs when hardcoding x and commenting out the read.
    abbrvd
    getRunTime().exec(“test.src”)
    proc.getOutputStream().write(“Hello World”) <expected in stdout>
    test.src
    #!/bin/bash
    read x
    /bin/echo $x
    Any help would be greatly appreciated.
    Thanks in advance.

    Easy translation for the ones who don't like hyperlinks:
    Don't forget to add the command shell in the exec() method
    (like command.com, /bin/sh, etc.).

  • IPod Error Message: "The disk could not be read from or written to."

    Hello!
    I was syncing my sister's video iPod (30GB) and this error message pops up "Attempting to copy to the disk. "SARAH'S IPO" failed. The disk could not be read from or written to."
    I have restored it three times already, but once it starts putting the music and files back onto the iPod it pops up with that error message. I have updated to the latest version of iTunes and iPod software available. My OS is Windows XP.
    Is this something serious? Will I be able to fix it myself or will I need to send it in to be fixed by Apple? Will that be expensive? We didn’t get the Apple replacement plan. D=
    Any help would be greatly appreciated. Thank you in advance. ^_^
    PowerBook G4   Mac OS X (10.4.3)   15" PowerBook 1.5 GHz PowerPC G4, 1.5GB RAM - Windows XP with iPod 5 Generation

    Okay I went thru that entire list and here's what I got...
    (1) My OS is XP and is running fine.
    (2) I've updated my windows
    (3) I don't know of any software that might be interfering.
    (4) There are no damaged files.
    (5) My Windows hard-drive is not damaged and I've tried restoring my iPod's disk thru iTunes but it still doesn't work.
    (6) I don't have an iPod photo and I can't find the folder to delete the cache if if I did.
    (7) The USB cord is firmly connected into my USB port and my iPod
    (8) My music is on my external hard-drive so I need to keep 3rd-party hardware connected
    (9) I will try another USB cord to see if that works.
    Is there anything else that I can do? Can Apple fix this?
    Please let me know.

  • Open and read from text file into a text box for Windows Store

    I wish to open and read from a text file into a text box in C# for the Windows Store using VS Express 2012 for Windows 8.
    Can anyone point me to sample code and tutorials specifically for Windows Store using C#.
    Is it possible to add a Text file in Windows Store. This option only seems to be available in Visual C#.
    Thanks
    Wendel

    This is a simple sample for Read/Load Text file from IsolateStorage and Read file from InstalledLocation (this folder only can be read)
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Windows.Storage;
    using System.IO;
    namespace TextFileDemo
    public class TextFileHelper
    async public static Task<bool> SaveTextFileToIsolateStorageAsync(string filename, string data)
    byte[] fileBytes = System.Text.Encoding.UTF8.GetBytes(data);
    StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
    var file = await local.CreateFileAsync(filename, CreationCollisionOption.ReplaceExisting);
    try
    using (var s = await file.OpenStreamForWriteAsync())
    s.Write(fileBytes, 0, fileBytes.Length);
    return true;
    catch
    return false;
    async public static Task<string> LoadTextFileFormIsolateStorageAsync(string filename)
    StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
    string returnvalue = string.Empty;
    try
    var file = await local.OpenStreamForReadAsync(filename);
    using (StreamReader streamReader = new StreamReader(file))
    returnvalue = streamReader.ReadToEnd();
    catch (Exception ex)
    // do somthing when exception
    return returnvalue;
    async public static Task<string> LoadTextFileFormInstalledLocationAsync(string filename)
    StorageFolder local = Windows.ApplicationModel.Package.Current.InstalledLocation;
    string returnvalue = string.Empty;
    try
    var file = await local.OpenStreamForReadAsync(filename);
    using (StreamReader streamReader = new StreamReader(file))
    returnvalue = streamReader.ReadToEnd();
    catch (Exception ex)
    // do somthing when exception
    return returnvalue;
    show how to use it as below
    async private void Button_Click(object sender, RoutedEventArgs e)
    string txt =await TextFileHelper.LoadTextFileFormInstalledLocationAsync("TextFile1.txt");
    Debug.WriteLine(txt);
    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。

  • Disk could not be read from or written to

    I'm a new ipod user. I can get songs on my ipod. But when I go to get photos I get an error message saying, "ipod cannot be updated. The disk could not be read from or written to."
    In itunes I can see the ipod. When I go to look at My Computer, it does not show the ipod as a disk drive.
    Thanks!

    I'm a new ipod user. I can get songs on my ipod.
    But when I go to get photos I get an error message
    saying, "ipod cannot be updated. The disk could not
    be read from or written to."
    In itunes I can see the ipod. When I go to look at My
    Computer, it does not show the ipod as a disk drive.
    Thanks!
    It's so simple, dont worry. Just connect your ipod to the computer. iTunes must open. In iTunes clcik on the small ipod icon which appears at the right bottom of the itunes window. click on that icon and another window with some options will be opened. Click on "enable disk use" and make this selection marked and click ok.
    it'll certainly help!

  • When I update my nano ipod I get an error message "User ipod cannot be updated.  The disk couldnot be read from or written to."   How can I overcome this error message.

    In the iTunes window, when I update my nano ipod, I get an error message "User ipod cannot be updated.  The disk could not be read from or written to."   How can I overcome this error message.

    Hello there dilip77707,
    It sounds like you are getting this error message that your iPod cannot be read from or written to when you are trying to update your iPod Nano. I recommend the troubleshooting from the following article to help you get that resolved. Its pretty straight forward, just start at the top and work your way down as needed:
     'Disk cannot be read from or written to' when syncing iPod or 'Firmware update failure' error when updating or restoring iPod
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • Disk could not be read from

    Suddenly my Ipod will not sync. The error message says "...disk could not be read from or written to..." We tried the HOLD TOGGELING. But that didn't work. It won't let me restore the Ipod either because it says other programs are currently in use.
    Suggestions would be greatful!

    Welcome to the discussions,
    if the reset did not work, did you try to put it into disk mode? http://support.apple.com/kb/HT1363

  • Can't sync iPod - Error Message: "disc cannot be read from or written to"

    My ipod had been working fine until recently when every time I try and sync it I get the following error message:
    "Attempting to copy to the disk "iPod" failed. The disk could not be read from or written to"
    I have tried all suggestions in Apple's support article for this issue but nothing works. Does anyone else have this problem or know how to solve it?
    Thanks a lot.
    H
    Macbook Pro   Mac OS X (10.4.10)  
    Macbook Pro   Mac OS X (10.4.10)  

    Hi all,
    I am sorry to report that I too have this same disc error problem when syncing my iPod to my iTunes library. I take no comfort in knowing that I am one of many that have this same error. I checked on the iPod lounge forum and I just couldn't count the number of users that had the same problem. There are just so many!
    I too have tried "5 r's" and I have also tried using a few "s" words and others...lol.
    It seems like there is no "fix" for this problem but I will say this: If there is no solution, then I will no longer be buying iPods. This is my third iPod that I have purchased. Which makes my Apple investment near the thousand dollar mark. That is way too much money spent to not have a functioning music player. I will be switching to another player to see if the grass is greener on the other side.
    I have been most dissappointed with this error and I will not be "recycling" this iPod for ten percent off of my next iPod purchase.

  • Error Message: "Disk could not be read from or written to".

    New 5th Gen. was downloading CD's I loaded into iTunes just fine; when uploading tunes into iPod yesterday this error message appeared: "Attempting to copy to the disk (iPod name) failed. Disk could not be read from or written to". Restored iPod with 1/10/06 update of iPod Install; using iTunes 6.0.2; operating system 10.3.9. Frustrated. iPod useless at this point. Anyone found a fix to this vexing problem?
    Thanks,
    John

    Thanks Jeff. Only thing that rings true is updating OS; when I tried to downoad 10.4 message said I 'could not on this computer'. Since I purchased and installed 10.3 a year ago I don't understand. Also, iPod was downloading perfectly until two days ago when -36 appeared. Bummer. I am not a techie, Apple tech support does not have a clue, and iPod is useless. Ideas?

  • "The disk could not be read from or written to"??

    When I try to sync my ipod it gives me following error message "Attempting to copy to the disk 'My Ipod' failed. The disk could not be read from or written to."
    Have not reset or restored it yet, wondering if there is anything I can do that doesn't involve me deleting all the songs on my ipod.
    5th Gen 80g Ipod, G5 Imac   Mac OS X (10.4.9)  

    See if this troubleshooting article helps.
    Disk cannot be read from or written to error syncing iPod in iTunes.

  • Attempting to copy to the disk Ipod failed. the disk could not be read from

    Keep getting error message Attempting to copy to the disk.....Ipod failed. The disk could not be read from or written to. I can copy to Ipod from my laptop however, can not sync with my G-4 tower. I keep my library on an external HD Lacie d2. I've tried all the possibilities from the support page to no avail.. Need help... When error refers to disk is it referring to my external HD

    Hi c2xist,
    And you did follow all of the suggestions from this article?:
    "Disk cannot be read from or written to" when syncing iPod
    Also, you could go through these iPod troubleshooting steps, and see if they are of any help:
    The Five Rs
    -Kylene

  • 9.1.1 sync problems: "The disk could not be read from or written to."

    Using OSX 10.6.3 and upgraded to iTunes 9.1.1. Once I did, I keep getting the following error message: "Attempting to copy to the disk [my ipod] failed. The disk could not be read from or written to." This is followed by another error message: "iTunes could not copy {name of file} to the iPod {iPod name} because the file could not be read or written."
    I tried deleting the files mentioned in the error message, but then the message returns with the name of a different file. At this rate, I'll be deleting all my files!
    I tried checking everything on the Knowledge Base article: http://support.apple.com/kb/HT1207
    I tried restoring my iPod (twice), but it didn't help.
    All my software is up to date. I haven't added any new software since I upgraded iTunes.
    NOW...when I try to sync my iPhone, I get the same error message.
    What's going on, and can anyone help?
    This is very annoying since I can't sync my iPhone which I need or my iPod which I would like.

    ArizonaDAK wrote:
    "iTunes could not copy {name of file} to the iPod {iPod name} because the file could not be read or written."
    check if you have read & write permissions for your iTunes music folder. in finder, right-click on it and +get info+. unlock the little padlock (you may have to enter your admin password) and change the permission settings. next, click on the little gear-shaped icon and +apply to enclosed items+ like so
    you may also give everyone read & write access. if this doesn't help, try the same on your iTunes folder (not just the iTunes music folder).
    if that make no difference, try reinstalling iTunes. click here and follow the instructions. next, download a fresh copy from here: http://www.apple.com/itunes/download/.
    you might also try to _*remove and reinstall the Apple Mobile Device Service*_
    JGG
    edited by the Jolly Green Giant (where Green stands for environmentally friendly)

Maybe you are looking for

  • Session variable and initialization block issues

    We are using OBIEE 10.1.3.3 and utilizes built in security features. (No LDAP or other single sign on). The user or group names are not stored in any external table. I have a need to supplement Group info of the user to the usage tracking we implemen

  • Is it ok to use a pen to operate my ipod touch?

    *so i was wondering that if i could use a pen like it's used for Palm, Blackberries, and other gadgets that have touch screen functions. Since I'm new at using touch scream feature and my fingers are kind of thick i always have mispelling mistakes. t

  • Sharing files trouble: "..belongs to a domain..."

    Hello, I am trying to setup my business laptop to also network with my PC at home. I am able to access the internet without any trouble, but I am trying to enable file and printer sharing.  After running the network wizard on the PC, I try to run the

  • Prepare Cross-Company Code Transactions

    hello,  I am configuring operations  Cross-Company Code Transactions , but when counting in one of the societies fi (for transaction f-02), it doesn't generate the countable voucher in the other configured society.  Please, they could give me a help

  • CV03n - illegal original name

    Hi ! We get an error at transaction CV03n. Here is the step by step description : The error appear with original names that contains ilegal charecter's like: space,#, @, etc. I execute transaction CV03n with the following parameters : Document: 80044