maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   To rescue a theme/icons from the command line? (https://talk.maemo.org/showthread.php?t=89824)

pichlo 2013-04-18 13:02

To rescue a theme/icons from the command line?
 
Basically, I ran rm -r /foo and by the time I realized that /home was mounted under /foo/bar and pressed Ctrl-C, I ended up with a messed up phone. It is mostly working (some apps crash on start, but the essential ones seem fine), but the theme and most icons are gone. It still displays the text under the icons but no icons. The few apps that do work show up without the title bar, the system and power menus show up as square grey buttons like in Windows 3, fonts are reduced to size 2... you get the idea. Reinstalling individual apps does not bring their icons back. I am out of storage on my PC for a backup and reflash but I can do that if push comes to shove. Of course, I would prefer if there was a better way.

I am not worried about the icons. I can bring them back from a vanilla image. But the theme is a different thing. Reinstalling alpha did not help. I thought of installing beta and switching there and back to see if it helps but I can't switch themes. Settings show up but do not react to buttons. Is there a way to do it by some other way? Or does anyone have a better idea?

I tried a quick search and found this case which is a bit similar but no solution.

reinob 2013-04-18 14:27

Re: Changing a theme from the command line?
 
I'm guessing Maemo can live without a /home, but not without /home/opt, which you've probably, partially, hosed.

In these cases the usual recommendation is to reflash, but knowing/guessing you I expect you'll try to "resuscitate" your N900. Fow now all I can say is good luck! :)

[it's a pity one cannot simply stop time to think about such "useless" but at the same time very interesting problems]

pichlo 2013-04-18 15:44

Re: Changing a theme from the command line?
 
I was afraid you'd say that :(

michaaa62 2013-04-18 19:47

Re: Changing a theme from the command line?
 
You might try to create a list of the packages dpkg thinks are installed and then reinstall each and every package. You will need plenty of bandwidth, better first download all the packages, then do the re-installation.
Code:

sudo gainroot
apt-get clean
apt-get update
dpkg -l | awk '/^ii/{ print $2 }' > apps_to_reinstall.txt
apt-get install --reinstall -y --force-yes $(<apps_to_reinstall.txt)

The last command might just download everything if you add '-dy' options.

There might be complaints of apt-get, so please FIRST ask, if anything would be removed or other errors are put out.

pichlo 2013-04-18 21:15

Re: Changing a theme from the command line?
 
That's it, thanks michaaa62! Except I used --reinstall too just to make sure, and started in small steps, such as
Code:

dpkg -l | grep osso-systemui | awk '/^ii/{ print $2 }' | xargs apt-ge
t install --reinstall -y --force-yes

That seems to have brought the theme back. Most icons are still missing but the windows decorations, buttons and texts look like they should. The auspices look good :)

BTW another reason I was hesitant with the flashing is that I have another device that just wouldn't flash. I have yet to find a solution for that one. Bricking this one would mean I would stay without a phone.

reinob 2013-04-19 08:05

Re: Changing a theme from the command line?
 
@pichlo,

See? all you needed was some luck, and @michaaa62, who always comes to the rescue :)

pichlo 2013-04-21 18:08

Re: Changing a theme from the command line?
 
In case anyone's interested, I've resuscitated the blighter. Reinstalling osso-systemui* brought back the themes and maemo-icons-203 brought back most icons. Then it was just a question of finding which apps had missing their icons missing or were otherwise broken and reinstalling those. Now the only two remaining problems are:

1) I have a mouse cursor on the screen. It follows the stylus which is kinda cool and it does not bother me so I am quite happy to leave it as it is but if someone knows what might have caused it I would be quite interested.

2) The icons for status-area-orientationlock-applet is missing and I cannot reinstall the package. It keeps telling me that it cannot be downloaded. I've had the same with some other package and then I've found that the download was called something else than the package name after the installation. Perhaps the same problem? What is the package really called?

Mind you, I would actually prefer to get rid of the package anyway and have the device permanently locked in landscape but apt is telling me that it would render libcpaboutcssu, rtcom-accounts-voip-support, rtcom-messaging-ui-portrait, dsme-thermalobject-surface, modest-home-applet, qtquickcompat and maemo-optify-runonce candidates for autoremove. The ones I am not sure about are the ones in italics. What exactly do they do?

michaaa62 2013-04-21 19:12

Re: Changing a theme from the command line?
 
Thanks for the feedback! I edited the commands and added the correct options for the install command to reinstall the packages for future reference.

No idea about that cursor...
The package status-area-orientationlock-applet is existing with that name
Code:

$ apt-cache policy status-area-orientationlock-applet
status-area-orientationlock-applet:
  Installed: 1.0+0cssu4
  Candidate: 1.0+0cssu4
  Version table:
 *** 1.0+0cssu4 0
        500 http://repository.maemo.org fremantle/free Packages
        500 http://192.168.49.208 fremantle/free Packages
        100 /var/lib/dpkg/status
    1.0+0cssu3.1 0
        500 http://repository.maemo.org fremantle/free Packages
    1.0+0cssu3 0
        500 http://repository.maemo.org fremantle/free Packages
        500 http://192.168.49.208 fremantle/free Packages
    1.0+0cssu2 0
        500 http://repository.maemo.org fremantle/free Packages
        500 http://192.168.49.208 fremantle/free Packages
    1.0+0cssu1 0
        500 http://repository.maemo.org fremantle/free Packages
        500 http://192.168.49.208 fremantle/free Packages
W: Ignoring Provides line with DepCompareOp for package binutils

You should have any of the cssu-stable or cssu-testing repos enabled to get it.

pichlo 2013-04-21 20:02

Re: Changing a theme from the command line?
 
Interesting. This is what I am getting.
Code:

# apt-get install --reinstall status-area-orientationlock-applet
Reading package lists... Done
Building dependency tree     
Reading state information... Done
Reinstallation of status-area-orientationlock-applet is not possible, it cannot be downloaded.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
# apt-cache policy status-area-orientationlock-applet
status-area-orientationlock-applet:
  Installed: 1.0+0cssu4
  Candidate: 1.0+0cssu4
  Version table:
 *** 1.0+0cssu4 0
        100 /var/lib/dpkg/status
    1.0+0cssu3.1 0
        500 http://repository.maemo.org fremantle/free Packages
    1.0+0cssu3 0
        500 http://maemo.merlin1991.at fremantle/free Packages
#

I wonder where that difference between my and your 1.0+0cssu4.0 comes from. As far as I can see, the repository is there for 1.0+cssu3.1.0.

Where is the sources file anyway? My /etc/apt/sources.list is empty:
Code:

# find / -name sources.list -exec ls -l {} \;
-rw-r--r--    1 root    root            0 Nov  3  2009 /etc/apt/sources.list
-rw-r--r--    1 root    root          596 Apr 20 17:13 /opt/fapman-cache/sources.list
-rw-r--r--    1 root    root          596 Apr 20 17:13 /home/opt/fapman-cache/sources.list
#

But apt knows about the sources:
Code:

# apt-cache policy
Package files:
 100 /var/lib/dpkg/status
    release a=now
 500 http://repository.maemo.org fremantle/non-free Packages
    release v=2.0,o=maemo,a=fremantle,l=Extras-devel,c=non-free
    origin repository.maemo.org
 500 http://repository.maemo.org fremantle/free Packages
    release v=2.0,o=maemo,a=fremantle,l=Extras-devel,c=free
    origin repository.maemo.org
 500 https://downloads.maemo.nokia.com ./ Packages
    release c=
    origin downloads.maemo.nokia.com
 500 http://repository.maemo.org fremantle-1.3/non-free Packages
    release v=2.0,o=maemo,a=fremantle-1.3,l=Extras,c=non-free
    origin repository.maemo.org
 500 http://repository.maemo.org fremantle-1.3/free Packages
    release v=2.0,o=maemo,a=fremantle-1.3,l=Extras,c=free
    origin repository.maemo.org
 500 https://downloads.maemo.nokia.com ./ Packages
    release c=
    origin downloads.maemo.nokia.com
 500 https://downloads.maemo.nokia.com ./ Packages
    release c=
    origin downloads.maemo.nokia.com
 500 https://downloads.maemo.nokia.com ./ Packages
    release c=
    origin downloads.maemo.nokia.com
 500 http://maemo.merlin1991.at fremantle/non-free Packages
    release a=community-thumb,c=non-free
    origin maemo.merlin1991.at
 500 http://maemo.merlin1991.at fremantle/free Packages
    release a=community-thumb,c=free
    origin maemo.merlin1991.at
 500 http://maemo.merlin1991.at fremantle/non-free Packages
    release a=community-devel,c=non-free
    origin maemo.merlin1991.at
 500 http://maemo.merlin1991.at fremantle/free Packages
    release a=community-devel,c=free
    origin maemo.merlin1991.at
 500 http://repository.maemo.org fremantle/non-free Packages
    release v=2.0,o=maemo,a=fremantle,l=community,c=non-free
    origin repository.maemo.org
 500 http://repository.maemo.org fremantle/free Packages
    release v=2.0,o=maemo,a=fremantle,l=community,c=free
    origin repository.maemo.org
Pinned packages:
    fennec -> (not found)
#

I can't believe apt is using the fapman list. The fact that it is identical is clearly just a result of mine laborously keeping HAM and FAM in sync.

pichlo 2013-04-21 21:13

Re: Changing a theme from the command line?
 
Never mind, I got the package with wget and installed it with dpkg -i. All is well now (bar that cursor that is, but that's a minor thing).

@michaaa62, thank you for your valuable input. You certainly nudged me in the right direction!

michaaa62 2013-04-22 05:41

Re: Changing a theme from the command line?
 
The sources.list is infamously hidden in /etc/apt/sources.d/hildon-application-manager.list .
The difference in the package cache might be from me using cssu-testing?

pichlo 2013-04-22 08:20

Re: Changing a theme from the command line?
 
Ah, thanks. Found it in /etc/apt/sources.list.d/hildon-application-manager.list.
Yeah, I am using CSSU-Devel.
Thanks again, much appreciated!

reinob 2013-04-22 08:33

Re: Changing a theme from the command line?
 
Quote:

Originally Posted by pichlo (Post 1337782)
1) I have a mouse cursor on the screen. It follows the stylus which is kinda cool and it does not bother me so I am quite happy to leave it as it is but if someone knows what might have caused it I would be quite interested.

Can you post a listing of /usr/share/icons/default/cursors? (/usr/share/icons should be a symlink to /opt/usr/share/icons).

In there you should have a file called "transp" (4160 bytes) -- that's your mouse cursor/icon (the name gives you a hint as to why it is invisible :).

There should be a lot of other files (also icons), which are all actually symlinks to the one and only mouse pointer icon in Maemo ("transp").

Hint: the transp icon comes from package osso-af-utils. Either apt-get --reinstall install osso-af-utils, or, if you're worried about postinstall side-effects (no idea, just being careful), you could just unpack the .deb and manually copy stuff.

reinob 2013-04-22 08:38

Re: Changing a theme from the command line?
 
Quote:

Originally Posted by pichlo (Post 1337782)
Mind you, I would actually prefer to get rid of the package anyway and have the device permanently locked in landscape but apt is telling me that it would render libcpaboutcssu, rtcom-accounts-voip-support, rtcom-messaging-ui-portrait, dsme-thermalobject-surface, modest-home-applet, qtquickcompat and maemo-optify-runonce candidates for autoremove. The ones I am not sure about are the ones in italics. What exactly do they do?

Those packages are part of the stuff that are installed as a dependency of the mp-fremantle-generic-pr (and I guess also mp-fremantle-community-pr, given the insistence of CSSU guys of copying Nokia ad absurdum..).

the dsme-thermalobject package, I guess, can be safely uninstalled -- although for some reason I still have it in my normal N900. Best is just to set it to manually installed (apt-get install dsme-thermal..) so that apt-get won't bother you.

modest-home-applet is the modest widget. I don't use it, so I have also removed it.

Whatever you want to keep, just set to manually installed.

pichlo 2013-04-22 08:57

Re: Changing a theme from the command line?
 
Quote:

Originally Posted by reinob (Post 1337874)
Can you post a listing of /usr/share/icons/default/cursors?

Err, no I can't. My /usr/share/icons contains only dtg and hildon. No defaults.

Thanks for the hint, I will reinstall osso-af-utils as soon as I get to the WiFi zone.

reinob 2013-04-22 09:06

Re: Changing a theme from the command line?
 
Quote:

Originally Posted by pichlo (Post 1337878)
Err, no I can't. My /usr/share/icons contains only dtg and hildon. No defaults.

Funny, I don't have "hildon" in there. Only default, dtg and hicolor. The latter is used by many packages, and actually contains a hildon subfolder. The bulk of it comes from *osso-icons-default*, so you might want to reinstall that package as well!

pichlo 2013-04-22 09:29

Re: To rescue a theme/icons from the command line?
 
Sorry, I meant hicolor.

pichlo 2013-04-22 18:24

Re: To rescue a theme/icons from the command line?
 
@reinob, you are a genius! Reinstalling osso-af-utils has indeed got rid of the cursor. I also tried osso-icons-default but it pulled maemo-icons-203 which is what I had reinstalled before so no change there.

BTW the mystery of my strange apt-cache is solved! Trying to reinstall osso-af-utils with apt-get got me the same "cannot be downloaded" error as status-area-orientationlock-applet did before so I opened HAM, re-saved all the repos, did HAM update and that fixed the apt policy.

pichlo 2013-04-24 08:54

Re: To rescue a theme/icons from the command line?
 
The last (haha!) question in this thread. What is the name of the package that pops up the "Enter SIM card PIN" dialog? I've searched the repos for SIM, PIN, card, prompt, request, init, startup and boot, all to no avail.

Wikiwide 2013-04-24 13:18

Re: To rescue a theme/icons from the command line?
 
Quote:

Originally Posted by pichlo (Post 1338440)
The last (haha!) question in this thread. What is the name of the package that pops up the "Enter SIM card PIN" dialog? I've searched the repos for SIM, PIN, card, prompt, request, init, startup and boot, all to no avail.

Search for lock.
http://maemo.org/packages/search/?org_maemo_packages_search[1][property]=name&org_maemo_packages_search[1][constraint]=LIKE&org_maemo_packages_search[1][value]=lock&org_maemo_packages_search[2][property]=title&org_maemo_packages_search[2][constraint]=LIKE&org_maemo_packages_search[2][value]=same
By the way, is maemo.org vulnerable to an attack when the SQL request to the database is exposed like that? Simple curiosity. Because such a complex-long url suggests that the user can specify different constraints, properties and values to the system, and the "name includes" package search is limited - like many graphical user interfaces are.
Best wishes.

pichlo 2013-04-24 13:35

Re: To rescue a theme/icons from the command line?
 
@Wikiwide,
Thanks, I will try that at home when I have an access to SSH. Just for a good measure I've tried "lock" in FAM and got a lot of hits involving clock and a few about device lock. I doubt this is device lock though, or is it?

reinob 2013-04-24 13:51

Re: To rescue a theme/icons from the command line?
 
@pichlo,

Package: connui-conndlgs-cellular

The PIN query is started by Xsession (/etc/X11/Xsession.d/05connui-conndlgs-cellular), which is a one-liner calling /usr/bin/startup-pin-query which runs startup-pin-query.launch via maemo-invoker.

There's also /usr/bin/pin-code-correct. I assume that one sends some d-bus/upstart signal.

Note that you also have /etc/event.d/pin-query (start on cellmo sim code-required) which calls startup-pin-query. I suppose this gets triggered when the SIM card is activated after booting (i.e. after Xsession has done its thing) and the PIN query hasn't been done yet (test -r /var/run/pin-query-done).

pichlo 2013-04-25 20:34

Re: To rescue a theme/icons from the command line?
 
@reinob, did I tell you that you are a genius? ;)

Sadly, it did not help. The reason for asking was that after my extempore, the "enter PIN" dialog heading is in tiny font. Everything else is fine. Not that it bothers me much, I know what it is asking me.

However, while on the topic, I would like the SIM card PIN query to pop up every time GSM is switched on, not just when the phone is switched on. That would include coming back from offline mode and after turning GSM off and back on through the advanced switcher. Is that doable?

Maybe I am just spoiled :) Having used a Treo 600 for 9 years. It had the SIM card available from outside. It also never switched off (except when the battery ran completely flat, but no way of turning it off through any user action). You could only switch between on- and offline modes. In offline mode, you could swap the SIM card. Switching back to online prompted you for a PIN (regardless of whether you swapped the SIM or not).

reinob 2013-04-26 06:57

Re: To rescue a theme/icons from the command line?
 
@pichlo,

Regarding your second point:

Assuming that whenever you go (back) to online mode an upstart event is triggered ("cellmo sim code-required"), the /etc/event.d/pin-query script should be run.

Now looking at that script, there are three reasons why it will *not* run the PIN query:

if env. var $SSC_WAS_READY = 1.
if /var/run/pin-query-done exists (is readable)
if env. var $EMERGENCY_CALL_STOPPED is empty.

Looking at my N900 now (online), neider SSC_WAS_READY nor EMERGENCY_CALL_STOPPED exists. So at least EMERGENCY_CALL_STOPPED should be set to something.

The file /var/run/pin-query-done exists.

I just tried going to offline mode, deleting pin-query-done and exporting EMERGENCY_CALL_STOPPED=yes (though I guess upstart should be restarted then.. and when I went back to online mode it did NOT ask me for the PIN. So it's not that easy.

reinob 2013-04-26 07:29

Re: To rescue a theme/icons from the command line?
 
Quote:

Originally Posted by pichlo (Post 1338960)
Sadly, it did not help. The reason for asking was that after my extempore, the "enter PIN" dialog heading is in tiny font. Everything else is fine. Not that it bothers me much, I know what it is asking me.

This sounds like a theme issue. Themes are also optified (usr/share/themes points to /opt/usr/share/themes), so I guess you also deleted (partially) your themes folder.

Try apt-get --reinstall install hildon-theme-beta hildon-theme-alpha libgtk2.0-common (plus whatever theme you may be using, if not one of those).

Then you could try switching from your current (broken) theme to another one, and then back to the current. Hopefully that will sort out the issue.

pichlo 2013-04-26 08:33

Re: To rescue a theme/icons from the command line?
 
Well, reinstalling hildon-theme-alpha was the very first thing I tried (see post #1). I also tried beta but I don't remember whether I tried switching there and back. And I reinstalled libgtk2.0-common last night because it had an update (to thumb).

Never mind, I can live with it. The important thing is that everything else seems to work fine.

Thanks for your experiments with the PIN request. I had noticed the /var/run/pin-query-done file and tried deleting it but with results similar to yours.


All times are GMT. The time now is 18:05.

vBulletin® Version 3.8.8