You are not logged in.

#1 2021-04-21 16:47:03

bunsencub
Member
Registered: 2021-04-15
Posts: 36

[SOLVED]BL Beryllium: program, opened normal or as root?

Hi,

I am referring to the Experimental BL Beryllium installed as described by johnraff in https://forums.bunsenlabs.org/viewtopic.php?id=7356.

When I open Geany as normal user a screenshot of the top of the program looks like this:
Geany as normal user

When I open Geany as root it looks like this:
Geany opened as root

The latter is how Geany looks, I would say, since decades wink, say in Ubuntu or Debian. I should add that the latter version is essential if you use Geany as programming IDE - which is its strength. Why can't I have the proper Geany as a normal user in BL Beryllium, please?



Thanks, bunsencub

P.S.In my thread https://forums.bunsenlabs.org/viewtopic.php?id=7543 I describe how I swetted my blood out wink to tweak Geny to work as IDE in BL, anyway.
P.P.S. By the way, Thunar looks different, too, when run as user or as root, so this strange behaviour seems not to be Geany related.

Last edited by bunsencub (2021-04-25 14:47:16)

Offline

#2 2021-04-21 17:03:18

manyroads
Member
From: around here, somewhere
Registered: 2019-04-16
Posts: 95
Website

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

Those looks are theme based (different themes for root & non-root).  You'll probably see the same if you open File Manager as Root and/or non-root.  The difference is typical so the user will know when they have G*d powers and when they are less at risk to send their system into the netherworld.

If you want both themes to look different you can enter lxappearance using sudo (for root) or without sudo for regular user themes.

Last edited by manyroads (2021-04-21 17:05:01)


Pax vobiscum,
Mark Rabideau - http://many-roads.com  Professional Genealogist
dwm & i3wm on arch ~ Reg. Linux User #449130
"For every complex problem there is an answer that is clear, simple, and wrong." H. L. Mencken

Offline

#3 2021-04-21 17:49:27

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,034

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

bunsencub wrote:

When I open Geany as normal user a screenshot of the top of the program looks like this:
Geany as normal user

When I open Geany as root it looks like this:
Geany opened as root

The latter is how Geany looks, I would say, since decades wink, say in Ubuntu or Debian. I should add that the latter version is essential if you use Geany as programming IDE - which is its strength. Why can't I have the proper Geany as a normal user in BL Beryllium, please?
[...]
P.S.In my thread https://forums.bunsenlabs.org/viewtopic.php?id=7543 I describe how I swetted my blood out wink to tweak Geny to work as IDE in BL, anyway.

So, why open a new thread?

P.P.S. By the way, Thunar looks different, too, when run as user or as root, so this strange behaviour seems not to be Geany related.

No, as I pointed out in topic 7543, it is user related. Have you not tested  changing themes with obconf and lxappearance, and changing aplication look from menu Edit => Preferences why start a new thread and ask the same question again? I can not understand that...

If you like the look of geany run as root, you can make geany run by you look the same!!!


// Regards rbh

Offline

#4 2021-04-21 18:23:15

bunsencub
Member
Registered: 2021-04-15
Posts: 36

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

manyroads wrote:

...The difference is typical so the user will know when they have G*d powers and when they are less at risk to send their system into the netherworld.

Thank you, but I do not understand the logic behind this. Why should a normal user be forced to work with a program the essential icon buttons of are barely visible - rest assured I tried many different color schemes, and this one I show here is the best one I could muster - and
why would it be only the priviledge of someone who has G*d powers" to have the program look real with clear and distinctive buttons? Compare the pictures in the links I presented. Wouldn't it easier for someone to see that he is less at risk if he sees a good program and not a bad  program?

Offline

#5 2021-04-21 20:15:51

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,280
Website

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

Probably the One way to do this is to never elevate gui stuff, but do some workarounds

SUDO_EDITOR=geany sudo -e /etc/apt/sources.list

Should run geany as your user. (See 'man sudo' and search for '--edit')

rDLHw7x.png

https://wiki.archlinux.org/index.php/Sudo#Editing_files
https://wiki.archlinux.org/index.php/Ru … ns_as_root

bunsencub wrote:

...if he sees a good program and not a bad program?

That's just like your opinion, man...

Last edited by brontosaurusrex (2021-04-21 20:42:11)

Offline

#6 2021-04-21 22:39:33

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,034

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

bunsencub wrote:

Thank you, but I do not understand the logic behind this. Why should a normal user be forced to work with a program the essential icon buttons of are barely visible

Nope, it is not like that! Your problem to configure geany to your liking is not distinctive for the general linux user.

But, many openbox user prefer to have the gui light and only have text in geanys toolbar. So, that is in BunsenLabs the default setting for users.

@bunsencub, if you quit ignore what I write:
Check also in lxappearance, menu-choice "Other". There is settings for icons or text and icons and size for icons in toolbars.

Edit:
You also need to check Icon theme in lxappearance. I think you would prefer Adwaita or GNOME.

Last edited by rbh (2021-04-22 11:35:37)


// Regards rbh

Offline

#7 2021-04-23 00:38:45

hhh
Meep!
Registered: 2015-09-17
Posts: 11,653
Website

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

OK, I'm totally confused.

I'm not on a BL system ATM, but IIRC correctly the difference in the user theme and the sudo theme is a hold-over from #! which I like, as it's a clear indication for the sighted among us that you are now in "You Could Wreck Your System" mode.

Geany, that theme on the user end is customized by @johnraff IIRC, so the difference from the root theme could easily be more dramatic.

-edit-
Looking at the OP scrots again, that looks like a user theme in the first pic and Adwaita (the default Debian GTK theme) in the second, so the intended theming.

Actually, I have no idea what your second theme is, but the icons also switch from symbolic icons to GNOME or Tango, I can't tell anymore.

Notice font size has also changed. You can change all of this system-wide in, what, the root lxappearance-settings, for a start. sudo lxappearance, I think.

Just... when all your root and user themes match, don't forget what window you're in.

Offline

#8 2021-04-23 00:59:33

manyroads
Member
From: around here, somewhere
Registered: 2019-04-16
Posts: 95
Website

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

Maybe we need to simply acknowledge that certain users don't appreciate BL's fine legacy.  Making BL work a non #! way, simply destroys the legacy of #!.  Could it be this is not a fit for everyone? 

MODS: please delete if my comment is offensive/ inappropriate.


Pax vobiscum,
Mark Rabideau - http://many-roads.com  Professional Genealogist
dwm & i3wm on arch ~ Reg. Linux User #449130
"For every complex problem there is an answer that is clear, simple, and wrong." H. L. Mencken

Offline

#9 2021-04-23 01:12:14

hhh
Meep!
Registered: 2015-09-17
Posts: 11,653
Website

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

^ Not at all offensive, or even controversial, for that matter. The Linux distro universe is so rich right now, how can you not find a setup you like? It would take some extreme laziness. I mean, Slackware is about to put out 15, a new release. Slack and Deb are the two dinosaurs of Linux...

https://www.osradar.com/slackware-15-beta-released/

Or get down with you inner geek and run Arch, Fedora, Mint, openSuse, Ubuntu, Kubuntu, Lubuntu, Xubuntu, Ubuntu Studio, Ubuntu Budgie. Knoppix, Siduction, Void, Kali... BSD (any one and you are a god). MX Linux, the most popular distro at the moment. PCLinux OS, PureOS. Bhodi, Tiny, AntiX, Cub, Puppy, elementary. Pinguy, Peppermint, Trisquel, Zorin. Deepin, Devuan, Mepis, Kanotix, Pardus, Raspberry. Sparky, SteamOS, Damn Small Linux, Sabayan, ArchBang, ArchLabs, Endeavour. Linux From Scratch, to name a few.

... all on the same computer if you want. We don't care, bring it!

Also, you can manipulate BL in so many ways. That's the whole point/advantage of using a light-weight, modular with few dependencies, faux DE.

What you can remove from base GNOME or KDE is very limited. Xfce gets it right, which is why we use utilities of theirs like xfce4-power-manager and xfce4-notifyd. You can use them without having to install the whole xfce4 metapackage.

Offline

#10 2021-04-23 16:11:44

bunsencub
Member
Registered: 2021-04-15
Posts: 36

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

After being now more familiar with BL, I should rephrase my thread's title. A few wordsfirst: I was perplexed when I first opened BL Beryllium, it was so different from the other Linux distros I was used to. But, after some installations later, it treats my old notebook more gentle then, say, Ubuntu 20.04 or Debian Bullseye/sid. Now the new title:

Beryllium encourages executing programs as Root. Is this safe?

Think of a normal Linux user who has his first experience with BL. He will be happy to find programs he's familiar with. He even finds the lightweight programming IDE Geany in Menu > Applications > Development. BL comes with it per default, no need to install, as necessary in other distros. Happily, opens Geany and texts in a simple code from, say, "Hello World!: Computer Programming..." or "Coding for Kids". This what I see when I open Geany in my version of BL and type a short Python code (the coding error is deliberate):

https://ibb.co/JQHWTgt

Geany obviously finds the error, but that's it. After correcting, the user will not find any means to build and test the python script.

Then, the user finds "Run as root" in the "Build" menu. Kind of strange, but, like magic, klicking it the real Geany comes out of the bottle, like so:

https://ibb.co/zhx1sN6

Building, running the script... you name it, everything now is fine! Everybody so far kept telling me "Don't run a programm as root user, if it is not absolutely necessary". Is it safe then in BL to run programs as root? Woulnd't this be risky behaviour?

Thanks, bunsencub

Last edited by bunsencub (2021-04-23 16:12:33)

Offline

#11 2021-04-23 19:55:22

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,034

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

bunsencub wrote:

I was perplexed when I first opened BL Beryllium, it was so different from the other Linux distros I was used to.

If you are used to Gnome or KDE, Openbox and BunsenLabs, is a little different yes. But, new user, should read at lest "Introduction to the Bunsenlabs Lithium Desktop" and don't be so chocked.

Beryllium encourages executing programs as Root. Is this safe?

No, that is not true!

the user will not find any means to build and test the python script.

Most users would very easy find the Build Menu

Then, the user finds "Run as root" in the "Build" menu.

No, not in my installations. I have "Open as Root"

Kind of strange, but, like magic, klicking it the real Geany comes out of the bottle,

The look of default user and geany BL theme is as "real" as the traditional look.

Everybody so far kept telling me "Don't run a programm as root user, if it is not absolutely necessary". Is it safe then in BL to run programs as root? Woulnd't this be risky behaviour?

If you have to run as root, you have to, but, then you have to be carefull. As root, you can damage the whole system. As user, you can only damage your own files.
The use of "sudo", has been implemented to minimize the risk for damage.

But, as I have pointed out, if you are dissatisfied with the look of a graphical program run as user, you can change the look.

You can configure lxapperance to use Adwaita or Gnome icons insted of Paper icons.
You can configure lxapperance to use big icons.

Do not blame BL for your problems.

Last edited by rbh (2021-04-23 19:57:25)


// Regards rbh

Offline

#12 2021-04-23 20:28:37

damo
....moderator....
Registered: 2015-08-20
Posts: 6,599

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

You don't build python scripts to run them - they are scripts. Make the file executable, or run with

python scriptname.py

Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#13 2021-04-24 13:31:07

manyroads
Member
From: around here, somewhere
Registered: 2019-04-16
Posts: 95
Website

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

By way of encouraging personal innovation, as @hhh noted,

sudo lxappearance

is always available to you @bunsencub should you wish to make things more beautiful or accommodating to your aesthetic.  The above allows you to change the theme for root tools such as file managers and applications which are reactive to typical OB themes.


Pax vobiscum,
Mark Rabideau - http://many-roads.com  Professional Genealogist
dwm & i3wm on arch ~ Reg. Linux User #449130
"For every complex problem there is an answer that is clear, simple, and wrong." H. L. Mencken

Offline

#14 2021-04-24 14:11:40

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,034

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

manyroads wrote:
sudo lxappearance

But, he is satisfied with look of how geany looks for root, but dissatisfied with the look for standard user.
This is the third thread on that theme...
His problem is that he can not find menu "Icon Theme" and "Other" in lxappearance, to set icons for user.


// Regards rbh

Offline

#15 2021-04-24 16:16:47

manyroads
Member
From: around here, somewhere
Registered: 2019-04-16
Posts: 95
Website

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

@rbh then perhaps @bunsencub should breakdown and enter the following in terminal mode

lxappearance

...for those pesky non-root theme/icon changes.


Pax vobiscum,
Mark Rabideau - http://many-roads.com  Professional Genealogist
dwm & i3wm on arch ~ Reg. Linux User #449130
"For every complex problem there is an answer that is clear, simple, and wrong." H. L. Mencken

Offline

#16 2021-04-24 16:19:59

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,034

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

Yes @manyroads, that is what I've proposed a couple of times.


// Regards rbh

Offline

#17 2021-04-24 16:52:16

bunsencub
Member
Registered: 2021-04-15
Posts: 36

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

Thanks for the many replies. I cannot answer them all, my apologies! So, for short: the issue here is neither how to change colors in BL (Preferences > Appearance does a fine job) neither how to run a python script in command line (I know that; a couple of years ago I developed a python program to rename image files on my computer, with GUI, directory and file picker, you name it..., just for the fun of it), the issue is about function, and, sorry that I shout now:
GEANY AS IT IS IN MY EXPERIMENTAL INSTALLATION OF BERYLLIUM DOES NOT FULFILL ITS INTENDED FUNCTION AS AN INTEGRATED DEVELOPMENT ENVIRONMENT, IDE that is, when you use it as a normal user. Prove me wrong, please, I make it easy for you:

Open Menu > Applications > Development > Geany and text in, or conveniently copy and paste this simple Python script:

inputString = input('Enter a sentence: ')
print('The inputted string is:', inputString)

Compile it (Under "Build"), no error, if copied correctly. Now execute it, hitting <F5> is the simplest way. An empty terminal will open, no text, no nothing

Now you choose in Geany under "Build" the option "Open as root". Do that, hit the cogwheel button or <F5> to execute, the terminal appears again, but this time with a small prompt to input text. Type whatever small text you wish to end the program.

I would be vey happy if you would tell whether your results will be the same as mine.

Thanks, bunsencub

EDIT: If your compilation result is "Python not found" you should do

$ cd /usr/bin
$ sudo ln -s python3.9 python

Recompilation should now be ok.

Last edited by bunsencub (2021-04-24 18:57:03)

Offline

#18 2021-04-24 19:01:35

sleekmason
zoom
Registered: 2018-05-22
Posts: 584

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

Is it because you are asking to execute a script out of $path without root?
Where are you saving the script?

Anyway, seems like a permissions issue so Geany doesn't arbitrarily execute random scripts...  Feeling warmer.

Offline

#19 2021-04-24 19:48:24

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,034

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

bunsencub wrote:

the issue here is neither how to change colors in BL (Preferences > Appearance does a fine job)

It started so: "BL Beryllium: same program, opened normal or as root, different. Why?", is the subject of this thread. When you had understand that, you should have ended the thread and started a new one.

sorry that I shout now:
GEANY AS IT IS IN MY EXPERIMENTAL INSTALLATION OF BERYLLIUM DOES NOT FULFILL ITS INTENDED FUNCTION AS AN INTEGRATED DEVELOPMENT ENVIRONMENT, IDE

There is absolutely no need to shout! And, it is not nicer to first beg forgiveness for shouting.

I would be vey happy if you would tell whether your results will be the same as mine.

I used the shorter code "print("Hello World")", got the same result alson in geany 1.33 (Debian Buster).

I have never used geany as IDE, the error might be because of user handling error.


// Regards rbh

Offline

#20 2021-04-24 19:52:50

bunsencub
Member
Registered: 2021-04-15
Posts: 36

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

sleekmason wrote:

Where are you saving the script?

In my Home directory, e.g., /home/<me>/Documents or in a different partition of my HD, as I keep doing since decades. Never had this problem, neither in Ubuntu, nor Debian, nor Fedora nor other distros. And never did I have to use Root with Geany. And I did install BL Beryllium exactly as described by johnraff. What might I be doing wrong in BL?

Last edited by bunsencub (2021-04-24 19:55:05)

Offline

#21 2021-04-25 00:29:02

manyroads
Member
From: around here, somewhere
Registered: 2019-04-16
Posts: 95
Website

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

As a user of geany on multiple platforms for much more than 10 years, I can say that geany always requires root /password to edit a root file.   Whether that relevant here... I have no idea.


Pax vobiscum,
Mark Rabideau - http://many-roads.com  Professional Genealogist
dwm & i3wm on arch ~ Reg. Linux User #449130
"For every complex problem there is an answer that is clear, simple, and wrong." H. L. Mencken

Offline

#22 2021-04-25 05:52:05

ohnonot
...again
Registered: 2015-09-29
Posts: 5,447
Website

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

bunsencub wrote:

GEANY AS IT IS IN MY EXPERIMENTAL INSTALLATION OF BERYLLIUM DOES NOT FULFILL ITS INTENDED FUNCTION AS AN INTEGRATED DEVELOPMENT ENVIRONMENT

Stop.
Right there.
Take a deep breath, slowly count to ten.

Now.

What is your definition of an IDE? I know what the word means, but you, think about that first. I bet your idea of an IDE is influenced by Windows or MacOS and things like highly integrated Java or Qt app development or some such.

Two things:

  • GNU/Linux already is a development environment. Everything is there - integrated into the OS itself, if you will. Open a few terminals, use the right tools for the task at hand etc. It is not necessary to encapsulate all that functionality in a behemoth of a separate software.

  • Geany is something between an IDE and a code editor. It is very lightweight, and minimalistic. BL only uses it as a code editor, or a config file editor to be more precise. It is however in the user's power to configure geany for more advanced tasks.

Facit:

  • Do not expect app development functionality from BL or geany - at least not out of the box.

  • Question your expectations, which are no doubt influenced by your usage of other operating systems.

If then you still feel you need a full-blown IDE; then Geany probably isn't it and you should look at things like VS Code etc.

PS:
Everything that was said about not being root until you really have to - you should heed that advice.

Last edited by ohnonot (2021-04-25 05:58:37)


BL quote proposals to this thread please.

Offline

#23 2021-04-25 06:06:59

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,910
Website

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

hhh wrote:

Geany, that theme on the user end is customized by @johnraff IIRC

Off-topic maybe, but just to clarify for all (@hhh I'm sure you know most of this already):

*) Theme - the GTK theme and icon themes can both be changed in lxappearance, and will apply to the whole desktop, not just Geany. (When I first switched to Linux from Windows 98 I was quite surprised how similar all applications looked. I was used to the fruit-salad appearance where each app did its own thing.) I didn't write any of the GTK themes - @hhh did most of that work - and only helped with slight customization of our icon themes from Faenza/Paper/Papirus.

*) Settings could have been left at Geany default by shipping an empty ~/.config/geany directory, but CrunchBang made some changes which seemed to suit the preferences of a lot of users and BunsenLabs have basically inherited those. Things like text-only toolbars, and other small details. I usually change some of them right away for my own use (eg I prefer an icon-only toolbar) and of course other users are free to tweak whtever they like, either via Geany's Preferences GUI or by editing the config files under ~/.config/geany directly.

*) Menu items OK here I did add these extra ones in the Build menu: "Open as Root", "File Manager Here" and "Terminal Here". To edit those you need to read up a bit on how Geany's Build menu works, because things will change depending on the currently open filetype and project. https://wiki.geany.org/howtos/configurebuildmenu

I added those items because it's a bit tricky to set up, and I thought people might find those three functions useful - I use them a lot myself anyway. smile

Last edited by johnraff (2021-04-25 06:10:57)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Online

#24 2021-04-25 06:37:43

bunsencub
Member
Registered: 2021-04-15
Posts: 36

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

Coming back to my question

rbh wrote:

...

I would be vey happy if you would tell whether your results will be the same as mine.

I used the shorter code "print("Hello World")", got the same result alson in geany 1.33 (Debian Buster)...

Do I understand you correctly, rbh, you executed the "print Hello World" Python script correctly with Geany on the experimental Beryllium installation?

Because if I use this simpler (I admit) script, Geany in normal user mode produces only an empty terminal, while running it as administrator it prints the text "Hello World" correctly in a terminal. Strange! But why?

I did several Beryllium installations, all with the same result. What could be wrong with my installations?

Offline

#25 2021-04-25 07:55:35

orionH
Member
Registered: 2017-11-15
Posts: 25

Re: [SOLVED]BL Beryllium: program, opened normal or as root?

Maybe nothing is wrong with your installation. Problems in Beryllium may be caused by things in Bullseye that is not ready yet.

Offline

Board footer

Powered by FluxBB