LG webOS SDK



  • Not expecting anything better from LG I decided to install their SDK because I need the emulator.

    Anyway, in the instructions they ask for a Virtual Box as a dependency and provide a Java installer... which you have to run as root in Linux and as Administrator in Windows.

    Why you have to run as root? Let's see their script:

    if [ $UID != 0 ]; then
    

    OK, let's try to circumvent their magical script with some Java fü:

    $ java -jar Installer.jar tv
    

    Which works, until it crashes with this error:

    java.io.FileNotFoundException: /home/.lgsdkTvregistery/.webosTVregistery.xml
    

    :wtf:

    I still don't see why this thing needs root permissions except for laziness.



  • What the fuck are they doing messing with your /home directory?
    And what's the equivalent of this on Windows?


  • sockdevs

    @cartman82 said:

    And what's the equivalent of this on Windows?

    %USERPROFILE%


  • Discourse touched me in a no-no place

    @RaceProUK said:

    %USERPROFILE%

    Is that the roaming bits or the local-computer bits of it?



  • @RaceProUK said:

    %USERPROFILE%

    That's the equivalent of /home/<username>.

    What they are doing is basically messing with C:\Users, creating their own folder inside that.


  • sockdevs

    @cartman82 said:

    @RaceProUK said:
    %USERPROFILE%

    What they are doing is basically messing with C:\Users

    Or C:\Documents and Settings


  • sockdevs

    @PJH said:

    Is that the roaming bits or the local-computer bits of it?

    Both (%APPDATA% and %LOCALAPPDATA% are descendant subfolders of %USERPROFILE%)



  • C:\Documents not found.


  • :belt_onion:

    Try C:\DOCUME~1



  • @cartman82 said:

    What the fuck are they doing messing with your /home directory?And what's the equivalent of this on Windows?

    As we've discussed many times, there is none and any software that assumes there is is wrong and broken.

    @RaceProUK said:

    %USERPROFILE%

    NO. WRONG. STOP SPREADING MISINFORMATION.

    @cartman82 said:

    That's the equivalent of /home/<username>.

    Not really no.

    It is in a technical sense, but the only entity that should ever put files there is the OS itself. Do not touch. Not for you.

    @RaceProUK said:

    Both (%APPDATA% and %LOCALAPPDATA% are descendant subfolders of %USERPROFILE%)

    NOT TRUE. STOP SPREADING MISINFORMATION.

    You know the worst of it is that I know I've had this exact discussion with RaceProUK like 3 times previously. Since she has me blocked, I can confidently say RaceProUK is the dumbest motherfucker on these forums, Christ. Also has a memory that would embarrass a goldfish.

    Hey look this post got flagged. So I'm editing it because... apparently that does something and I have 10 minutes? Whatever.

    Fuck off, Discourse.


  • Winner of the 2016 Presidential Election

    !!!!!!
    Why?
    :wtf:


  • Winner of the 2016 Presidential Election

    @blakeyrat said:

    It is in a technical sense, but the only entity that should ever put files there is the OS itself. Do not touch. Not for you.

    Wait, are you saying I shouldn't put files in C:\Users\[username]?


  • sockdevs

    @blakeyrat said:

    NOT TRUE. STOP SPREADING MISINFORMATION.

    Then what is the correct information? I get that you're complaining about incorrect information but that's less than helpful if you do not follow up and provide correct information. Even a link to proper documentation would suffice.

    @blakeyrat said:

    You know the worst of it is that I know I've had this exact discussion with RaceProUK like 3 times previously. Since she has me blocked, I can confidently say RaceProUK is the dumbest motherfucker on these forums, Christ. Also has a memory that would embarrass a goldfish.

    dude. not cool.



  • @sloosecannon said:

    Wait, are you saying I shouldn't put files in C:\Users[username]?

    Correct.

    If you do, that's a bug. And you're running the very real risk of encountering a system where C:\Users\[username] is read-only (or, rare but possible, doesn't exist at all), breaking your application.



  • To be fair, Microsoft has changed its recommendations and best practices of where you should put what so many times, it's hard to blame the devs for failing to keep track. On *nix, these traditions are firmly in place for decades. No excuses there.


  • Winner of the 2016 Presidential Election

    Where is this documented?

    And are you talking from a development standpoint or a end-user standpoint?



  • @sloosecannon said:

    Wait, are you saying I shouldn't put files in C:\Users[username]?

    I think you're supposed to ask the OS something like: "Where are the current user's roaming documents?" and then use whatever path it gives you this year.


  • Winner of the 2016 Presidential Election

    Well yeah, if I'm writing a program. I put crap in C:\Users\[username] all the time personally though... it's where I put things that are related to me that don't have any other sensical place to put them.

    It's also an environment variable so were I to write a program that puts crap there, I'd use that. Still not sure what the issue is about it, since I haven't seen any official direction otherwise...


  • sockdevs

    But you shouldn't rely on it being C:\Users\[username]; there's no telling when it'll change again. Use %USERPROFILE% and things like that though, and you'll always get the right folders ;)


  • Winner of the 2016 Presidential Election

    Well yeah obviously :)

    @sloosecannon said:

    It's also an environment variable so were I to write a program that puts crap there, I'd use that

    ;)



  • @blakeyrat said:

    NOT TRUE. STOP SPREADING MISINFORMATION.

    Y'all should bookmark this post.

    Recognized Environment Variables

    USERPROFILE
    Same as CSIDL_PROFILE.

    CSIDL_PROFILE
    The user's profile folder. A typical path is C:\Documents and Settings\username. Applications should not create files or folders at this level; they should put their data under the locations referred to by CSIDL_APPDATA or CSIDL_LOCAL_APPDATA

    CSIDL_APPDATA
    The file system directory that serves as a common repository for application-specific data. A typical path is C:\Documents and Settings\username\Application Data. This CSIDL is supported by the redistributable Shfolder.dll for systems that do not have the Microsoft Internet Explorer 4.0 integrated shell installed.

    CSIDL_LOCAL_APPDATA
    The file system directory that serves as a data repository for local (nonroaming) applications. A typical path is C:\Documents and Settings\username\Local Settings\Application Data.

    APPDATA
    Same as CSIDL_APPDATA



  • @accalia said:

    Then what is the correct information?

    https://msdn.microsoft.com/en-us/library/s2esdf4x(v=vs.80).aspx is a nice quick-and-dirty summary.

    I'm the first one to admit the documentation on this is lousy. Microsoft generally seems to assume everybody already knows this.

    The real beef I have is people writing software for Windows who do not know how Windows works. At a general level; not knowing which folder to put files in is just a side-effect of that much bigger problem. If you don't know how the OS works, or even what features it has, you should not be writing software for it.

    @accalia said:

    dude. not cool.

    Look, if I see a red balloon, I call it a red balloon. I have very little patience with people who have seemingly no capacity for learning whatsoever.


  • sockdevs

    There's also LOCALAPPDATA, which is the same as CSIDL_LOCAL_APPDATA.

    Works on my machine, anyway.


  • BINNED

    But you (as an application) shouldn't be putting stuff in %USERPROFILE% at all. If you're saving a document it should go in the user's documents (by default, with the ability for the user to change it). If you're storing application data, put it in %APPDATA% or %LOCALAPPDATA%



  • @blakeyrat said:

    https://msdn.microsoft.com/en-us/library/s2esdf4x(v=vs.80).aspx is a nice quick-and-dirty summary.

    That one misses the local stuff.

    @RaceProUK said:

    There's also LOCALAPPDATA, which is the same as CSIDL_LOCAL_APPDATA.

    Yeah, they didn't put that on there for some reason. I looked for it on there, though. Either way...



  • @RaceProUK said:

    Works on my machine, anyway.

    Famous last words ;-)


  • sockdevs

    @Jaloopa said:

    But you (as an application) shouldn't be putting stuff in %USERPROFILE% at all. If you're saving a document it should go in the user's documents (by default, with the ability for the user to change it). If you're storing application data, put it in %APPDATA% or %LOCALAPPDATA%

    True to an extent; cloud storage clients put stuff in USERPROFILE, which I think is OK, because they show up as Library folders, like Pictures and Videos.



  • @cartman82 said:

    What the fuck are they doing messing with your /home directory?And what's the equivalent of this on Windows?

    It's a worse :wtf: because they aren't messing with a specific user's home -- they're messing around directly under /home itself!

    Out come the :triangular_flag_on_post:s....



  • @cartman82 said:

    To be fair, Microsoft has changed its recommendations and best practices of where you should put what so many times, it's hard to blame the devs for failing to keep track.

    That's a lie.

    You've used the same API call to find the path since Windows 95.

    The only change Microsoft's ever made is the addition of the non-roaming version of Application Data. And that was done in like Windows 2000, or possibly even NT4. It's not a recent change. And it's a non-breaking additive change.

    @cartman82 said:

    On *nix, these traditions are firmly in place for decades. No excuses there.

    I'd rather have an OS based on engineering, not "tradition".

    @sloosecannon said:

    Where is this documented?

    I haven't found a good comprehensive document describing the system on MSDN. I originally read about it in a paper book I can no longer recall the title of.

    @sloosecannon said:

    And are you talking from a development standpoint or a end-user standpoint?

    Development, of course. I don't even get how an end-user standpoint would be relevant here.

    @cartman82 said:

    I think you're supposed to ask the OS something like: "Where are the current user's roaming documents?"

    There's no such thing as "roaming documents". There's only "documents".

    @cartman82 said:

    and then use whatever path it gives you this year.

    It can change each login. You need to ask every time your program runs. If you save that data somewhere between user logins, you've written a bug.

    @sloosecannon said:

    I put crap in C:\Users[username] all the time personally though... it's where I put things that are related to me that don't have any other sensical place to put them.

    You can do what you like on your own computer.

    But if you distribute that software, expect it to break on other people's. Do what you like, but be aware that it's a bug.

    @sloosecannon said:

    It's also an environment variable so were I to write a program that puts crap there, I'd use that.

    Don't use the environment variable. If you're writing software, do the proper thing and ask the OS using the API designed specifically for that purpose.

    @sloosecannon said:

    Still not sure what the issue is about it, since I haven't seen any official direction otherwise...

    What do you expect? Some guy pulls up to your door with wailing sirens and goes, "Microsoft Hobby Programming Defense Department, open up please! We need to talk to you about folder permissions!"

    @RaceProUK said:

    But you shouldn't rely on it being C:\Users[username]; there's no telling when it'll change again. Use %USERPROFILE% and things like that though, and you'll always get the right folders

    Only true on the technicality that the environment variables are maintained for compatibility with shitty broken programs.

    Write your program correctly. Don't depend on backwards compatibility hacks. And especially, don't listen to ANYTHING RaceProUK says in this thread.



  • @boomzilla said:

    Y'all should bookmark this post.

    Yeah, I found a page like that too, but all I can find on MSDN are those lists of "here's what values we have in each particular OS version".

    What I'd really like is a document in prose explaining the purpose of the system and the rationale behind how and why you should be using it. I know Microsoft's published that in books before, but it's weird I can't find anything on MSDN even close-- although maybe my search terms are just wrong, who knows.

    I should just write one myself, but I don't really do any Windows application programming.

    @RaceProUK said:

    Works on my machine, anyway.

    This is why you should not be listening to RaceProUK.



  • @boomzilla said:

    That one misses the local stuff.

    Yeah I know.



  • @Eldelshell said:

    Which works, until it crashes with this error:

    java.io.FileNotFoundException: /home/.lgsdkTvregistery/.webosTVregistery.xml

    I still don't see why this thing needs root permissions except for laziness.

    Eh...guess who owns /home. Where does it want to write that stuff on Windows? Of course, convention says it should have put it in /etc on Linux.



  • @RaceProUK said:

    True to an extent; cloud storage clients put stuff in USERPROFILE, which I think is OK, because they show up as Library folders, like Pictures and Videos.

    No. Wrong. Bad.

    DropBox has no special dispensation to use that folder. It's a bug. EVERYTHING RACEPROUK SAYS ON THIS ISSUE IS WRONG, please keep that in mind.

    The DropBox folder belongs in Documents.



  • Have you realized what is actually going on in the OP?!

    This installer isn't writing into the profile of a user AT ALL!!!!

    It is creating a folder directly under C:\Users (or /home, equivalently)!

    Crikey, have you adopted the ignorescript as well? Because you missed it in the OP, you missed @cartman82 pointing it out, and you managed somehow to miss me getting :hanzo:'ed badly when pointing it out the second time in this thread!



  • @tarunik said:

    Have you realized what is actually going on in the OP?!

    I haven't even read the OP. I've been responding to Cartman82's post this whole time.

    My eyes just kind of glass-over when it's all about Lunix and Java and other bullshit I don't care about.



  • replaces all of @blakeyrat's computers with Tandem NonStops running TNS/R Guardian and a few off-brand minicomputers running weird, not-even-close-to-POSIX systems


  • Winner of the 2016 Presidential Election

    @blakeyrat said:

    The DropBox folder belongs in Documents.

    Why? You put any number of things in Dropbox, not just documents. Unless the documents folder is for things other than just documents, in which case why is it called documents?



  • Also: writes a program which insists on finding its configuration files in C:\Users, sends the installer for it to @blakeyrat


  • Winner of the 2016 Presidential Election


  • :belt_onion:

    @blakeyrat said:

    Yeah, I found a page like that too, but all I can find on MSDN are those lists of "here's what values we have in each particular OS version".

    I believe you'd better link to the following lists:

    Those link to some other related functions and at least have some practical examples how one should use them.



  • @sloosecannon said:

    Why?

    Because on a machine where the Username folder is read-only, DropBox will fail to install. Probably with some horrible non-caught error, because any developer who makes this elementary mistake is probably also not checking their errors properly.

    If you really want it there, again: you can do whatever you like on your own machine. You can manually tell the installer to put it there.

    @sloosecannon said:

    You put any number of things in Dropbox, not just documents. Unless the documents folder is for things other than just documents, in which case why is it called documents?

    It made more sense before Microsoft made Photos and Videos. Which, IMO, belong inside Documents, and not outside it. But anyway.

    Microsoft's definition of the word "documents" is not the same as yours, is probably the issue here. Since I have no idea what your definition is, it's impossible for me to answer your question.

    (Keep in mind, Microsoft considers an Access database a "document". Similarly, a Visual Studio solution is a "document". I don't know if that helps?)


  • mod

    @blakeyrat said:

    There's no such thing as "roaming documents". There's only "documents".

    I believe that @cartman82 was referencing roaming profiles, which are a very real thing.


  • Winner of the 2016 Presidential Election

    @blakeyrat said:

    Because on a machine where the Username folder is read-only, DropBox will fail to install.

    Incidentally, you'll also fail to log in properly because you can't write to critical files. So that's an issue...



  • @cartman82 said:

    And what's the equivalent of this on Windows?

    Sharing login accounts.


  • Winner of the 2016 Presidential Election

    @abarker said:

    @blakeyrat said:
    There's no such thing as "roaming documents". There's only "documents".

    I believe that @cartman82 was referencing roaming profiles, which are a very real thing.


    ++

    Also, my networked U:\ roaming documents folder would beg to disagree with @blakey's statement



  • @abarker said:

    I believe that @cartman82 was referencing roaming profiles, which are a very real thing.

    Well duh. But that doesn't change or address what I said in the slightest.

    @sloosecannon said:

    Incidentally, you'll also fail to log in properly because you can't write to critical files. So that's an issue...

    Not true. Stop spreading misinformation.

    Why did everything in Discourse turn blue? WTF


  • Winner of the 2016 Presidential Election

    @blakeyrat said:

    Not true. Stop spreading misinformation.

    Please explain how to log in with a read-only user folder.



  • @sloosecannon said:

    Please explain how to log in with a read-only user folder.

    I don't even understand the question.

    You just ... do it? And it works?

    Like do you want detailed instructions on how to type your password or something?


  • BINNED

    @sloosecannon said:

    Incidentally, you'll also fail to log in properly because you can't write to critical files

    Anything critical to your user should be in C:\users\Jaloopa, not in C:\users. Subfolders can have different access rights to their parent folders


  • Winner of the 2016 Presidential Election

    Well, this is what happens if I try to do that in a VM...

    Doesn't look to me like a successful login


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.