No taskbar menu entry after apt-get (solved)

We need to look at this one

No taskbar menu entry after apt-get (solved)

Postby saintless » Fri Sep 07, 2012 6:34 am

I suggest we add here programs without auto added menu entry in the taskbar menu after apt-get install command. And the right steps to fix this for each one.

After installing KXStistch with apt-get there is no menu entry for it in the taskbar menu. There is menu entry in the debian menu in Graphics section. Taskbar menu also has Graphics section but KXStitch is not there.
User avatar
saintless
 
Posts: 246
Joined: Sat Jul 14, 2012 7:01 am
Location: Bulgaria

Re: No taskbar menu entry after apt-get

Postby saintless » Fri Sep 07, 2012 6:48 am

To create taskbar menu entry for KXStitch make a file called kxstitch.desktop in /usr/share/applications with this text inside:
Code: Select all
[Desktop Entry]
Name=KXStitch
Exec=kxstitch
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
Icon=kxstitch
Categories=Graphics;PackageManager;
User avatar
saintless
 
Posts: 246
Joined: Sat Jul 14, 2012 7:01 am
Location: Bulgaria

Re: No taskbar menu entry after apt-get (SOLVED)

Postby saintless » Fri Sep 07, 2012 8:44 am

Now I see this output from apt-getting KXStitch:
Code: Select all
Processing triggers for man-db
fopen: Permission denied

I'm not sure if it has something to do with the missing menu entry but I will leave it here for information.
User avatar
saintless
 
Posts: 246
Joined: Sat Jul 14, 2012 7:01 am
Location: Bulgaria

Re: No taskbar menu entry after apt-get (SOLVED)

Postby jbv » Fri Sep 07, 2012 11:12 am

Ignore that one. It is the ownership of /usr/share/mans
It won't affect anything.

FYI: Amongst other things and zapping all "mans" and related files to a zero-byte size without breaking stuff, this is what 99-zapmans was for in DevRel_02 as it always made sure the ownership was okay.

Devrel_03 fixes this, but you should still use 99-zapmans to zero-out the manuals and doc files (that no-one reads or uses) to reduce the size of our .sqf

Has anyone actually looked at the scripts and what they do?
I'm giving you a tip here ... have a look a them!
.... There is pure "gold" in that directory ... :lol:
jbv
 
Posts: 600
Joined: Sat Jul 14, 2012 2:02 am
Location: Sydney, Australia

Re: No taskbar menu entry after apt-get (SOLVED)

Postby saintless » Fri Sep 07, 2012 11:53 am

jbv wrote:Has anyone actually looked at the scripts and what they do?
I'm giving you a tip here ... have a look a them!
.... There is pure "gold" in that directory ... :lol:


Hi, Brenton,

do you really think it is easy to understand what does it says :oops:
Clean /usr/share/doc (man) (info) is easy to understand but the rest is still like Chinese language for me.
Code: Select all
#!/bin/bash

# Configurable variables
CLEANDOC="yes"   # Clean /usr/share/doc?
CLEANMAN="yes"   # Clean /usr/share/man?
CLEANINF="yes"   # Clean /usr/share/info?

# Do not edit anything below here!

zerosize() {
  find $* | while read file; do
    echo -n "."
    rm -f $file
    touch $file
  done
}

if [$1 = ""]; then
    echo "Enter a valid .sqf working directory"
  exit
fi
if [ -d $1 ]; then
  echo "***"
  echo "*** About to strip" $1
  echo "***"
  Pause
  if [ "$CLEANDOC" == "yes" ]; then
    echo -n "Cleaning " $1"/usr/share/doc"
    zerosize $1/usr/share/doc -type f -size +1c
    zerosize $1/usr/share/doc -type l
    echo ""
  fi
  if [ "$CLEANMAN" == "yes" ]; then
    echo -n "Cleaning "$1"/usr/share/man"
    zerosize $1/usr/share/man -type f -size +1c
    zerosize $1/usr/share/man -type l
    echo ""
  fi
  if [ "$CLEANINF" == "yes" ]; then
    echo -n "Cleaning "$1"/usr/share/info"
    zerosize $1/usr/share/info -type f -size +1c
    zerosize $1/usr/share/info -type l
    echo ""
  fi
else
    echo "Enter a valid .sqf working directory"
fi
#
# Make sure that the /usr/share/man directory ownership is man:root
#
chown -R man:root $1/usr/share/man


The scripts are very useful but even I am afraid to use most of them not knowing what they really do and not knowing do I really want what they do. I will test them all in time but for the moment when I open the /scripts folder I get confused what to use.
This thread gives some information but I think we will have to make full scripts list with explanation what each one does in one single easy to be found forum page.

I had no idea there is a connection between 99-zapmans and the denied permissions from apt-get if I understood you right.

Cheers, Toni
User avatar
saintless
 
Posts: 246
Joined: Sat Jul 14, 2012 7:01 am
Location: Bulgaria

Re: No taskbar menu entry after apt-get (SOLVED)

Postby jbv » Fri Sep 07, 2012 12:17 pm

Nah, you're fine Toni.

I know that a lot of stuff still needs documenting and the /scripts directory is very high on that list.

When creating a lot/most of them, I often have all 3 of the machines on my desk running and am reading various versions or interpretations of what various commands/tools should do, while trying to work out what they really do and then trying to work our the subtle yet critical difference between actually typing the command from a command-line in a console/terminal session and scripting it. FYI: there are often some really important differences especially when you are trying to pass variables that get parsed.

FYI: I often have to resort to looking back into proven scripts that I have already created and quote often even then, something changes due to the context I am now trying to use something in.

The awk and sed stuff are classic examples of this.

I am sorry if the scripts seem cryptic, and perhaps I should put more comments in them.
In my own defense (if this is valid), while creating them I am thinking of the overall performance and how quickly they will run. I am also trying to make them as lean-and-mean as possible. I am trying very hard to avoid bloat, yet have them do what they need to do while also trying to add as much sainty checking as possible so they will work for anyone. Basically, I am trying to create scripts that will work for everyone in every scenario and be lean/mean/fast while being clear enough that someone who understands things won't pay out on me for being sloppy, while I can understand it when I review/look at it 2 years time. It is a fine line. If it were pure "c" or "assembler", and we had no issue with disk space, I'd go nuts with comments. I must admit, I am still struggling (in my mind) with the acceptable middle-ground. As there has not been one person provide any feedback or comment (other than you just now), I'm working in the dark here mate. I'm doing the best I can. In time we will find the balance.

All I can ask is that in the meantime, you do what I do and research things.
Hack/slash and burn. Test stuff. Make backups and have no fear. Take no prisoners. Play and explore.
With FoxyRoxy, it is not that bad and she is pretty forgiving :)

I was quite serious when (in the pussy thread) I said I had killed that many pussies, that I was scared every time there was a knock at the door that it was the RSPCA and Police who were there to arrest me for "Pussy abuse" ...

Cheers, Brenton
jbv
 
Posts: 600
Joined: Sat Jul 14, 2012 2:02 am
Location: Sydney, Australia

Re: No taskbar menu entry after apt-get (SOLVED)

Postby jbv » Fri Sep 07, 2012 12:30 pm

Oh, almost forgot :oops:

99-zapmans is a script that performs a trick ... like many of our scripts :)

What it does is look at every file in a directory tree that you enter on the command line. It reads down though the tree you tell it to and looks for files inthe document, manual, and info directories that will reside (live) in /usr/share and zero's them out. What I mean is that it deletes them yet it doesn't, It actually creates a file of the same name with a filesize of 0 bytes :o

The reason it does this is so that when apt/dpkg looks at the file to either check a version or delete, it does not barf. Nor does the program itself. It is a simple yet old trick that still works. Most if not all programs that look for a file, look for the filename and do not check the actual file. So, if we create a zero size file, then they are happy. Wehn compressing a zero byte file it takes exactly zero bytes in our squashfs file (except for the unavoidable filename and pointer), but there is no way to create a smaller .sqf unless you delete the file (which most people would do) although deleting the file can and will often have unintended consequences. FoxyRoxy is "better" than "the rest", so we go the extra mile.

To use 99-zapmans on a 95-create file you have just made, you would type....
95-load to load the 95-snap file into a known location
99-zapmans /tmp/99-snap assuming you have not used 99-setdirs to change the default load/save directories
[b]95-save[b] to save the "cleaned" stuff...

Try it .... If it goes to hell in a hand-basket. Restart do it all again and work out what you have overlooked or done wrong and ... Oh, Welcome to my world :)

Cheers, Brenton
jbv
 
Posts: 600
Joined: Sat Jul 14, 2012 2:02 am
Location: Sydney, Australia

Re: No taskbar menu entry after apt-get (SOLVED)

Postby saintless » Fri Sep 07, 2012 12:38 pm

Thanks for the pointers, Brenton,
I will experiment more with the scripts. In time we can move your post from here to appropriate scripts thread when we have one.
Cheers
User avatar
saintless
 
Posts: 246
Joined: Sat Jul 14, 2012 7:01 am
Location: Bulgaria

Re: No taskbar menu entry after apt-get (SOLVED)

Postby KazzaMozz » Sat Sep 08, 2012 11:34 pm

Hi Brenton
yep will be experimenting heaps more too.
I'm still ploughing through the scripts re what they do. Which I should use when etc to get the end result I want.
The best way is to trial them out. If it doesn't work start again. I keep 1 pure sticks that is not mucked with 2 with NVIDIAs and the other with Intels stuff. The others are for trashing and testing.

Try it .... If it goes to hell in a hand-basket. Restart do it all again and work out what you have overlooked or done wrong and ... Oh, Welcome to my world :)


I think you are right. It really is the only way to understand how they work.

Cheers
User avatar
KazzaMozz
 
Posts: 332
Joined: Tue Aug 21, 2012 9:59 pm
Location: Australia


Return to Whoops - This needs fixing



Who is online

Users browsing this forum: No registered users and 1 guest

cron