maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [UPDATED} Quick Clip, a statusbar plugin to save text (https://talk.maemo.org/showthread.php?t=28359)

BrentDC 2009-04-17 21:51

[UPDATED] Quick Clip, a statusbar plugin to save text
 
Today I'm pleased to announce the release of Quick Clip 0.4.1-1. What is Quick Clip? Quick Clip is the combination of a statusbar plug-in and text viewing application specifically designed for the Maemo platform. The statusbar plugin allows you to "clip" highlighted, or enter text directly, into a plain text file for later reference. While the text viewer easily allows you to read and/or access data you've already clipped.

http://static.maemo.org/style_maemo2...tton_small.png

New features in this release are:

* Added Clear submenu item
* Added Delete submenu item
* Switched to XML for target file list storage
* Switched storage location for user files
* Major code cleanup
* Fixed Open Bug
* Fixed preinst script
* Renamed Open Settings button to Browse
* QCV: Changed preference warning to bold
* QCV: Added application menu
* QCV: Fixed bug in scrolling choice
* QCV: Added Select All option
* QCV: Added Right/Left buttons for flipping through clippings
* QCV: Added Properties submenu item
* QCV: Added Help menu item
* QCV: Mapped the +/- keys to increase/decrease font size
* QCV: Mapped the Up/Down D-Pad keys to scrolling (only for GTK)
* QCV: Changed Title (more path visible)
* QCV: Major code cleanup

Sho 2009-04-18 01:08

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
What's new in 0.4.1 vs. 0.4.0? :)

BrentDC 2009-04-18 01:13

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
I fixed the install script and a bug in the settings dialog; other than that, not much! :)

The main difference is, is that I feel 0.4.x is stable, so it's promoted to Extras and not just Extras-devel.

Sho 2009-04-18 02:16

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Ok, thanks :).

deter3 2009-04-18 06:04

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
It's a great one and Love to use it all the time !!! Thanks for the excellent job !!!

GeraldKo 2009-04-27 16:17

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
I finally installed 0.4 and converted my previous files. Wow, Quick Clip gets better and better!

You know how I wanted you to have a Find function that would search all the Quick Clip files at once? Forget it! The combination of being able easily to move through the files with the taskbar Right/Left buttons and the fact that the Find box remains in place when you switch files, obviated the need altogether. Your solution is even better than searching all at once.

A couple new little wishes:

I'd prefer if Find didn't care about capitalization. As it is now, searching for "orange" will not find "Orange" and I'm not consistent in capitalization (and I suppose it also wouldn't find "orange" if it were capitalized intentionally as the first word in a sentence).

I know that Quick Clip Viewer isn't intended for editing, but I wish that I could delete within it. Sometimes I save webpage articles that come along with all the excess stuff, like links to elsewhere, that I wish I could get rid of while in QCV. Also, I have a file that I like to delete all of each time I leave it. (I use it just for reading text from webpages that don't reflow well or are hard to read for some other reason, like bad choice of background color.)

Once again, great improvements, thanks!

Lord Raiden 2009-04-27 18:24

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
I know this might sound silly, but could you add a "clipboard" mode for this, where your tool acts just like the Klipper clipboard utility does in KDE3.5? That would be something that'd be more useful to me than what you have here. I can still see uses for this tool, but having the ability to have a Klipper like clipboard tool would be best.

BrentDC 2009-04-27 19:09

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by GeraldKo (Post 282372)
I finally installed 0.4 and converted my previous files. Wow, Quick Clip gets better and better!

You know how I wanted you to have a Find function that would search all the Quick Clip files at once? Forget it! The combination of being able easily to move through the files with the taskbar Right/Left buttons and the fact that the Find box remains in place when you switch files, obviated the need altogether. Your solution is even better than searching all at once.

Great!

Quote:

A couple new little wishes:

I'd prefer if Find didn't care about capitalization. As it is now, searching for "orange" will not find "Orange" and I'm not consistent in capitalization (and I suppose it also wouldn't find "orange" if it were capitalized intentionally as the first word in a sentence).
Truth be told, my find function is loosely based on Khertan's PyGTKEditor and it's find function (with a few major improvements), and that is just how his worked.

Myself, I would like Find to be able to search for text with special characters, spaces, and optional case-sensitivity, but... Right now the searching is like 30 lines of code (most of them responsible for highlighting matched strings, etc.) and implementing a robust search tool would probably take several hundred (I'm guessing, but Leafpad's search code is larger than all of Quick Clip!).

Quote:

I know that Quick Clip Viewer isn't intended for editing, but I wish that I could delete within it. Sometimes I save webpage articles that come along with all the excess stuff, like links to elsewhere, that I wish I could get rid of while in QCV. Also, I have a file that I like to delete all of each time I leave it. (I use it just for reading text from webpages that don't reflow well or are hard to read for some other reason, like bad choice of background color.)

Once again, great improvements, thanks!
As for #1 I'm leaving QCV a viewer for now.

#2, that's why I added Clear and Delete menu items in QC; specifically for those type of use-cases.

BrentDC 2009-04-27 19:11

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by Lord Raiden (Post 282423)
I know this might sound silly, but could you add a "clipboard" mode for this, where your tool acts just like the Klipper clipboard utility does in KDE3.5? That would be something that'd be more useful to me than what you have here. I can still see uses for this tool, but having the ability to have a Klipper like clipboard tool would be best.

Don't know exactly how Klipper works (even though I occasionally use KDE4), but that doesn't seem that difficult to implement.

I'll think about it.

GeraldKo 2009-04-27 19:35

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
I'm just guessing, but my guess is that making the Find function capitalization-agnostic would not take much. I'm not suggesting (like you are!) optional case sensitivity (let alone special characters, etc.); I'd just like it to find all of the asked for letters, regardless of whether they are capitalized or not. ABC = aBc = abc =Abc. My uneducated guess is that there is a way that you tell tell the program that a=A and b=B. Maybe it's based on ASCII (English) lower-case letters all being the-same-number-as-its-matching-uppercase-letter-plus-32. It must be a very common little function since you can enter any assortment of caps and small letters in an email address or a URL and it is treated as if it were all lower-case. (www.goOGlE.coM = www.google.com)

Lord Raiden 2009-04-28 13:47

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by BrentDC (Post 282454)
Don't know exactly how Klipper works (even though I occasionally use KDE4), but that doesn't seem that difficult to implement.

I'll think about it.

Well, it should work the same in KDE4 as it did in KDE3. But just play with it. I think you'll find you like it. :D

BrentDC 2009-05-29 19:30

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Hi all,

I just uploaded Quick Clip 0.4.4. New in this release is Chinook compatibility (I really need someone running Chinook to test this out) and the beginnings of Fremantle support.

I also completely restructured the code, so it's easier to maintain.

It should be available shortly from your application manager (I'm leaving this version in extras-devel for Fremantle and Diablo, but promoting it to extras-stable for Chinook, since the previous version isn't installing on Chinook anyway).

Once I get enough feedback, I'll promote the Diablo version to extras-stable.

Thanks.

debernardis 2009-05-31 07:20

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by BrentDC (Post 291936)
I just uploaded Quick Clip 0.4.4. New in this release is Chinook compatibility (I really need someone running Chinook to test this out) [...]

It should be available shortly from your application manager (I'm leaving this version in extras-devel for Fremantle and Diablo, but promoting it to extras-stable for Chinook, since the previous version isn't installing on Chinook anyway).

Well I'm here with my Chinook eagerly waiting to test it and report but 36 hours passed and it isn't in extras yet :(

BrentDC 2009-05-31 15:50

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by debernardis (Post 292326)
Well I'm here with my Chinook eagerly waiting to test it and report but 36 hours passed and it isn't in extras yet :(

Did you refresh your application manager? I just tried installing it from Chinook Extras, and it installed fine.

Thanks.

Lord Raiden 2009-05-31 16:36

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Did you ever add the ability to function similar to Klipper? That's what I'm waiting for before installing this app.

GeraldKo 2009-05-31 16:42

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
@debernardis & BrentDC
Along with updating and installing, you also have to go to Panels in Control Panels and select it. (I was surprised that I had to do that after updating to 0.4.4)

BrentDC 2009-05-31 17:00

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by Lord Raiden (Post 292404)
Did you ever add the ability to function similar to Klipper? That's what I'm waiting for before installing this app.

I looked into it and even wrote 95% of the required code...it just didn't work.

There is no signal emitted when the Clipboard contents change, so you need to poll the clipboard every X seconds to see if it's changed. I was afraid this world effect battery life, too.

BrentDC 2009-05-31 17:02

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by GeraldKo (Post 292407)
@debernardis & BrentDC
Along with updating and installing, you also have to go to Panels in Control Panels and select it. (I was surprised that I had to do that after updating to 0.4.4)

Probably just a random OS oddity; I didn't have to manually select it when I installed it here.

Den in USA 2009-05-31 17:09

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by GeraldKo (Post 292407)
@debernardis & BrentDC
Along with updating and installing, you also have to go to Panels in Control Panels and select it. (I was surprised that I had to do that after updating to 0.4.4)

I had to do the same thing on my N800.

Lord Raiden 2009-05-31 17:28

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by BrentDC (Post 292411)
I looked into it and even wrote 95% of the required code...it just didn't work.

There is no signal emitted when the Clipboard contents change, so you need to poll the clipboard every X seconds to see if it's changed. I was afraid this world effect battery life, too.

Epic DOH! :(

debernardis 2009-05-31 19:24

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by BrentDC (Post 292400)
Did you refresh your application manager? I just tried installing it from Chinook Extras, and it installed fine.

I found the reason I couldn't upgrade (weird): I had a previous 0.2 version installed, the last I could use with Chinook, and for some reason neither apt nor the application manager enlisted the 0.4.4 version for upgrade. So I had to uninstall the previous one and then the new version showed where it belonged.

Now: testing :cool:

debernardis 2009-06-02 10:15

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
It works allright in Chinook. Having upgraded from 0.2, it took by default the .quickclip folder in home for storage. Only gtk was available as scrolling method: hildon and moko are greyed out and not selectable.
For the rest, nice and effective as usual :)

Nikem 2009-06-02 20:02

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
FYI: I installed quickclip for the first time on Diablo and couldn't install 0.4.4-1 because there was no .quickclip directory in /home/user, see the log of "apt-get install quickclip":
Code:

[..]
Unpacking quickclip (from .../quickclip_0.4.4-1_all.deb) ...
data dir exists ...
/var/lib/dpkg/tmp.ci/preinst: line 19: cannot create /home/user/.quickclip/parent_files.xml: nonexistent directory
chmod: /home/user/.quickclip/parent_files.xml: No such file or directory
dpkg: error processing /var/cache/apt/archives/quickclip_0.4.4-1_all.deb (--unpack):
 subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/quickclip_0.4.4-1_all.deb
[..]

But after creating the folder the install succeded.

BrentDC 2009-06-02 20:26

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by Nikem (Post 293065)
FYI: I installed quickclip for the first time on Diablo and couldn't install 0.4.4-1 because there was no .quickclip directory in /home/user, see the log of "apt-get install quickclip":
Code:

[..]
Unpacking quickclip (from .../quickclip_0.4.4-1_all.deb) ...
data dir exists ...
/var/lib/dpkg/tmp.ci/preinst: line 19: cannot create /home/user/.quickclip/parent_files.xml: nonexistent directory
chmod: /home/user/.quickclip/parent_files.xml: No such file or directory
dpkg: error processing /var/cache/apt/archives/quickclip_0.4.4-1_all.deb (--unpack):
 subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/quickclip_0.4.4-1_all.deb
[..]

But after creating the folder the install succeded.

Ah, you found a bug in the packaging :)

I will upload a fixed version asap!

Thanks.

skatebiker 2009-06-02 20:28

Re: [UPDATED] Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by BrentDC (Post 280493)
Today I'm pleased to announce the release of Quick Clip 0.4.1-1. What is Quick Clip? Quick Clip is the combination of a statusbar plug-in and text viewing application specifically designed for the Maemo platform. The statusbar plugin allows you to "clip" highlighted, or enter text directly, into a plain text file for later reference. While the text viewer easily allows you to read and/or access data you've already clipped.

http://static.maemo.org/style_maemo2...tton_small.png

New features in this release are:

* Added Clear submenu item
* Added Delete submenu item
* Switched to XML for target file list storage
* Switched storage location for user files
* Major code cleanup
* Fixed Open Bug
* Fixed preinst script
* Renamed Open Settings button to Browse
* QCV: Changed preference warning to bold
* QCV: Added application menu
* QCV: Fixed bug in scrolling choice
* QCV: Added Select All option
* QCV: Added Right/Left buttons for flipping through clippings
* QCV: Added Properties submenu item
* QCV: Added Help menu item
* QCV: Mapped the +/- keys to increase/decrease font size
* QCV: Mapped the Up/Down D-Pad keys to scrolling (only for GTK)
* QCV: Changed Title (more path visible)
* QCV: Major code cleanup

I earlier installed 0.31 which did not work, I upgraded to this version and it still does not work (after reboot), I see no icon in the top icon bar......
I tried again from the cmd line:
Code:

pocketpenguin:/home/user/MyDocs# apt-get install quickclip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  quickclip
0 upgraded, 1 newly installed, 0 to remove and 38 not upgraded.
Need to get 0B/43.6kB of archives.
After unpacking 315kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  quickclip
Install these packages without verification [y/N]? y
(Reading database ... 19023 files and directories currently installed.)
Unpacking quickclip (from .../quickclip_0.4.4-1_all.deb) ...
/var/lib/dpkg/tmp.ci/preinst: line 19: cannot create /root/.quickclip/parent_files.xml: nonexistent directory
chmod: /root/.quickclip/parent_files.xml: No such file or directory
dpkg: error processing /var/cache/apt/archives/quickclip_0.4.4-1_all.deb (--unpack):
 subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/quickclip_0.4.4-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
pocketpenguin:/home/user/MyDocs#


GeraldKo 2009-06-02 20:33

Re: [UPDATED] Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by skatebiker (Post 293081)
I earlier installed 0.31 which did not work, I upgraded to this version and it still does not work (after reboot), I see no icon in the top icon bar......

See this thread, post #16.

BrentDC 2009-06-02 20:37

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Did you enable it in the Control Panel? If so, and it still doesn't work, try installing the latest 0.4.4; you can find it in the Extras-devel repository.

There were a few bugs in the previous versions that would cause this behavior (and in 0.4.4 I fixed them).

Please report back on any issues.

BrentDC 2009-06-02 20:48

Re: [UPDATED] Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by skatebiker (Post 293081)
I earlier installed 0.31 which did not work, I upgraded to this version and it still does not work (after reboot), I see no icon in the top icon bar......
I tried again from the cmd line:
Code:

pocketpenguin:/home/user/MyDocs# apt-get install quickclip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  quickclip
0 upgraded, 1 newly installed, 0 to remove and 38 not upgraded.
Need to get 0B/43.6kB of archives.
After unpacking 315kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  quickclip
Install these packages without verification [y/N]? y
(Reading database ... 19023 files and directories currently installed.)
Unpacking quickclip (from .../quickclip_0.4.4-1_all.deb) ...
/var/lib/dpkg/tmp.ci/preinst: line 19: cannot create /root/.quickclip/parent_files.xml: nonexistent directory
chmod: /root/.quickclip/parent_files.xml: No such file or directory
dpkg: error processing /var/cache/apt/archives/quickclip_0.4.4-1_all.deb (--unpack):
 subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/quickclip_0.4.4-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
pocketpenguin:/home/user/MyDocs#


Whoa, $HOME is being interpreted as /root/ instead of /home/user/. I'm no bash expect, but something isn't right there...

I'll look into it.

BrentDC 2009-06-02 20:56

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
@skatebiker

Can you go to a Root prompt and type:

Code:

echo $HOME
And tell me the output?

Also, what do you use to gain root and do you use alternate bash interpreters?

BrentDC 2009-06-03 00:21

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by debernardis (Post 292873)
It works allright in Chinook. Having upgraded from 0.2, it took by default the .quickclip folder in home for storage.

In >= 0.4, Quick Clip wants you to store stuff in ~/MyDocs/Quick_Clip/ instead of ~/.quickclip/data/.

This is to be expected.

Quote:

Only gtk was available as scrolling method: hildon and moko are greyed out and not selectable.
This is also to be expected since Hildon scrolling is only for Fremantle and I couldn't get python-mokoui to build for Chinook.

Quote:

For the rest, nice and effective as usual :)
Great!


@everybody:

I just uploaded 0.4.4-2 which should (hopefully) fix the bug Nikem reported. This version is available from extras-devel on all OS's.

qwerty12 2009-06-03 00:28

Re: [UPDATED] Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by BrentDC (Post 293094)
Whoa, $HOME is being interpreted as /root/ instead of /home/user/. I'm no bash expect, but something isn't right there...

I'll look into it.

$HOME` == /root because dpkg will run the package's install scripts as root.

BrentDC 2009-06-03 02:21

Re: [UPDATED] Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by qwerty12 (Post 293156)
$HOME` == /root because dpkg will run the package's install scripts as root.

I see (although I still think it's strange it worked on some devices). What would be the correct way to get the user's home directory from a script run as root?

Thanks.

qwerty12 2009-06-03 06:55

Re: [UPDATED] Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by BrentDC (Post 293193)
What would be the correct way to get the user's home directory from a script run as root?

Unfortunately, I'm not sure that there is one (I certainly do not know of a method of getting it cleanly anyway, perhaps someone else does?). The thing is, preinst scripts aren't really meant to install files to ~ - dpkg is, as you'll know, from Debian which can be used with multiple users (I know, doesn't sound like a feature but look at Windows 95/98/ME to understand...) and, in that world, installing files to one person's ~ isn't correct - what if a user, with a new account made after installing such a program wants use a program that relies on that method of installing files?

But, anyway, sorry for the mini-rant above (it's not intended as one! :)). I hardcode "/home/user" because this is Maemo which is ever unlikely to see apps, desktop, etc running as a different account.

I can't remember which package demonstrates this but Nokia have a way of checking for scratchbox (think it's along the lines of "if [ -e /scratchbox/tools/config ]", something like that), if that scratchbox check proves true, you may wish to do something along the lines of: "for userz in `ls /home`; do cp whatever /home/$userz; done" etc. (with the caveat that this only works for already added users, not for users that'll be added later like above).

You may just want to do "if not os.path.exists" from your python application, upon its first run, and just copy the files if not existing from that. That'll be pretty much universal as you can get the correct $HOME etc.

skatebiker 2009-06-03 07:43

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Code:

pocketpenguin:~# apt-get install quickclip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  quickclip
0 upgraded, 1 newly installed, 0 to remove and 38 not upgraded.
Need to get 43.6kB of archives.
After unpacking 315kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  quickclip
Install these packages without verification [y/N]? y
Get:1 http://repository.maemo.org diablo/free quickclip 0.4.4-2 [43.6kB]
Fetched 43.6kB in 0s (60.4kB/s)
(Reading database ... 19023 files and directories currently installed.)
Unpacking quickclip (from .../quickclip_0.4.4-2_all.deb) ...
mkdir: cannot create directory '/root/MyDocs/Quick_Clip/': No such file or directory
Setting up quickclip (0.4.4-2) ...
chown: /root/MyDocs/Quick_Clip/: No such file or directory
Cache file created successfully.

still not working yet after reboot ....

BrentDC 2009-06-03 15:27

Re: [UPDATED] Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by qwerty12 (Post 293243)
Unfortunately, I'm not sure that there is one (I certainly do not know of a method of getting it cleanly anyway, perhaps someone else does?). The thing is, preinst scripts aren't really meant to install files to ~ - dpkg is, as you'll know, from Debian which can be used with multiple users (I know, doesn't sound like a feature but look at Windows 95/98/ME to understand...) and, in that world, installing files to one person's ~ isn't correct - what if a user, with a new account made after installing such a program wants use a program that relies on that method of installing files?

But, anyway, sorry for the mini-rant above (it's not intended as one! :)). I hardcode "/home/user" because this is Maemo which is ever unlikely to see apps, desktop, etc running as a different account.

I can't remember which package demonstrates this but Nokia have a way of checking for scratchbox (think it's along the lines of "if [ -e /scratchbox/tools/config ]", something like that), if that scratchbox check proves true, you may wish to do something along the lines of: "for userz in `ls /home`; do cp whatever /home/$userz; done" etc. (with the caveat that this only works for already added users, not for users that'll be added later like above).

You may just want to do "if not os.path.exists" from your python application, upon its first run, and just copy the files if not existing from that. That'll be pretty much universal as you can get the correct $HOME etc.

Oh, please keep ranting, that was very interesting!

I already do the if not os.path.exists checks at application startup to ensure the proper files are in place, just liked using pre/post install scripts to get things running from the get-go.

I now understand this is a very sloppy way to do things, and will not try to create any user-owned directories or files during application installation.

Based on what you just said I did a bit of Googling and came across this topic at StackOverflow:

http://stackoverflow.com/questions/5...-account-linux

...and that pretty much confirms everything you've said. In addition, the poster there seemed to think using "sudo echo $HOME" would result in the correct directory being printed. This might explain why this worked fine on my device but not others (the different ways to get root? that was my initial hunch).

Thanks for the tips!

BrentDC 2009-06-03 15:27

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by skatebiker (Post 293248)
Code:

pocketpenguin:~# apt-get install quickclip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  quickclip
0 upgraded, 1 newly installed, 0 to remove and 38 not upgraded.
Need to get 43.6kB of archives.
After unpacking 315kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  quickclip
Install these packages without verification [y/N]? y
Get:1 http://repository.maemo.org diablo/free quickclip 0.4.4-2 [43.6kB]
Fetched 43.6kB in 0s (60.4kB/s)
(Reading database ... 19023 files and directories currently installed.)
Unpacking quickclip (from .../quickclip_0.4.4-2_all.deb) ...
mkdir: cannot create directory '/root/MyDocs/Quick_Clip/': No such file or directory
Setting up quickclip (0.4.4-2) ...
chown: /root/MyDocs/Quick_Clip/: No such file or directory
Cache file created successfully.

still not working yet after reboot ....

I will be updated the package soon; hang in there.

qwerty12 2009-06-03 15:51

Re: [UPDATED] Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by BrentDC (Post 293355)
In addition, the poster there seemed to think using "sudo echo $HOME" would result in the correct directory being printed. This might explain why this worked fine on my device but not others (the different ways to get root? that was my initial hunch).

I believe this is because sudo does not inherit root's environment by default and continues to use the env. variables of the user it was invoked with.

AFAIK, the application manager uses a helper process (apt-worker) which uses sudo for its root ability and possibly does not inherit root environment variables either and runs dpkg with $HOME = /home/user - but I'm only sure on the apt-worker and sudo part, not sure about variable inheriting here. :)

BrentDC 2009-06-03 16:07

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
1 Attachment(s)
skatebiker:

I just built a test version. Do you mind testing it out? It's attached to this post.

BrentDC 2009-06-08 22:01

Re: [UPDATED} Quick Clip, a statusbar plugin to save text
 
Hi all!

I just uploaded 0.4.4-3 to Diablo/Chinook/Fremantle extras-devel. It fixes the installation problems related to the discussion above and uses a patch by qwerty12 (to use Hildon Filechooser instead of GTK).

Test away!

P.S. The next release should have some cool new features instead of just boring bug fixes!

thp 2009-06-08 22:38

Re: [UPDATED] Quick Clip, a statusbar plugin to save text
 
Quote:

Originally Posted by qwerty12 (Post 293243)
The thing is, preinst scripts aren't really meant to install files to ~ - dpkg is, as you'll know, from Debian which can be used with multiple users (I know, doesn't sound like a feature but look at Windows 95/98/ME to understand...) and, in that world, installing files to one person's ~ isn't correct - what if a user, with a new account made after installing such a program wants use a program that relies on that method of installing files?

Here's a suggestion: The "clean" way would probably be to install any "default config" files somewhere below /usr/share/<appname>/ and then on application startup check if the files in ~ exist, and if not, copy them from /usr/share/<appname>/. This way, the package can "manage" and "upgrade" the template files in /usr/share/<appname>/ without disrupting the user's (potentially modified) config in ~. And if the files are not meant to be modified, they should go into /usr/, anyway :)

(btw: Quick Clip works great for me so far :))


All times are GMT. The time now is 09:13.

vBulletin® Version 3.8.8