SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I know who she is but her statement is factually not true and might indicate her in-depth knowledge perhaps does not necessarily revolve around tiling window managers.
That just makes the comment even worse. She clearly has the knowledge to know that minimal environment users don't have to jump through hoops to launch stuff, but said it anyway!
You do know that X should never ever be started as root?
On most distros, including Slackware, X is running as root anyways, so starting X from the root account is not the real problem. The problem is running a DE or WM as root, which results in starting any application as root. Just a minor nitpick.
Regarding tiling WMs, yes, they can greatly increase productivity, but they can be hard to learn. I familiarized myself with them by running XMonad in XFCE (instead of xfwm4) and nowadays use i3 (using the Slackbuild from sycamorex when installing it on Slackware). Tiling WMs are that convenient that I actually am really annoyed by overlapping windows and some other deficiencies of most floating WMs).
That just makes the comment even worse. She clearly has the knowledge to know that minimal environment users don't have to jump through hoops to launch stuff, but said it anyway!
I agree. The last sentence from her review of i3wm:
Quote:
i3 is wonderfully configurable. See man xev, man pactl, and the excellent and thorough i3 documentation to learn more about the myriad ways to customize i3 and make it super-fast and efficient.
So apparently now a minimalist wm can be super-fast and efficient. Somehow jumping through hoops to launch an application does not strike me as efficient. Carla, make up your mind.
I wouldn't bring up the whole thing but I know how undervalued and 'misunderstood' minimalist WMs (especially tiling ones) are. Not only is it hard to do first steps when you're not used to them. You just stare at blank screen and think how on earth can anyone do anything with it, let alone be super productive. Such, I'd say, irresponsible comments by respectable authors/journalists do not help the case. Whatever her reason for writing it, she clearly did disservice to WMs. If beginners read comments like that, they'll clearly be put off and might not even try using a lot of excellent window managers.
See how this one reads (a made up Eclipse review) LOL
Quote:
I don't care for the minimalist editors (vim/emacs) so beloved of certain dev teams that require all kinds of hoop-jumping just to type a character. I have work to do and I like having all my stuff a single click away.
dmenu can be used in many different ways. For example, i3 can integrate it into a parser for .desktop files, so that only applications will be shown that would have a menu entry in a DE.
For other ideas how it can be used look at this thread in the Arch forum: https://bbs.archlinux.org/viewtopic.php?id=80145
By default the app launcher script that comes with dmenu just scans the path and lists everything executable. I find that a bit excessive and it actually gets in the way as there are just too many options. As Tobi has said there are scripts that will parse .desktop files, but I prefer just to keep a small list of my favourite apps in a ~/.dmenurc and use this instead:
Code:
#!/bin/sh
#
# Script to call dmenu from within dwm.
# ~/.dmenurc contains list of menu entries
if [ -f ~/.dmenurc ] ; then
if cmd=$(dmenu "$@" < ~/.dmenurc) ; then
exec /bin/sh -c "${cmd}"
fi
fi
But that's not really what I'm talking about. You can build your whole environment around dmenu.
Examples:
Stick this in your bashrc, and you've got a really quick way to navigate directories in an xterm
Code:
godir() # Quick directory navigation using dmenu.
{
local dir
dir=${1:-$HOME}
dir="$(find "$dir" -type d -path "*/.*" -prune -o -type d -print 2>/dev/null \
| dmenu -p "cd: " -l 20 )" && cd "$dir"
}
alias g=godir
Or, play a music album:
Code:
#!/bin/bash
music_dir="/srv/local/music"
play_selection()
{
[ "$1" ] || return 1
# Pre-load data files into vfs cache in order to
# avoid constant disk I/O while playing.
( cd "$1" && cat * >/dev/null )&
# Play selected album
exec ogg123 -d alsa -o dev:default -q "$1"
}
cd "$music_dir" \
&& { [ "$DISPLAY" ] \
&& album="$( ls -d */* | dmenu -p "Select: " -l 15 )" \
|| album="$( ls -d */* | shuf -n 1 )" ; } \
&& play_selection "$album"
(that one relies on a .../Artist/Album/ structure)
I can usually find any album in my collection and play it with just a few key strokes. Add the script to another dmenu menu as a menu option, or bind it to a hot-key and it becomes seamless.
If you're running a tiling WM like dwm or i3 that has a menu bar at the top or bottom of the screen that dmenu can overload its window upon then you end up with something completely seamless in most cases. And all done with a 41K window manager executable, a 21K dmenu executable, and a handful of simple scripts.
Last edited by GazL; 11-16-2014 at 07:46 AM.
Reason: messed up the copy/paste of the godir example.
You do know that X should never ever be started as root?
Why? How many websites can you really hit with Lynx in a terminal when you are patching things and you need information? My system doesnt come up into X, but if I am on as root to upgrade kernal stuff or whatever... and I need information using lynx to hit the web is a horrible chore these days. when I am done I exit and pop over to my user account. I dont like running su so... why should i never ever use X as root?
Why? -snip- why should i never ever use X as root?
It's to protect both you and your computer. When you are running as root, there is nothing asking for elevated permissions, the permissions are just there and will be used whether or not you want them to be. If a program has a bug or vulnerability, it could easily wreak havoc on your system. This is the same reason that most people running Windows XP had so many issues with malware and the like, because UAC hadn't been introduced by Microsoft yet and the vulnerabilities of IE and the system let malware be installed with ease.
Running programs as root won't break anything (if nothing goes wrong), but it gives those programs unfettered access to the computer. If the program has a bug or is compromised, it could easily lead to your whole system being compromised, especially if an attacker is able to get a root shell because of a program.
It is easy enough to hit Ctrl+Alt+F6 to load up a new terminal, log in as a user, and then run startx. This protects both you and your computer.
It's to protect both you and your computer. When you are running as root, there is nothing asking for elevated permissions,.... This protects both you and your computer.
Sorry I should have made it clear I was being somewhat rhetorical. I know exactly what permissions are had at both root and user level. I maintain a couple of servers so I am aware of whatever risk there could be if I wasn't diligent. As I mention I only use root when I need to do certain things... I was curious if there was something other than the usual permission and risk when running as an administrator. My home systems that my wife and I (and grandkids sometimes)use all run at the user level. Im not a proponent for doing everything everyday as root thats for sure. However I thought it a little crass to say NEVER EVER... there times when you have too. I have been admin to many servers in many companies as a software consultant over the years. I am extremely aware of what user I am logged in as. Thats why I commented that my root access I use XFCE when I need to and my user access uses enlightenment (E17/E18). This way I know who I am logged in as. So ... thanks for comment.
Sorry I should have made it clear I was being somewhat rhetorical. I know exactly what permissions are had at both root and user level. I maintain a couple of servers so I am aware of whatever risk there could be if I wasn't diligent. As I mention I only use root when I need to do certain things... I was curious if there was something other than the usual permission and risk when running as an administrator. My home systems that my wife and I (and grandkids sometimes)use all run at the user level. Im not a proponent for doing everything everyday as root thats for sure. However I thought it a little crass to say NEVER EVER... there times when you have too. I have been admin to many servers in many companies as a software consultant over the years. I am extremely aware of what user I am logged in as. Thats why I commented that my root access I use XFCE when I need to and my user access uses enlightenment (E17/E18). This way I know who I am logged in as. So ... thanks for comment.
But there shouldn't ever be a need to run a WM/DE as root. There are ways to run individual programs as root if needed. But if you run the WM/DE as root, then everything in there runs as root, including any bugs or exploits that may be there from basically any application that is installed on the system. If you need an individual program to have root access, I know kdesu exists for kde, although, I don't know what the equivalent is in xfce (although, you could always set the $DISPLAY variable and then run it via escalated permissions in the terminal).
You may be aware of the risk, but it seems that the way to alleviate the risk is easy enough (and wouldn't happen often enough) that it is worth it to play it safe and run only what is needed under escalated permissions... especially with production servers in companies. If your personal computer is taken down because of something using root that shouldn't have, then it's a setback and your computer will be down for a bit. Not the end of the world. If you're talking a production server for a company, any downtime can be extremely bad and expensive. Why would you not want to play it safe whenever possible and mitagate those risks by only running what's needed as root?
[…] using lynx to hit the web is a horrible chore these days[…]
I have to disagree. It's actually my browser of choice, and especially wikis can be read with it quite nicely. It has numbered links and vi keys, as well as text-fields-need-activation, which most other text browsers lack. Of course, JavaScript is not supported, but most times I can get the pure text just fine; blogspot, wordpress, stackexchange or slackbuilds.org also render nicely. I haven't tested it with this forum, as most web-based forums are indeed rather hard to navigate with lynx, this is one of the rare occasions where I use a graphical browser (with scripts disabled, running as different user).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.