Results 1 to 16 of 16
  1.    #1  
    I'm looking for a direct way to edit stylesheet files. Specifically, "launcher.css", to be able to manually and precisely adjust launcher page background opacity. (I am aware of the WebOSQuickInstall opacity 'tweak'. It crashes too much.)

    From the errors thrown from WQI, I've investigated (novacom style) the file but 'vi' editing is far too ugly. I can't make heads or tails of the convoluted crap it spits at me. Novaterm is tolerable, but the editing process is certainly outdated.

    Writing stylesheets isn't unfamiliar territory for me. I've messed around with enough (amature) web design to understand what the sheets do and what they're for. But I've always used a 'nice' editor, at worst notepad.

    Ideally, I'd like to be able to browse the Pre's file system(i have a mandriva2010 liveCD or virtualbox if a linux environment is necessary). I'd like to navigate to the launcher.css file, open it into a reasonable ASCII editor, find my opacity code, change it, etc.

    Extracting/Implanting files via WQI is an OK solution, but tedious, and I haven't found an editor that won't insert artifacts to the saved .css file... is this something better suited for Samba? (I would only be editing via USB)
    Last edited by jnever1; 11/23/2009 at 10:19 PM. Reason: additional info
  2. #2  
    WinScp! think of it like a windows explorer for your Pre.

    allows you to edit in notepad!

    very easy to use!
    Please hit the thanks button if I helped you

    If you've enjoyed my patches please feel free to donate towards further development.

    Follow the link below.


  3. #3  
    Quote Originally Posted by 2sslow View Post
    WinScp! think of it like a windows explorer for your Pre.

    allows you to edit in notepad!

    very easy to use!
    WinSCP is definitely the best way to go. Download it here. Based on your description of what you've been doing, you've obviously managed to log on via root. Have you also followed the Next Steps from the WebOS Internals wiki? Because I think you have to have set up a username in order to be able to log in to your Pre using WinSCP. At least, that's the only way I know how to do it, but I'm one of those people who knows just enough to be dangerous. Anyway, all you have to do is follow the instructions in the "Optware Setup" section. The "Quilt Setup" section seems a little outdated now, what with WebOS QI and Preware handling patches so nicely, so I would skip that. I also recommend setting up dynamic DNS as it makes it ever so much easier. (On that link, scroll down to the part that says "Step by Steps to Setup Dynamic DNS for your Palm Pre". I feel like these instructions are clearer and easier to follow than the ones at the WebOS Internals wiki.) I set up a free account with DynDNS.com and now I have a name for my Pre that doesn't change every time it receives a new IP address.

    Once you're able to connect to your Pre using WinSCP, you can simply drag a file from your Pre, drop it on your computer, edit it in whatever editor you want to use, then drag it back to your Pre. IMO, vi is only good for editing teeny, tiny files and making small changes. For anything else, it's impossible to tell what you're doing.

    Good luck! If you need any help getting it all set up, let me know.
    Last edited by Shadowcat; 11/24/2009 at 03:09 AM. Reason: Changed link for dynamic DNS instructions
  4. #4  
    Quote Originally Posted by jnever1 View Post
    I'm looking for a direct way to edit stylesheet files. Specifically, "launcher.css", to be able to manually and precisely adjust launcher page background opacity. (I am aware of the WebOSQuickInstall opacity 'tweak'. It crashes too much.)
    Yea, the only reason I can think of, as to why ppl keep reporting issues apply the patch, would be due to conflict with other launcher patches. It works perfectly fine on the emulator and on stock 1.3.1 launcher.css files.

    You can always try doing the changes from the opacity patch manually.

    I recommend settup up SFTP for the Pre, then use something like WinSCP for mass transfer
    If you've liked my software, please consider to towards future development.

    Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

    @JayCanuck @CanuckCoding Facebook
  5. DrewPre's Avatar
    Posts
    818 Posts
    Global Posts
    829 Global Posts
    #5  
    I used SSH Secure Shell. I am happy with that.
  6.    #6  
    Thank you!

    By cooincidence, I had seen an alternate install at PalmPre Hacks and the connection just didn't click. Honestly, I saw no point in SSH-ing into my pre when novacom did (what appeared to be) the same thing. Now that I see the tunnel formed,and see how I get to choose from a larger pool of client software, I'm quite pleased with the (SSH/WinSCP) method!

    I get crappy signal at home, where I tweak the pre most, so I decided not to go through with the DDNS. The whole intent was to use my comp to get inside the pre anyway so my home wi-fi does fine.

    Here is where the info grows thin: How do I write to my pre?
    i did in novaterm:

    # sudo mount -o remount,rw /
    # sudo passwd root
    entered/reentered rootpass

    # sudo vi sshd_config
    (uncommented PermitRootLogin yes line)
    :w
    :q!

    restarted my pre

    i log in via wi-fi via WinSCP using my user name and pass
    log in works, i can navigate just fine.

    After 'Edit' ing a file (launcher.css) however and hitting save, a password prompt appears.
    If I type my pass, i get a permissions denied error...
    how does one prefix 'sudo' to every action in WinSCP?
    access is denied when i try to log in with root/rootpass
    Last edited by jnever1; 11/24/2009 at 11:40 PM.
  7. #7  
    Quote Originally Posted by jnever1 View Post
    By cooincidence, I had seen an alternate install at PalmPre Hacks and the connection just didn't click. Honestly, I saw no point in SSH-ing into my pre when novacom did (what appeared to be) the same thing. Now that I see the tunnel formed,and see how I get to choose from a larger pool of client software, I'm quite pleased with the (SSH/WinSCP) method!

    I get crappy signal at home, where I tweak the pre most, so I decided not to go through with the DDNS. The whole intent was to use my comp to get inside the pre anyway so my home wi-fi does fine.
    So you're using the IP address that your home wi-fi assigns to your Pre for the "host name" in the WinSCP settings? I'm just curious because at one point in time, I was trying to find a way to use WinSCP without any sort of network connection (ie. airplane mode), and I couldn't figure out how to do it. Obviously, I was able to connect directly via novaterm, but at the time, I had no cell phone service and was hoping to still be able to have drag and drop. There's all kinds of settings for connection (proxy, ssh tunnel) that I'm very clueless about.

    Quote Originally Posted by jnever1 View Post
    How do I write to my pre?
    i did in novaterm:

    # sudo mount -o remount,rw /
    # sudo passwd root
    entered/reentered rootpass

    # sudo vi sshd_config
    (uncommented PermitRootLogin yes line)
    :w
    :q!
    Is this what they recommended doing at PalmPre Hacks? I'm familiar with using the passwd command to change a password, but I'm less familiar with why you would edit the sshd_config file. So rather than creating a second user (other than "root"), you've changed the root password and made it so you can log in over SSH with the username of root? Am I reading that correctly? Again, I'm learning as I go here, and am by no means a Linux person, so I'd love to understand this.

    Quote Originally Posted by jnever1 View Post
    i log in via wi-fi via WinSCP using my user name and pass
    log in works, i can navigate just fine.

    After 'Edit' ing a file (launcher.css) however and hitting save, a password prompt appears.
    If I type my pass, i get a permissions denied error...
    how does one prefix 'sudo' to every action in WinSCP?
    access is denied when i try to log in with root/rootpass
    Yeah, this is the one downside of using WinSCP. It doesn't matter if you're logged in as root or not, the file system is still read-only until you change it. Luckily, there is a relatively quick way to do this from WinSCP. First in the menu bar, click on the "Open session in PuTTY" icon:


    This will open up a PuTTY window (which looks much like novaterm). From there, I usually type:

    1. sudo -i (This gives me overall sudo privileges without having to type sudo before everything I do - if you're logged in as root, you may not have to do this. It's my understanding that the root user automatically has sudo privileges.)
    2. mount -o remount,rw /


    You can leave this window open while you go do whatever you need to do in WinSCP, and when you're done, simply come back to this window and mount the file system back to read-only and close everything up. Oh, and if you edit the files directly on the Pre, it will always prompt you for the password before it will let you save changes. If you drag your files to your computer, work on them there, and then drag them back, it won't prompt you for a password. It will, of course, warn you that the files already exist and ask if you want to overwrite, but you won't have to put in your password.

    By the way, while typing all of this up, I went to test out some things and kept getting permission denied messages every time I tried to delete or overwrite files - something that I had previously been able to do with no problems. I'm guessing 1.3.1 changed some things. I managed to gain access again once I followed these instructions from the WebOS Internals wiki:

    To login to the Pre using WinSCP:

    Hostname: [my pre's ip]
    Port: [my pre's port] (222 if you followed the Optware enabling instructions verbatim)
    username and password you set

    Check 'Advanced Options' and select "Environment>SFTP".
    In the SFTP server box enter: sudo /opt/libexec/sftp-server
    Prior to 1.3.1, I had been leaving the SFTP server box as "Default". The author went on to say:

    Be sure to set "mount -o remount,rw /" to write and "mount -o remount,ro /" when done. (If on Windows, do this through PuTTY. I haven't found a way to do it through WinSCP, but you can go to "Commands>Open in PuTTY" from the main toolbar.)

    Courtesy of jhoff80 and blakeb at PreCentral.net
    Retrieved from "http://www.webos-internals.org/wiki/Setup_SFTP"
    It's nice to know I'm not the only one who couldn't find a way to do it through WinSCP!

    For all of you guys out there who are gurus at all of this, please excuse my (I'm sure) butchering of correct terminology. And feel free to correct any mistakes I've made. It's the only way I'm gonna learn!
    Last edited by Shadowcat; 11/25/2009 at 03:50 AM. Reason: Fixed some typos! :D
  8. #8  
    Quote Originally Posted by Shadowcat View Post
    So you're using the IP address that your home wi-fi assigns to your Pre for the "host name" in the WinSCP settings? I'm just curious because at one point in time, I was trying to find a way to use WinSCP without any sort of network connection (ie. airplane mode), and I couldn't figure out how to do it. Obviously, I was able to connect directly via novaterm, but at the time, I had no cell phone service and was hoping to still be able to have drag and drop. There's all kinds of settings for connection (proxy, ssh tunnel) that I'm very clueless about.



    Is this what they recommended doing at PalmPre Hacks? I'm familiar with using the passwd command to change a password, but I'm less familiar with why you would edit the sshd_config file. So rather than creating a second user (other than "root"), you've changed the root password and made it so you can log in over SSH with the username of root? Am I reading that correctly? Again, I'm learning as I go here, and am by no means a Linux person, so I'd love to understand this.



    Yeah, this is the one downside of using WinSCP. It doesn't matter if you're logged in as root or not, the file system is still read-only until you change it. Luckily, there is a relatively quick way to do this from WinSCP. First in the menu bar, click on the "Open session in PuTTY" icon:


    This will open up a PuTTY window (which looks much like novaterm). From there, I usually type:

    1. sudo -i (This gives me overall sudo privileges without having to type sudo before everything I do - if you're logged in as root, you may not have to do this. It's my understanding that the root user automatically has sudo privileges.)
    2. mount -o remount,rw /


    You can leave this window open while you go do whatever you need to do in WinSCP, and when you're done, simply come back to this window and mount the file system back to read-only and close everything up. Oh, and if you edit the files directly on the Pre, it will always prompt you for the password before it will let you save changes. If you drag your files to your computer, work on them there, and then drag them back, it won't prompt you for a password. It will, of course, warn you that the files already exist and ask if you want to overwrite, but you won't have to put in your password.

    By the way, while typing all of this up, I went to test out some things and kept getting permission denied messages every time I tried to delete or overwrite files - something that I had previously been able to do with no problems. I'm guessing 1.3.1 changed some things. I managed to gain access again once I followed these instructions from the WebOS Internals wiki:



    Prior to 1.3.1, I had been leaving the SFTP server box as "Default". The author went on to say:



    It's nice to know I'm not the only one who couldn't find a way to do it through WinSCP!

    For all of you guys out there who are gurus at all of this, please excuse my (I'm sure) butchering of correct terminology. And feel free to correct any mistakes I've made. It's the only way I'm gonna learn!

    No need to mount -o remount,ro / when done. when you restart your Pre it automatically makes the filesystem RO.
    Please hit the thanks button if I helped you

    If you've enjoyed my patches please feel free to donate towards further development.

    Follow the link below.


  9.    #9  
    shadowcat
    So you're using the IP address that your home wi-fi assigns to your Pre for the "host name" in the WinSCP settings?
    Yes. My gateway is DHCP enabled, security enabled (WPA). Experience with DHCP servers tells me that most of the time, DHCP clients gravitate to the same assigned IP address (though manually configuring IP addresses will save you from possible headaches). You can find your pre's IP in the Wi-Fi Preferences drop down (don't know it's technical name) and after clicking the network you are connected to. (I'm just spelling it out to be thurough, not condescending ;-) )

    As long as the USB cable is hooked up and the Pre is charging (or you have "No Doze" patch installed, intra-net browsing shouldn't be an issue. Assuming, of course that you don't have any connection based firewalls to block port 222.

    WinSCP works just fine by setting ONLY 'Host' --> IP address of Pre and 'Port' to 222.

    [I have a bit to ask/discuss about write permissions later tonight, but i'm pressed for time ATM]
  10. #10  
    Quote Originally Posted by 2sslow View Post
    No need to mount -o remount,ro / when done. when you restart your Pre it automatically makes the filesystem RO.
    Thanks! I thought it did, but wasn't sure, so to be on the safe side, I've been doing it manually all this time.

    Quote Originally Posted by jnever1 View Post
    You can find your pre's IP in the Wi-Fi Preferences drop down (don't know it's technical name) and after clicking the network you are connected to. (I'm just spelling it out to be thurough, not condescending ;-) )
    I appreciate that. When giving instructions, it's hard to know exactly what skill level someone's at. Better to give too much info, IMO. But yeah, I know how to find my Pre's IP address. I just like having it set up so that no matter how often it changes, (which it does a lot because I'm on the road a lot) I have a static host name.

    Quote Originally Posted by jnever1 View Post
    WinSCP works just fine by setting ONLY 'Host' --> IP address of Pre and 'Port' to 222.
    Which is exactly how I used to have things set up and everything was working just fine for me for months now. But last night, I went to follow my own steps to make sure I wasn't forgetting anything in my instructions, and I could log on, navigate around, and even copy files from my Pre to my PC, but when I went to try to do anything that actually made changes to a file, I got denied. After much frustration and digging for a solution, the only thing I changed was that SFTP server box, and now it all works like it used to. The only thing I can figure is that 1.3.1 changed some things because until last night, I hadn't actually tried to make any changes since I updated. I guess now I'm telling WinSCP to specifically use /opt/libexec/sftp-server (which was set up, I believe, when I ran the Optware Setup instructions from the wiki). I don't know what WinSCP is using when you just leave that box as Default, but perhaps Palm changed something in the settings that limits the privileges for that connection type. Am I making any sense at all here? I feel severely handicapped by my lack of correct terminology.

    Anyway, let me know how it goes!
  11.    #11  
    Quote Originally Posted by Shadowcat View Post
    After much frustration and digging for a solution, the only thing I changed was that SFTP server box, and now it all works like it used to. The only thing I can figure is that 1.3.1 changed some things because until last night, I hadn't actually tried to make any changes since I updated. I guess now I'm telling WinSCP to specifically use /opt/libexec/sftp-server (which was set up, I believe, when I ran the Optware Setup instructions from the wiki).
    lol

    I was about to write a manifesto on how fatal my attempt to get write access through WinSCP was... and then I added the SFTP line, logged in, PuTTY'd sudo -i and mount -o remount,rw / and POOF! the SoaB works!

    I did all this before, I swear ;-), and had no success. Actually, I didn't do the sudo -i before, but did sudo mount -o remount,rw /.

    I'm going to make an assumption here, but setting the sudo -i inside PuTTY must permeate into WinSCP commands, essentially prefixing sudo unto any command issued by any instance of 'user' from any source (PuTTY, WinSCP, novaterm, etc).

    Thanks for all the help. Especially since I can now eff with the launcher bg opacity at will and with the precision and reliability i desire! TY TY TY!

    On a side note:

    Something troubles me about the sudo command.
    Am I right to fear any command that gives a restricted user unrestricted access? Or is the 'underprivileged' user created during the optware ssh/sftp closer to a MS 'Power User'? Or am I off the mark completely and the 'underprivileged' is something self-inflicted and cabable of being bandaged at will?

    It just scares me that the only thing I need to do in order to (potentially) completely brick my pre is to prefix sudo to my mischief!

    [ E D I T ]

    Through experimentation, it would appear that the sudo -i supercedes even the ro remount, so it may be possible to issue the command to the server via WinSCP and spare the PuTTY session...

    Nope. /usr/lib/luna/system/luna-applauncher/stylesheets/ is still off limits.
    I was testing my assumption in /var/home/'username'/
    Permissions (i'm guessing) must be set differently for the different folders. I'll look into changing permissions and get back to you.

    Ok. it was sudo /opt/libexec/sftp-server that did it.
    Eff me for not noticing that very important detail!
    Last edited by jnever1; 11/25/2009 at 10:29 PM. Reason: being a dumb ****** sometimes ;-)
  12. DrewPre's Avatar
    Posts
    818 Posts
    Global Posts
    829 Global Posts
    #12  
    Why do you keep logging in as a user and then issuing a 'sudo -i' command?

    Edit /etc/event.d/optware-dropbear and change the line

    exec /opt/sbin/dropbear -g -F -p 222

    to

    exec /opt/sbin/dropbear -F -p 222

    and log in as root.
  13. #13  
    Quote Originally Posted by DrewPre View Post
    Why do you keep logging in as a user and then issuing a 'sudo -i' command?

    Edit /etc/event.d/optware-dropbear and change the line

    exec /opt/sbin/dropbear -g -F -p 222

    to

    exec /opt/sbin/dropbear -F -p 222

    and log in as root.
    Because most of us have no freakin' clue what we're doing. The only system files I know how to modify are by very carefully following the instructions that the people at WebOS-Internals have been kind enough to write up for us. I was originally planning to major in compute science (18 years ago!) and took a handful of classes before I moved and dropped out of college. In my intro classes, we were learning Turbo Pascal, for cryin' out loud. Since then, I've done a wee bit of coding, if you can call it that, for an LPMud game that used a b@stardized version of C+, and about 10 years ago, I worked as a first-tier help desk tech for about 6 months. We did mostly password resets and node resets and some other basic crap for people who barely knew how to turn on the computer they'd been given by the company. I've used DOS and Linux operating systems enough that I know how to maneuver around the file system -- oh, and I vaguely remember doing all of my coding for that LPMud using vi, and boy, do I not miss having to do that anymore! All of this means that while I consider myself somewhat more tech savvy than the average person out there, and I generally understand most of what I've read and followed from the wiki (or go out and research until I do understand), I have no idea how to do anything other than what other people have described.

    So maybe you could please explain exactly what editing optware-dropbear the way you've described does? What is the purpose of making those changes and would that mean I should use Dropbear to access my Pre? Is that better/easier than using WinSCP? Could you give more complete instructions? Maybe a link or two? I don't mind Googling for answers, but I usually need a little more information than what you've provided.



    PS - I'm sorry if that all sounded snarky. I just wanted you to understand where I was coming from, and you threw off that comment like it was the most obvious thing in the world, and we're all morons for not knowing how to do that. I guess I got a little annoyed.
    Last edited by Shadowcat; 11/26/2009 at 02:43 AM. Reason: Added a PS
  14. #14  
    Quote Originally Posted by jnever1 View Post
    Ok. it was sudo /opt/libexec/sftp-server that did it. Eff me for not noticing that very important detail!
    Yay! So glad you got it working. It's always the little things, isn't it?

    Quote Originally Posted by jnever1 View Post
    Something troubles me about the sudo command. Am I right to fear any command that gives a restricted user unrestricted access? Or is the 'underprivileged' user created during the optware ssh/sftp closer to a MS 'Power User'? Or am I off the mark completely and the 'underprivileged' is something self-inflicted and cabable of being bandaged at will?

    It just scares me that the only thing I need to do in order to (potentially) completely brick my pre is to prefix sudo to my mischief!
    Yes, this concerns me a little bit, although there is always the doctor. I prefer not to have to go that route, just for the inconvenience of going through that process, but you'd have to really screw up some system files to brick the phone badly enough that the doctor can't fix it. I think you'd probably have to be deliberately trying to break it, so I wouldn't worry about it too much. As far as exactly what the sudo command does, based on my reading, the sudo command simply gives a normally unprivileged user the same privileges as the root user. So If you're willing to log in as root and muck about, then logging in with another user id and using the sudo command is pretty much the same thing. Six of one, half a dozen of the other.
  15.    #15  
    Shadowcat,
    With respect to DrewPre, I looked up the dropbear config file. Inside was clear indication that removing the -g allows log-in as root.

    # -g disallow password logins for root
    # -F runs in the foreground so the respawn will work
    # -p sets the TCP port
    exec /opt/sbin/dropbear -F -p 222
    That said, it remains to be explained what roll dropbear plays in the whole ssh/sftp/winscp system. DrewPre could have illuminated, but we all contribute what we are able to the degree we are willing, right? I'm just happy to have one less line of code to PuTTY.

    Here's the Dropbear wiki though : Dropbear (software)

    Now, if only the remount could be done and undone automatically with WinSCP connect/disconnect... :-)
    Last edited by jnever1; 11/26/2009 at 04:35 PM. Reason: dropbear info
  16. #16  
    Quote Originally Posted by jnever1 View Post
    Shadowcat,
    With respect to DrewPre, I looked up the dropbear config file. Inside was clear indication that removing the -g allows log-in as root.

    That said, it remains to be explained what roll dropbear plays in the whole ssh/sftp/winscp system. DrewPre could have illuminated, but we all contribute what we are able to the degree we are willing, right? I'm just happy to have one less line of code to PuTTY.

    Here's the Dropbear wiki though : Dropbear (software)

    Now, if only the remount could be done and undone automatically with WinSCP connect/disconnect... :-)
    After re-reading my post, I realized that I did sound pretty snippy. And you're right - everyone should contribute as much or as little as they're able to/want to. I guess I was just frustrated and took it out on DrewPre. So, Drew, I do apologize. If you could expand on your instructions just a little more, I would really appreciate it. Even better, add them to the wiki so that others that come along later can follow them too. If not, no problem. I'll do a little Googling and figure it out sooner or later. ;-)

Tags for this Thread

Posting Permissions