The officially official Devuan Forum!

You are not logged in.

#1 2020-12-06 02:17:53

Altoid
Member
Registered: 2017-05-07
Posts: 575  

Obmenu-generator problem

Hello:

Continuing with my 1000HE Beowulf install ...
Trying to set up Openbox to my liking.

I read about it so off I went to https://miyolinux.weebly.com/obmenu-generator.html and followed the instructions for setting up the obmenu-generator.

But I cannot get it to work.
I get these errors:

groucho@eee-dev3:~$ obmenu-generator -p -i
mkdir /home/groucho/.config/obmenu-generator/icons: Permission denied at /usr/bin/obmenu-generator line 208.
groucho@eee-dev3:~$ 
}

if ($with_icons and not -d $icons_dir) {
    remove_database($cache_db);
    require File::Path;
    File::Path::make_path($icons_dir)   <-------------------------------- line 208 (according to jed)
      or warn "$0: can't create icon path `$icons_dir': $!\n";
}
groucho@eee-dev3:~$ obmenu-generator -s -c
Can't open file '/home/groucho/.config/obmenu-generator/config.pl' for write: Permission denied at /usr/bin/obmenu-generator line 265.
groucho@eee-dev3:~$ 
sub dump_configuration {
    require Data::Dump;
    open my $config_fh, '>', $config_file        <--------------------- line 265 (according to jed)
      or die "Can't open file '${config_file}' for write: $!";
    my $dumped_config = q{our $CONFIG = } . Data::Dump::dump(\%CONFIG) . "\n";
    $dumped_config =~ s/\Q$home_dir\E/\$ENV{HOME}/g if ($home_dir eq $ENV{HOME});
    print $config_fh $config_documentation, $dumped_config;
    close $config_fh;
}

No idea as how to deal with this.
Anyone used it?

Thanks in advance,

A.

Offline

#2 2020-12-06 03:11:38

GlennW
Member
Registered: 2019-07-18
Posts: 79  

Re: Obmenu-generator problem

Hi, What are the permissions for the location "/home/groucho/.config/obmenu-generator"?

maybe the installer has left the permission to write as root or admin only.

if so, you could try as root to make the location available to write by the user groucho with

chown -hR groucho:groucho /home/groucho/.config/obmenu-generator

and

chmod -R 755 /home/groucho/.config/obmenu-generator

Then try again.

I hope this helps. :-)

Offline

#3 2020-12-06 10:13:24

Altoid
Member
Registered: 2017-05-07
Posts: 575  

Re: Obmenu-generator problem

Hello:

GlennW wrote:

... permissions for the location "/home/groucho/.config/obmenu-generator"?

Hmmm ...
The wrong ones.

groucho@eee-dev3:~$ ls -l /home/groucho/.config/obmenu-generator
total 8
-rw-r--r-- 1 root root 4986 Dec  5 21:30 schema.pl
groucho@eee-dev3:~$ ls -l /home/groucho/.config
groucho@eee-dev3:~$ ls -l /home/groucho/.config
total 328
--- snip ---
drwxr-xr-x 2 root    root      4096 Dec  5 21:30 obmenu-generator
--- snip ---
groucho@eee-dev3:~$ 
GlennW wrote:

... installer has left the permission to write as root or admin only.

It seems so.
I did follow the instructions, specifically where it said not to use root.
Evidently I did something wrong.

GlennW wrote:

... make the location available to write by the user ...

chown -hR groucho:groucho /home/groucho/.config/obmenu-generator

and

chmod -R 755 /home/groucho/.config/obmenu-generator

That was it.

groucho@eee-dev3:~$ obmenu-generator -p -i
:: A dynamic menu has been successfully generated!
groucho@eee-dev3:~$ 
GlennW wrote:

I hope this helps.

It did.  8^D
Thanks a lot for your input.

Cheers,

A.

Offline

#4 2020-12-06 10:25:56

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 1,383  
Website

Re: Obmenu-generator problem

Check the installation instructions on trizen's github site: https://github.com/trizen/obmenu-genera … INSTALL.md

That has a link to my Debian packages for obmenu-generator, which include a package for the DesktopEntry perl modules (if you add the repository then these will be installed as a dependency of the obmenu-generator package).

If you decide to use my packages then you should try to remove the perl modules that were installed by the cpanm commands listed in Miyo's guide:

# cpanm uninstall Linux::DesktopFiles Data::Dump File::DesktopEntry

If you decide not to use my packages then you should still remove the Linux::DesktopFiles & Data::Dump perl modules because installing them with cpanm means that they will not be updated if any vulnerabilities are found in them.

The Devuan repsositories already have packages for those modules and they will be updated if any vulnerabilities arise:

# apt install libfile-desktopentry-perl libdata-dump-perl

Although in my tests the libfile-desktopentry-perl package isn't actually needed to generate the menus.

HTH

EDIT: libfile-desktopentry-perl is an optional dependency to provide locale support, I'll add it to my package as a Recommends.

EDIT2: package updated, the current version is now 0.89-2.

Last edited by Head_on_a_Stick (2020-12-06 10:34:17)


Black Lives Matter

Offline

#5 2020-12-06 13:09:53

dice
Member
Registered: 2020-11-22
Posts: 246  
Website

Re: Obmenu-generator problem

sort of off topic my post here but might be worth it.

I was on reddit unixporn a few days ago and their is this person creating an openbox menu in python3. Worth a look atleast if you are using openbox. Doesn't have all the functionality of obmenu-generator but i like where it is heading only using python libraries.

https://github.com/jruss06/boxmenu

https://www.reddit.com/r/unixporn/comme … generator/


“That which is below is like that which is above, and that which is above is like that which is below, to perform the miracles of one only thing.”

-Hermes Trismegistos

Online

#6 2020-12-06 16:27:49

Altoid
Member
Registered: 2017-05-07
Posts: 575  

Re: Obmenu-generator problem

Hello:

Head_on_a_Stick wrote:

Check the installation instructions ...
... link to my Debian packages ...
... decide to use my packages ...

Done.
I was having a hard time with the other install.
Took a while to week everything out.
But finally managed to get it done.

Head_on_a_Stick wrote:

... try to remove the perl modules ...

# cpanm uninstall Linux::DesktopFiles Data::Dump File::DesktopEntry

It only worked with

# cpanm --uninstall Linux::DesktopFiles Data::Dump File::DesktopEntry
Head_on_a_Stick wrote:

HTH

Yes ...
Much easier/straightforward to install.

But I think it may have a problem (?).
It would not pick up xfe, starting Firefox instead.
Again, after a while I managed to get a hold on editing schema.pl and fixed it.

Now I have a problem with a couple of Openbox entries I use frequently.
In my previous non-configurator menu, I had entries for reboot and shutdown.

execute --> lxterminal sudo -e shutdown -r now and execute --> lxterminal sudo -e shutdown -r now.

These still work perfectly well from the command line ie: sudo -e shutdown -r/h now but using the stanza in schema.pl won't work.

What am I missing?

---

dice wrote:

sort of off topic ...

Nah !

dice wrote:

Doesn't have all the functionality of obmenu-generator ...

Let me see if I can get my head around this one first.  8^7
Thanks for the heads up.
---

Thanks in advance,

A.

Last edited by Altoid (2020-12-06 16:33:27)

Offline

#7 2020-12-06 17:25:00

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 1,383  
Website

Re: Obmenu-generator problem

Altoid wrote:

using the stanza in schema.pl won't work

You should show us exactly what you are adding to ~/.config/obmenu-generator/schema.pl.

This works for me:

{item => ['sudo shutdown -r now', 'Reboot']},

That entry doesn't have an icon but one can be added with a third item between the square brackets.

FWIW I prefer to use obsession to exit the openbox session.


Black Lives Matter

Offline

#8 2020-12-06 18:33:23

Altoid
Member
Registered: 2017-05-07
Posts: 575  

Re: Obmenu-generator problem

Hello:

Head_on_a_Stick wrote:

You should show us exactly what you are adding ...

Right ...
It is the same stanza I used with the previous OB setup.

## This uses the 'oblogout' menu
{item => ['lxterminal sudo -e shutdown -r now', 'Reboot', 'applications-system']},

and

## This uses the 'oblogout' menu
{item => ['lxterminal sudo -e shutdown -h now', 'Shutdown', 'applications-system']},
Head_on_a_Stick wrote:

This works ...

{item => ['sudo shutdown -r now', 'Reboot']},

... doesn't have an icon ...

Indeed ...
Works as intended.
I used one of the other available icons.

BTW: only those icons are available? ie: the ones with the UUID type names?

Head_on_a_Stick wrote:

... prefer to use obsession to exit the openbox session.

I'm used to ctrl+alt+backspace, fast enough.

Thanks for your input.

Cheers,

A.

Offline

#9 2020-12-06 19:13:39

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 1,383  
Website

Re: Obmenu-generator problem

Altoid wrote:

It is the same stanza I used with the previous OB setup.

## This uses the 'oblogout' menu
{item => ['lxterminal sudo -e shutdown -r now', 'Reboot', 'applications-system']},

and

## This uses the 'oblogout' menu
{item => ['lxterminal sudo -e shutdown -h now', 'Shutdown', 'applications-system']},

I think you must be mistaken — the -e switch for sudo invokes it as an editor for the file named afterwards, check ~/.xsession-errors to confirm this. I think you meant to use

{item => ['lxterminal -e sudo shutdown -h now', 'Shutdown', 'applications-system']},

But you don't need to open a terminal emulator to run the command wink

Altoid wrote:

only those icons are available? ie: the ones with the UUID type names?

Not sure, sorry. I would investigate but the snooker's on TV big_smile


Black Lives Matter

Offline

#10 2020-12-06 21:35:44

Altoid
Member
Registered: 2017-05-07
Posts: 575  

Re: Obmenu-generator problem

Hello:

Head_on_a_Stick wrote:

... must be mistaken ...

Quite so.  8^/
Was without my coffee ...

Head_on_a_Stick wrote:

Not sure, sorry. I would investigate ...

I'll have a look and see.
Snooker is a priority.  8^D

Thanks a lot for your help.

Cheers,

A.

Offline

#11 2020-12-07 15:10:41

MiyoLinux
Member
Registered: 2016-12-05
Posts: 1,070  

Re: Obmenu-generator problem

Not sure what the problem could be. The instructions on the MiyoLinux website always works for me...on Ascii, Beowulf, and Ceres.  ???

If HoaS's package works for you then, by all means use it. smile

Did you install the depends according to the "Debian-based" instructions on the website?

For Debian-based systems...

apt install make git cpanminus libgtk2-perl

You may now need to install libtgtk3-perl too. wink  I need to update the site.

Hi, What are the permissions for the location "/home/groucho/.config/obmenu-generator"?

I'm lazy and just open the file manager, go to ~/.config/ and create the obmenu-generator folder as myself...the regular user. wink Did you mistakenly create it as root instead?

Now I have a problem with a couple of Openbox entries I use frequently.
In my previous non-configurator menu, I had entries for reboot and shutdown.

execute --> lxterminal sudo -e shutdown -r now and execute --> lxterminal sudo -e shutdown -r now.

These still work perfectly well from the command line ie: sudo -e shutdown -r/h now but using the stanza in schema.pl won't work.

What am I missing?

elogind commands...

Shutdown = loginctl poweroff

Reboot = loginctl reboot


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#12 2020-12-07 18:58:02

Altoid
Member
Registered: 2017-05-07
Posts: 575  

Re: Obmenu-generator problem

Helllo:

MiyoLinux wrote:

Not sure what the problem could be.
... depends according to the "Debian-based" instructions ...

Yes.
And added libtgtk3-perl just in case.  8^)

MiyoLinux wrote:

Did you mistakenly create it as root instead?

I don't think so ...
But given the results, I've been thinking it that I may have.

Altoid wrote:

What am I missing?

MiyoLinux wrote:

elogind commands...
Shutdown = loginctl poweroff
Reboot = loginctl reboot

Thanks for the heads up.
I'll have a look and see how I do with those.

Thanks for your input.

Cheers,

A.

Offline

Board footer