VSIDO Community

VSIDO Support => Scripts and How To's => Scripts => Topic started by: hakerdefo on January 07, 2017, 07:15:15 PM

Title: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 07, 2017, 07:15:15 PM
The Bash shell uses a collection of startup files to create an environment. The already difficult task of setting up these files correctly is made painful by lack of clear documentation and different behavior of display managers and/or desktop environments. I'm planning on creating a script that should make this task easy. Something to kill time on Sunday  ;)
Stay Tuned  ;)

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: Snap on January 08, 2017, 05:53:34 AM
A bash shell configuration tool? I'm really curious about this one. I guess you'll cover the essentials, otherwise it might end up as a very complex script.
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 08, 2017, 11:02:04 PM


Updated V2 of bash-me-up can be found here,

http://vsido.org/index.php?topic=1252.msg14262#msg14262

Use V2 instead of the following version please.



As promised. Here is bash-me-up at your service  8)

Download the attached bashmeup.tar.gz (http://vsido.org/index.php?action=dlattach;topic=1252.0;attach=454) and install-bashmeup (http://vsido.org/index.php?action=dlattach;topic=1252.0;attach=455) files. Put them in a same directory. Open terminal in that directory and give the 'install-bashmeup' file the execute permissions,


chmod 755 install-bashmeup


And run it with sudo,


sudo ./install-bashmeup


Once the installation completes, log-out and then log-back-in.

Absolutely RAW!!! Use it at your own risk!!! You have been warned  ;)

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: Snap on January 09, 2017, 05:45:31 AM
That's something to test in a clean virtual machine or a cloned one, I don't wanna mess my systems, LOL.

Will report back. Thanks hackerdefo.
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 09, 2017, 08:21:54 AM
bash-me-up will backup your files with a '.bup' extension. But yeah, you are right, best thing to do is try this in a non-production environment, observe what it does and if you find it good enough, use it elsewhere.
It should make the task of setting-up bash shell with sensible defaults easy, in theory that is ;)
Looking forward to the feedback :)

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 09, 2017, 01:01:58 PM
Quote from: Snap on January 09, 2017, 05:45:31 AM
That's something to test in a clean virtual machine or a cloned one, I don't wanna mess my systems, LOL.

This was my first thought too. User will definitely want to research how their particular distro sets up the bash environment. I'm sure this works with Debian; there are some Void specifics that these scripts may break.

I looked through the individual files and used a couple line items. Definitely some sane defaults.

Timely too. I have to sit and wait in the car line to pick up my youngest after school. Been reading up on bash the last week or so. Seeing how these scripts are constructed has been an interesting exercise to say the least.

Another job well done hakerdefo.
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 09, 2017, 03:44:09 PM
Hi there PackRat,
I've tried to make bash-me-up distro-agnostic. It only depends on bash and sudo. The install script is designed to use sudo, so it won't work if you run it directly as root. It will be great if you can test this in Void and/or some other non debian/ubuntu distro. Would love to get your feedback.

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 09, 2017, 04:07:22 PM
I may give it a shot later (tomorrow?).

On Void, the system bashrc is in /etc/bash/ and user files in /etc/bash/bashrc.d/ , I also have an /etc/profile.d/ with some system scripts.

After a quick read of your scripts, I should get a bash environment no problem, but lose some of the under the hood Void setup.

I like that bash_logout script. That immediately became ~/.bash_logout and works just fine  ;D
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 10, 2017, 03:30:56 AM
@hakerdefo -

the included xsessionrc has two lines:

test -f /etc/profile && . /etc/profile
test -f $HOME/.profile && . $HOME/.profile


It doesn't start a window manager. I'm pretty sure that the "Default" option in the lightdm and lxdm menu reads this file, so if no Wm/DE is specified, the login will fail.

For example, the default xsession file for Void is one line -

/bin/bash --login -i ~/.xinitrc

so it reverts back to the user's .xinitrc which starts a WM/DE.
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 10, 2017, 06:16:04 AM
Hi PackRat,
Can you try a little experiment please?
Place following in your Void xsession file,

bin/bash -login /etc/X11/Xsession %session

And comment out the following,

/bin/bash --login -i ~/.xinitrc

Log-out of session and try log-in again.

Does the WM start?

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 10, 2017, 09:15:13 AM
Ignore my previous post  ;)
I tested my theory and it won't work!
Thanks for sharing this! This will be added to V2 of bash-me-up for sure
Please provide any other suggestion-feedback on making this thing distro-agnostic PackRat.

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 10, 2017, 01:29:13 PM
That's the only (obvious) thing I spotted going through the scripts to determine what's actually getting installed and where. It's more of a login agnostic feature. The way I understand it, if a user boots to a command line and uses "startx" when they want to start an X-session, the $HOME/.xinitrc is read and the window manager of choice is started. If a newer login manager like lightdm or lxdm (gdm, kdm?) is used, the $HOME/.xsessionrc is read and the window manager started along with the other features of the login manager. By calling the $HOME/.xinitrc in $HOME/.xsessionrc a user only needs the one file and is consistent when starting an X-session. Use to be a distro would create a symlink to accomplish that, but that appears to have fallen by the wayside.
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 10, 2017, 01:30:18 PM
That LESS_TERMCAP file is interesting. What's that provide for the user? Never seen it before.
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 11, 2017, 11:34:47 AM
That file adds a dash of color to the pager less and that in turns make 'man' pages colorful. You'll have to source the file from one of the bash start-up files.

-f ~/.LESS_TERMCAP ]] && . ~/.LESS_TERMCAP

And you'll also need,

export LESS="-RM"

In one of the bash settings file.

It for sure makes reading man pages much easy.

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 11, 2017, 02:05:10 PM
Two errors if I su to root in a terminal -  <--- My bad, I fogot that I changed the root shell to zsh. No errors after switching to back to bash

/etc/profile:export:28: invalid option(s)
pathremove:5: bad substitution


Need to set up some user specific stuff but other than that it appears to be working fine.

The install goes a bit too quick - maybe it's in the opening message, but some verbage about what files are getting installed would be nice.
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 11, 2017, 02:19:01 PM
Didn't catch this when proffing the script -

ln -sf /home/"$local_user"/.profile /root/.profile
ln -sf /home/"$local_user"/.bash_profile /root/.bash_profile
ln -sf /home/"$local_user"/.bashrc /root/.bashrc
ln -sf /home/"$local_user"/.bash_logout /root/.bash_logout
if [ -f /home/"$local_user"/.bash_aliases ] ; then
ln -sf /home/"$local_user"/.bash_aliases /root/.bash_aliases


Not too big an issue on this particular laptop where I'm the only user. On a multi-user machine those files would be linked to the last user setup.

Appears to me to be an inherent security flaw going on with this part. Does Debian even create those files for root? The default would be to just use the /etc/bashrc and /etc/profile, correct? Maybe just go that route.
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 11, 2017, 03:41:47 PM
$local_user is the user who ran this install script as sudo. On a multiuser machine this will be a bad thing. In the V2 of bash-me-up I'll make the soft-linking an optional feature. Thanks for pointing this out PackRat. As usual your observation is spot-on and valid.

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 04:21:35 PM
Your fearless (dumbass?) leader went ahead and installed it.. I am now on another partition to restore the bup files but wanted to post what is going on

I installed with no issues.. I logged out and tried to log back in but got an endless loop back to the lightdm login. I also rebooted and same results

I use a separate /home partition that is also used on this partition I am on now.. just stating that whatever broke on the install partition is not affecting this login even though the files are the same

I can hold off for a while if you want to test anything.. Just let me know
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 11, 2017, 04:26:39 PM
^ Is your lightdm login screen set to the "Default"

@hackerdefo - I stand corrected, for lxdm the default WM/DE is pulled from the /etc/lxdm/lxdm.conf file so I can use your .xsession file as is.

I will stand by statement that LightDM reads the .xsession file as evidenced by vastone being caught in a loop.

I think startx still defaults to .xinitrc, so that should work unless it is a symlink to .xsessionrc.

@vastone - add a window manager to your new .xsessionrc and see if you log in.
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 04:39:22 PM
Adding that did not change the issue.. Need to log out and back in to see if FluxBox is selected by LightDM

I still am verklemped by the fact that I can login on this partition using the same login and exact same files.. but will trace it down
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 04:45:21 PM
Was set to FluxBox and changing it to Default made no difference

If I change this login (working one) from FluxBox to Default it replicates the issue

I am going to go through each file now and look at what could be the issue and start a step by step restore and reboot to isolate
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 11, 2017, 04:50:22 PM
Can you post the ~/.xsession-errors file here?

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 11, 2017, 04:56:56 PM
Also can you start the Fluxbox manually from a different tty, let's say tty2 by running this command,

startx /usr/bin/startfluxbox

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 04:57:07 PM
Current xsessions-errors

Xsession: X session started for vastone at Wed Jan 11 10:50:02 CST 2017
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting XAUTHORITY=/home/vastone/.Xauthority
localuser:vastone being added to access control list
gpgconf: warning: can not open config file /home/vastone/.gnupg/gpg-agent.conf: No such file or directory
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
dbus-update-activation-environment: setting QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
OpenGL version: 3.
dbus-update-activation-environment: setting USER=vastone
dbus-update-activation-environment: setting XDG_SESSION_TYPE=x11
dbus-update-activation-environment: setting HOME=/home/vastone
dbus-update-activation-environment: setting DESKTOP_SESSION=fluxbox
dbus-update-activation-environment: setting XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
dbus-update-activation-environment: setting QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting LOGNAME=vastone
dbus-update-activation-environment: setting PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
dbus-update-activation-environment: setting GDM_LANG=en_US.utf8
dbus-update-activation-environment: setting XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
dbus-update-activation-environment: setting XDG_RUNTIME_DIR=/run/user/1000
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting LANG=en_US.UTF-8
dbus-update-activation-environment: setting XDG_SESSION_DESKTOP=fluxbox
dbus-update-activation-environment: setting XAUTHORITY=/home/vastone/.Xauthority
dbus-update-activation-environment: setting XDG_GREETER_DATA_DIR=/var/lib/lightdm/data/vastone
dbus-update-activation-environment: setting SHELL=/bin/bash
dbus-update-activation-environment: setting GDMSESSION=fluxbox
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
dbus-update-activation-environment: setting GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
dbus-update-activation-environment: setting PWD=/home/vastone
xmodmap:  unable to open file '~/.Xmodmap' for reading
xmodmap:  1 error encountered, aborting.
Keys: Invalid key/modifier on line 171): https://twitter.com/i/redirect?url=https%3A%2F%2Ftwitter.com%2Fstlwrkr4889%3Fcn%3DcmVwbHk%253D%26refsrc%3Demail&t=1&cn=cmVwbHk%3D&sig=f135617fa1ff0ae714c743b03fe906895295ce0f&iid=0e194376e99f4029bc4b5b7754686143&uid=31587023&nid=27+1262
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
xRandr: Found crtc's: 1
xRandr: Linking output HDMI-0 with crtc 0
No XSETTINGS manager, tint2 uses config option 'launcher_icon_theme'.
xRandr: Found crtc's: 1
xRandr: Linking output HDMI-0 with crtc 0
No XSETTINGS manager, tint2 uses config option 'launcher_icon_theme'.
real transparency off.... depth: 24
real transparency off.... depth: 24
panel items: LT
tint2 : nb monitor 1, nb monitor used 1, nb desktop 2
panel items: FS
Systray composited rendering on
tint2 : nb monitor 1, nb monitor used 1, nb desktop 2
Kernel uevent interface initialized...
systray window 10485767
tint2 : systray started
Kernel uevent interface initialized...
Loading icon theme cache...
libpng warning: iCCP: known incorrect sRGB profile
launcher.c 216: Using icon /usr/share/icons/LinuxLex-8/apps/chromium.png
launcher.c 216: Using icon /usr/local/bin/images/WoBD Terminal.png
launcher.c 216: Using icon /usr/local/bin/images/phoca_thumb_l_file-manager.png
launcher.c 216: Using icon /usr/local/bin/images/gmb.png
launcher.c 216: Using icon /usr/local/bin/images/vsidoorb_blk.png
Detected compositor, restarting tint2...
/tmp/buildd/tint2-0.12.12/src/tint.c 1988: restarting tint2...
xRandr: Found crtc's: 1
xRandr: Linking output HDMI-0 with crtc 0
No XSETTINGS manager, tint2 uses config option 'launcher_icon_theme'.
real transparency on... depth: 32
panel items: LT
tint2 : nb monitor 1, nb monitor used 1, nb desktop 2
Kernel uevent interface initialized...
Loading icon theme cache...
launcher.c 216: Using icon /usr/share/icons/LinuxLex-8/apps/chromium.png
launcher.c 216: Using icon /usr/local/bin/images/WoBD Terminal.png
launcher.c 216: Using icon /usr/local/bin/images/phoca_thumb_l_file-manager.png
launcher.c 216: Using icon /usr/local/bin/images/gmb.png
launcher.c 216: Using icon /usr/local/bin/images/vsidoorb_blk.png
Detected compositor, restarting tint2...
/tmp/buildd/tint2-0.12.12/src/tint.c 1988: restarting tint2...
xRandr: Found crtc's: 1
xRandr: Linking output HDMI-0 with crtc 0
No XSETTINGS manager, tint2 uses config option 'launcher_icon_theme'.
real transparency on... depth: 32
panel items: FS
Systray composited rendering on
tint2 : nb monitor 1, nb monitor used 1, nb desktop 2
Kernel uevent interface initialized...
systray window 10485768
tint2 : systray started
conky: conky: Syntax error (/home/vastone/.conkyrc:2: unexpected symbol near '#') while reading config file.
conky: Assuming it's in old syntax and attempting conversion.
Syntax error (/home/vastone/.conkyrc2:2: unexpected symbol near '#') while reading config file.
conky: Assuming it's in old syntax and attempting conversion.
conky: desktop window (26a) is root window
conky: window type - normal
conky: drawing to created window (0x1000002)
conky: drawing to double buffer
conky: desktop window (26a) is root window
conky: window type - desktop
conky: drawing to created window (0x1200002)
conky: drawing to double buffer
[WARNING:flash/platform/pepper/pep_module.cpp(63)] SANDBOXED
[1688:1764:0111/105118.858210:ERROR:object_proxy.cc(583)] Failed to call method: org.freedesktop.NetworkManager.GetDevices: object_path= /org/freedesktop/NetworkManager: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.NetworkManager was not provided by any .service files
[1688:1764:0111/105118.858233:ERROR:networking_private_linux.cc(715)] Failed to enumerate network devices
[1688:1764:0111/105218.119368:ERROR:object_proxy.cc(583)] Failed to call method: org.freedesktop.NetworkManager.GetDevices: object_path= /org/freedesktop/NetworkManager: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.NetworkManager was not provided by any .service files
[1688:1764:0111/105218.119417:ERROR:networking_private_linux.cc(715)] Failed to enumerate network devices


xsessions-errors.old which is what happened on last login that does not work

Xsession: X session started for vastone at Wed Jan 11 10:48:47 CST 2017
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting XAUTHORITY=/home/vastone/.Xauthority
localuser:vastone being added to access control list
/etc/X11/Xsession: 28: export: Illegal option -f
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 05:04:06 PM
Quote from: hakerdefo on January 11, 2017, 04:56:56 PM
Also can you start the Fluxbox manually from a different tty, let's say tty2 by running this command,

startx /usr/bin/startfluxbox

Cheers!!!

Yes .. this worked and I am now logged into the original
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 11, 2017, 05:24:23 PM
I think I've got this one, perhaps ;)
VastOne can you edit the file .xsessionrc file provided by bash-me-up and change,

test -f /etc/profile && . /etc/profile
test -f $HOME/.profile && . $HOME/.profile


To

if [ -r ~/.profile ] ; then . ~/.profile ; fi
if [ -r /etc/profile ] ; then . /etc/profile ; fi


Save the file, log-out and try to log-in via LightDM. Hopefully you'll ;)

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 05:29:26 PM
Quote from: hakerdefo on January 11, 2017, 05:24:23 PM
I think I've got this one, perhaps ;)
VastOne can you edit the file .xsessionrc file provided by bash-me-up and change,

Save the file, log-out and try to log-in via LightDM. Hopefully you'll ;)

Cheers!!!

Nope... same issue ... I cannot login on tty7 lightdm but I can login tty2 startx /usr/bin/startfluxbox

I also rebooted to be completely sure
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 11, 2017, 05:32:13 PM
Can you post the latest xsessions-errors file?

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 05:34:28 PM
Here they are but I am not sure errors are being captured on a failed login because the latest and the old one are identical

Xsession: X session started for vastone at Wed Jan 11 11:30:59 CST 2017
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting XAUTHORITY=/home/vastone/.Xauthority
localuser:vastone being added to access control list
/etc/X11/Xsession: 28: export: Illegal option -f
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 05:37:18 PM
This is behaving more like a permissions issue than anything.. But that makes no sense because I can login to another partition with the same login using the same /home files
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 05:38:55 PM
Which means that the difference could be in any file that was placed on the /root partition and not /home
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 06:22:16 PM
Quote from: VastOne on January 11, 2017, 05:34:28 PM
Here they are but I am not sure errors are being captured on a failed login because the latest and the old one are identical

Xsession: X session started for vastone at Wed Jan 11 11:30:59 CST 2017
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting XAUTHORITY=/home/vastone/.Xauthority
localuser:vastone being added to access control list
/etc/X11/Xsession: 28: export: Illegal option -f


I just confirmed this.. the errors file is not updated on a failed login from the LightDM tty7 session

lightdm log current

[+0.01s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.01s] DEBUG: Starting Light Display Manager 1.18.3, UID=0 PID=706
[+0.01s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.01s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/01_debian.conf
[+0.01s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.01s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.01s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.01s] DEBUG:   [SeatDefaults] is now called [Seat:*], please update this configuration
[+0.01s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.03s] DEBUG: Registered seat module xlocal
[+0.03s] DEBUG: Registered seat module xremote
[+0.03s] DEBUG: Registered seat module unity
[+0.06s] DEBUG: Monitoring logind for seats
[+0.06s] DEBUG: New seat added from logind: seat0
[+0.06s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.06s] DEBUG: Seat seat0: Starting
[+0.06s] DEBUG: Seat seat0: Creating greeter session
[+0.07s] DEBUG: Seat seat0: Creating display server of type x
[+0.07s] DEBUG: Could not run plymouth --ping: Failed to execute child process "plymouth" (No such file or directory)
[+0.07s] DEBUG: Using VT 7
[+0.07s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.07s] DEBUG: DisplayServer x-0: Logging to /var/log/lightdm/x-0.log
[+0.07s] DEBUG: DisplayServer x-0: Writing X server authority to /var/run/lightdm/root/:0
[+0.07s] DEBUG: DisplayServer x-0: Launching X Server
[+0.07s] DEBUG: Launching process 773: /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.07s] DEBUG: DisplayServer x-0: Waiting for ready signal from X server :0
[+0.07s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.07s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+0.08s] WARNING: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
[+0.08s] DEBUG: Loading user config from /etc/lightdm/users.conf
[+0.09s] DEBUG: User vastone added
[+1.93s] DEBUG: Got signal 10 from process 773
[+1.93s] DEBUG: DisplayServer x-0: Got signal from X server :0
[+1.93s] DEBUG: DisplayServer x-0: Connecting to XServer :0
[+1.93s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+1.93s] DEBUG: Session pid=1086: Started with service 'lightdm-greeter', username 'lightdm'
[+1.95s] DEBUG: Session pid=1086: Authentication complete with return value 0: Success
[+1.95s] DEBUG: Seat seat0: Session authenticated, running command
[+1.95s] DEBUG: Session pid=1086: Running command /usr/sbin/lightdm-gtk-greeter
[+1.95s] DEBUG: Creating shared data directory /var/lib/lightdm/data/lightdm
[+1.95s] DEBUG: Session pid=1086: Logging to /var/log/lightdm/seat0-greeter.log
[+2.07s] DEBUG: Activating VT 7
[+2.07s] DEBUG: Activating login1 session c1
[+2.52s] DEBUG: Greeter connected version=1.18.3 resettable=false
[+2.94s] DEBUG: Greeter start authentication for vastone
[+2.95s] DEBUG: Session pid=1168: Started with service 'lightdm', username 'vastone'
[+2.96s] DEBUG: Session pid=1168: Got 1 message(s) from PAM
[+2.96s] DEBUG: Prompt greeter with 1 message(s)
[+5.90s] DEBUG: Seat seat0 changes active session to


lightdm old

[+0.01s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.01s] DEBUG: Starting Light Display Manager 1.18.3, UID=0 PID=687
[+0.01s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.01s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/01_debian.conf
[+0.01s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.01s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.01s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.01s] DEBUG:   [SeatDefaults] is now called [Seat:*], please update this configuration
[+0.01s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.06s] DEBUG: Registered seat module xlocal
[+0.06s] DEBUG: Registered seat module xremote
[+0.06s] DEBUG: Registered seat module unity
[+0.09s] DEBUG: Monitoring logind for seats
[+0.09s] DEBUG: New seat added from logind: seat0
[+0.09s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.09s] DEBUG: Seat seat0: Starting
[+0.09s] DEBUG: Seat seat0: Creating greeter session
[+0.09s] DEBUG: Seat seat0: Creating display server of type x
[+0.09s] DEBUG: Could not run plymouth --ping: Failed to execute child process "plymouth" (No such file or directory)
[+0.09s] DEBUG: Using VT 7
[+0.09s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.09s] DEBUG: DisplayServer x-0: Logging to /var/log/lightdm/x-0.log
[+0.09s] DEBUG: DisplayServer x-0: Writing X server authority to /var/run/lightdm/root/:0
[+0.09s] DEBUG: DisplayServer x-0: Launching X Server
[+0.09s] DEBUG: Launching process 757: /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.09s] DEBUG: DisplayServer x-0: Waiting for ready signal from X server :0
[+0.09s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.09s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+0.09s] WARNING: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
[+0.09s] DEBUG: Loading user config from /etc/lightdm/users.conf
[+0.10s] DEBUG: User vastone added
[+1.97s] DEBUG: Got signal 10 from process 757
[+1.97s] DEBUG: DisplayServer x-0: Got signal from X server :0
[+1.97s] DEBUG: DisplayServer x-0: Connecting to XServer :0
[+1.98s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+1.98s] DEBUG: Session pid=1103: Started with service 'lightdm-greeter', username 'lightdm'
[+2.00s] DEBUG: Session pid=1103: Authentication complete with return value 0: Success
[+2.00s] DEBUG: Seat seat0: Session authenticated, running command
[+2.00s] DEBUG: Session pid=1103: Running command /usr/sbin/lightdm-gtk-greeter
[+2.00s] DEBUG: Creating shared data directory /var/lib/lightdm/data/lightdm
[+2.00s] DEBUG: Session pid=1103: Logging to /var/log/lightdm/seat0-greeter.log
[+2.13s] DEBUG: Activating VT 7
[+2.13s] DEBUG: Activating login1 session c1
[+2.58s] DEBUG: Greeter connected version=1.18.3 resettable=false
[+3.00s] DEBUG: Greeter start authentication for vastone
[+3.00s] DEBUG: Session pid=1167: Started with service 'lightdm', username 'vastone'
[+3.01s] DEBUG: Session pid=1167: Got 1 message(s) from PAM
[+3.01s] DEBUG: Prompt greeter with 1 message(s)
[+8.58s] DEBUG: Continue authentication
[+8.61s] DEBUG: Session pid=1167: Authentication complete with return value 0: Success
[+8.61s] DEBUG: Authenticate result for user vastone: Success
[+8.61s] DEBUG: User vastone authorized
[+8.62s] DEBUG: Greeter sets language en_US.utf8
[+8.67s] DEBUG: Greeter requests session fluxbox
[+8.67s] DEBUG: Seat seat0: Stopping greeter; display server will be re-used for user session
[+8.67s] DEBUG: Session pid=1103: Sending SIGTERM
[+8.69s] DEBUG: Greeter closed communication channel
[+8.69s] DEBUG: Session pid=1103: Exited with return value 0
[+8.69s] DEBUG: Seat seat0: Session stopped
[+8.69s] DEBUG: Seat seat0: Greeter stopped, running session
[+8.69s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+8.69s] DEBUG: Session pid=1167: Running command /etc/X11/Xsession /usr/bin/startfluxbox
[+8.69s] DEBUG: Creating shared data directory /var/lib/lightdm/data/vastone
[+8.69s] DEBUG: Session pid=1167: Logging to .xsession-errors
[+8.77s] DEBUG: Activating VT 7
[+8.77s] DEBUG: Activating login1 session 2
[+8.96s] DEBUG: Session pid=1167: Exited with return value 0
[+8.96s] DEBUG: Seat seat0: Session stopped
[+8.96s] DEBUG: Seat seat0: Stopping display server, no sessions require it
[+8.96s] DEBUG: Sending signal 15 to process 757
[+9.37s] DEBUG: Process 757 exited with return value 0
[+9.37s] DEBUG: DisplayServer x-0: X server stopped
[+9.37s] DEBUG: Releasing VT 7
[+9.37s] DEBUG: DisplayServer x-0: Removing X server authority /var/run/lightdm/root/:0
[+9.37s] DEBUG: Seat seat0: Display server stopped
[+9.37s] DEBUG: Seat seat0: Active display server stopped, starting greeter
[+9.37s] DEBUG: Seat seat0: Creating greeter session
[+9.37s] DEBUG: Seat seat0: Creating display server of type x
[+9.37s] DEBUG: Using VT 7
[+9.37s] DEBUG: Seat seat0: Starting local X display on VT 7
[+9.37s] DEBUG: DisplayServer x-0: Logging to /var/log/lightdm/x-0.log
[+9.37s] DEBUG: DisplayServer x-0: Writing X server authority to /var/run/lightdm/root/:0
[+9.37s] DEBUG: DisplayServer x-0: Launching X Server
[+9.37s] DEBUG: Launching process 1250: /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+9.37s] DEBUG: DisplayServer x-0: Waiting for ready signal from X server :0
[+10.33s] DEBUG: Got signal 10 from process 1250
[+10.33s] DEBUG: DisplayServer x-0: Got signal from X server :0
[+10.33s] DEBUG: DisplayServer x-0: Connecting to XServer :0
[+10.34s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+10.34s] DEBUG: Session pid=1269: Started with service 'lightdm-greeter', username 'lightdm'
[+10.36s] DEBUG: Session pid=1269: Authentication complete with return value 0: Success
[+10.36s] DEBUG: Seat seat0: Session authenticated, running command
[+10.36s] DEBUG: Session pid=1269: Running command /usr/sbin/lightdm-gtk-greeter
[+10.36s] DEBUG: Creating shared data directory /var/lib/lightdm/data/lightdm
[+10.36s] DEBUG: Session pid=1269: Logging to /var/log/lightdm/seat0-greeter.log
[+10.43s] DEBUG: Activating VT 7
[+10.43s] DEBUG: Activating login1 session c2
[+10.61s] DEBUG: Greeter connected version=1.18.3 resettable=false
[+10.89s] DEBUG: Greeter start authentication for vastone
[+10.89s] DEBUG: Session pid=1305: Started with service 'lightdm', username 'vastone'
[+10.90s] DEBUG: Session pid=1305: Got 1 message(s) from PAM
[+10.90s] DEBUG: Prompt greeter with 1 message(s)
[+16.63s] DEBUG: Greeter closed communication channel
[+16.63s] DEBUG: Session pid=1269: Exited with return value 0
[+16.63s] DEBUG: Seat seat0: Session stopped
[+16.63s] DEBUG: Seat seat0: Stopping; failed to start a greeter
[+16.63s] DEBUG: Seat seat0: Stopping
[+16.63s] DEBUG: Seat seat0: Stopping display server
[+16.63s] DEBUG: Sending signal 15 to process 1250
[+16.63s] DEBUG: Seat seat0: Stopping session
[+16.63s] DEBUG: Session pid=1305: Sending SIGTERM
[+16.63s] DEBUG: Session pid=1305: Terminated with signal 15
[+16.63s] DEBUG: Session: Failed during authentication
[+16.63s] DEBUG: Seat seat0: Session stopped
[+16.65s] DEBUG: Got signal 15 from process 1
[+16.65s] DEBUG: Caught Terminated signal, shutting down
[+16.65s] DEBUG: Stopping display manager
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 06:32:39 PM
I am seeing this error in the syslog that started at about the time all of this began

Jan 11 12:18:12 localhost lightdm[706]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files

I am going to log into a different partition to see if that same error is in the syslog

EDIT - Same error on other partitions so it is not relevant
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 11, 2017, 06:42:56 PM
Okay! Vasty can you try another try?
Edit the .xsessionrc file to look like this,


#!/bin/bash
test -f /etc/profile && . /etc/profile

test -f $HOME/.profile && . $HOME/.profile

Save it and do the LightDM logout-login and see how it goes.

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 06:47:23 PM
It did not work.. being that it is bash now would it need to be made 755 executable?
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 11, 2017, 07:06:11 PM
This is happening because in Debian /bin/sh is symlinked to dash not bash. And in /etc/profile provided by bash-me-up the line 28 is,

export -f pathremove pathprepend pathappend


In dash, which is a posix shell, there is no way to export a function. So the above line is like an alien to dash so it throws an error. And in /etc/X11/Xsession there is the line,
set -e
That ensures that the execution of the scripts halts on any error.
So the simplest of the solution to do would be to comment out the line,


# export -f pathremove pathprepend pathappend


In /etc/profile file.
Can you test this?

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 07:14:10 PM
I commented that out and rebooted and still cannot log in to tty7

I must reiterate this... I can log into a different partition with this same setting and same files and same user. This to me is interesting to say the least
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 11, 2017, 07:27:10 PM
Try removing these symlinks,

sudo rm /root/.profile
sudo rm /root/.bash_profile
sudo rm /root/.bash_logout
sudo rm /root/.bashrc
sudo rm /root/.bash_aliases


And see if it makes any difference.

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 07:34:41 PM
Quote from: hakerdefo on January 11, 2017, 07:27:10 PM
Try removing these symlinks,

sudo rm /root/.profile
sudo rm /root/.bash_profile
sudo rm /root/.bash_logout
sudo rm /root/.bashrc
sudo rm /root/.bash_aliases


And see if it makes any difference.

Cheers!!!

No difference still no login to tty7/lightdm
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 11, 2017, 07:40:58 PM
Remove the following on both /home and this partition and reboot please,

sudo rm ~/.Xauthority
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 07:45:22 PM
Quote from: hakerdefo on January 11, 2017, 07:40:58 PM
Remove the following on both /home and this partition and reboot please,

sudo rm ~/.Xauthority


Did not work. I still cannot log into tty7 lightdm
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 11, 2017, 07:48:47 PM
@vastone -

Quote... I am now on another partition to restore the bup files but wanted to post what is going on

I use a separate /home partition that is also used on this partition I am on now.. just stating that whatever broke on the install partition is not affecting this login even though the files are the same

This is behaving more like a permissions issue than anything.. But that makes no sense because I can login to another partition with the same login using the same /home files

I'm having a hard time visualizing this setup. Do you have multiple installs of VSIDO and a shared /home partition? And you log into each install as "vastone"?
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 11, 2017, 07:52:42 PM
gksudo medit /etc/X11/Xsession
Change the first line from,
#!/bin/sh
to
#!/bin/bash
and try logout-login via LightDM.
Confused Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 07:53:22 PM
Quote from: PackRat on January 11, 2017, 07:48:47 PM
@vastone -

I'm having a hard time visualizing this setup. Do you have multiple installs of VSIDO and a shared /home partition? And you log into each install as "vastone"?

Yes... And even further they are the EXACT same partitions at one time.. I use fsarchiver and backup and restore to several partitions for redundancy and for testing cases just as this one

The only thing I regret is this is my A partition, where grub is held.. I should have dropped to either B, C or D partition to test.. :D

I can simply fsarchive anyone of those and bring it back if this is not resolved to my liking
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 11, 2017, 07:59:07 PM
So then you also have 4 (?) / partitions?

So when you successfully log in via lightdm, you are reading the original Debian /etc/bashrc and /etc/profile files?
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 11, 2017, 08:05:22 PM
Quote from: PackRat on January 11, 2017, 07:59:07 PM
So then you also have 4 (?) / partitions?

So when you successfully log in via lightdm, you are reading the original Debian /etc/bashrc and /etc/profile files?
That is my guess too PackRat. The not working /etc/profile would contain the line 28,
export -f pathremove pathprepend pathappend
While the working partition /etc/profile won't have that line. It is most likely dash vs bash thingy to my tired mind.
Tired Cheers ;)
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 08:06:11 PM
Of those / partitions yes

And obviously anything on /home/vastone is run from there

Partition ABCDE are identical and VSIDO installs of this build machine and all of them are VastOne only login

Each of these have Partition F in fstab linked to /home

Partition F is /home/vastone ...
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 08:08:15 PM
The ONLY thing I am saying is.. we keep looking at /home/vastone files as the issue

But on another login of /home/vastone there are not any issues (Only difference is /root which did NOT have these files installed to)
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 11, 2017, 08:08:54 PM
Quote from: hakerdefo on January 11, 2017, 08:05:22 PM
Quote from: PackRat on January 11, 2017, 07:59:07 PM
So then you also have 4 (?) / partitions?

So when you successfully log in via lightdm, you are reading the original Debian /etc/bashrc and /etc/profile files?
That is my guess too PackRat. The not working /etc/profile would contain the line 28,
export -f pathremove pathprepend pathappend
While the working partition /etc/profile won't have that line. It is most likely dash vs bash thingy to my tired mind.
Tired Cheers ;)

How did you get around the dash issue on your system then? You running bash as shell?
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 08:11:11 PM
I didn't get around anything.. I just rebooted to another partition and it worked
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 08:12:04 PM
I am going to reverse this completely and hope that there is a backout way to get back to a good login with the bup files.. If not I am going to restore a fsarchive file.. this seems to be getting everyone frustrated
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 11, 2017, 08:18:48 PM
Quote from: VastOne on January 11, 2017, 08:08:15 PM
The ONLY thing I am saying is.. we keep looking at /home/vastone files as the issue

But on another login of /home/vastone there are not any issues (Only difference is /root which did NOT have these files installed to)

You can log in, but you don't have your original bash environment - the user .bashrc has been replaced so no alaises or anything, correct?

Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 11, 2017, 08:22:34 PM
Quote from: VastOne on January 11, 2017, 08:11:11 PM
I didn't get around anything.. I just rebooted to another partition and it worked

No you.

I want to know what hakerdefo did to get around it - if he uses bash from the get go, or changed it for his scripts to work.

Using dash is system default for Debian now isn't it? If these scripts fail because of dash, they may not be viable for your average Debian user.
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 11, 2017, 08:25:26 PM
rm .bashrc
rm .bash_profile
rm .bash_logout
rm .profile
sudo rm /etc/profile
sudo rm /etc/bashrc
mv .bashrc.bup .bashrc
mv .bash_profile.bup .bash_profile
mv .bash_logout.bup .bash_logout
sudo mv /etc/profile.bup /etc/profile
sudo mv /etc/bash.bashrc.bup /etc/bash.bashrc

Any you should be back to the original. Sorry for the bash-it-up caused troubles :(

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 08:25:35 PM
Quote from: PackRat on January 11, 2017, 08:18:48 PM
Quote from: VastOne on January 11, 2017, 08:08:15 PM
The ONLY thing I am saying is.. we keep looking at /home/vastone files as the issue

But on another login of /home/vastone there are not any issues (Only difference is /root which did NOT have these files installed to)

You can log in, but you don't have your original bash environment - the user .bashrc has been replaced so no alaises or anything, correct?

Correct.. all the changes to my /home/vastone are still there and I have to back them out to get it to work the way I had it
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 11, 2017, 08:32:18 PM
Quote from: PackRat on January 11, 2017, 08:22:34 PM
Quote from: VastOne on January 11, 2017, 08:11:11 PM
I didn't get around anything.. I just rebooted to another partition and it worked

No you.

I want to know what hakerdefo did to get around it - if he uses bash from the get go, or changed it for his scripts to work.

Using dash is system default for Debian now isn't it? If these scripts fail because of dash, they may not be viable for your average Debian user.
That is the funny part. I tested this on Debian wheezy with startx, Ubuntu 16.04 with LightDM, Salix with GDM, Ubuntu Precise with LXDM and never faced login problem after installing bash-it-up.
And it also worked for VastOne on this partition via startx, didn't it?
Confusing, ain't it?
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 08:32:28 PM
Quote from: hakerdefo on January 11, 2017, 08:25:26 PM

Any you should be back to the original. Sorry for the bash-it-up caused troubles :(

Cheers!!!

No troubles.. just a roadblock. I am not having the best of days AND I have a very different setup than most people sot it is most likely my issue

Keep plugging at it hakerdefo.. please!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 08:35:27 PM
Quote from: hakerdefo on January 11, 2017, 08:25:26 PM
rm .bashrc
rm .bash_profile
rm .bash_logout
rm .profile
sudo rm /etc/profile
sudo rm /etc/bashrc
mv .bashrc.bup .bashrc
mv .bash_profile.bup .bash_profile
mv .bash_logout.bup .bash_logout
sudo mv /etc/profile.bup /etc/profile
sudo mv /etc/bash.bashrc.bup /etc/bash.bashrc

Any you should be back to the original. Sorry for the bash-it-up caused troubles :(

Cheers!!!

I made these changes and now am back to normal

I will now install a brand new VSIDO and let it have it's own home directory and boot to it and install the script and test from there

Whew
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 08:39:24 PM
Quote from: hakerdefo on January 11, 2017, 08:32:18 PM
Quote from: PackRat on January 11, 2017, 08:22:34 PM
Quote from: VastOne on January 11, 2017, 08:11:11 PM
I didn't get around anything.. I just rebooted to another partition and it worked

No you.

I want to know what hakerdefo did to get around it - if he uses bash from the get go, or changed it for his scripts to work.

Using dash is system default for Debian now isn't it? If these scripts fail because of dash, they may not be viable for your average Debian user.
That is the funny part. I tested this on Debian wheezy with startx, Ubuntu 16.04 with LightDM, Salix with GDM, Ubuntu Precise with LXDM and never faced login problem after installing bash-it-up.
And it also worked for VastOne on this partition via startx, didn't it?
Confusing, ain't it?

I am sure there are files I have tweaked or have over the long history of this /home/vastone directory that caused this issue

As noted on another thread, I rebuilt the other server yesterday that had been running VSIDO 2 which is about 4 years old...

I am a creature of habit but not afraid to install anything at anytime and forget about it a month later.. this is my blessing and my curse
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 11, 2017, 08:42:32 PM
@VastOne Looking forward to your experiment on fresh install of VSIDO and your feedback :)
Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 08:49:28 PM
Quote from: hakerdefo on January 11, 2017, 08:42:32 PM
@VastOne Looking forward to your experiment on fresh install of VSIDO and your feedback :)
Cheers!!!

Exact same problem... I am sorry hakerdefo. It failed the same exact way

This is on a brand new install of VSIDO that is up to date on everything... This seems specific to lightDM
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 09:05:01 PM
This was a new install of the Dec 24 ISO... I am going to boot now to a new install of latest ISO and see what happens
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 11, 2017, 09:55:03 PM
Fails on the latest ISO as well

I am at a loss.. I do not know what the cause is
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 12, 2017, 02:03:01 AM
QuoteThis is on a brand new install of VSIDO that is up to date on everything... This seems specific to lightDM

Are you set up with this isnatall so you can purge lightdm and lightdm-gtk-greeter and install lxdm?
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 12, 2017, 02:04:19 AM
^ Coitenly!   :D

Will get back to ya
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 12, 2017, 02:15:13 AM
Ok

I'm unsquashing (squishing?) the most recent vsido iso - I'm going to look at the lightdm.conf
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 12, 2017, 02:17:17 AM
Is it customary for L XDM to install all of lxde 31.3 megabyte of additional space 50 newly installed packages just for a log in manager?
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 12, 2017, 02:27:09 AM
Don't bother looking at lightdm.. same damn thing is happening with lxdm
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 12, 2017, 02:36:41 AM
Quote from: VastOne on January 12, 2017, 02:17:17 AM
Is it customary for L XDM to install all of lxde 31.3 megabyte of additional space 50 newly installed packages just for a log in manager?

In Debian you need to set the "no-recommends"

lxdm vsido (http://vsido.org/index.php?topic=1030.msg11614#msg11614)

or go into synaptic and check (uncheck?) the box about installing recommended packages.
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 12, 2017, 02:42:59 AM
Do you have a $HOME/.xinitrc?

I looked at the /etc/skel in the file system - no default .xinitrc or .xsessionrc.
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 12, 2017, 02:48:49 AM
No I do not have a .xinitrc   

Played with one when thinking of removing lightdm when it had issues but moved on since it was not necessary

I have an old one that I used then that I could recreate on the test run

#!/bin/sh

########################################################################
##  Created by V-Ger for use in the VSIDO env                         ##
########################################################################

########################################################################
##  Merge in defaults and keymaps                                     ##
########################################################################

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

if [ -f $sysresources ]; then
    /usr/bin/xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    /usr/bin/xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    /usr/bin/xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    /usr/bin/xmodmap $usermodmap
fi

########################################################################
##  Start FluxBox Desktop Environment                                    ##
########################################################################

  exec dbus-launch --exit-with-session /usr/bin/startfluxbox
fi


I do have .xsessionsrc

test -f /etc/profile && . /etc/profile
test -f $HOME/.profile && . $HOME/.profile
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 12, 2017, 02:49:29 AM
Still have lxdm installed?

Give this a try - add a line to the ~/.xsessionrc so it looks like:

test -f /etc/profile && . /etc/profile
test -f $HOME/.profile && . $HOME/.profile

# added for default wm
/bin/bash --login -i ~/.xinitrc


then add a ~/.xinitrc

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice

# change this path to match VSIDO
exec /usr/bin/startfluxbox


see if that gets you to fluxbox.
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 12, 2017, 04:11:54 AM
Not holding out on ya PackRat.. having an issue on something else and has taken my time

I will get to this and report back a bit later
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 12, 2017, 10:47:12 AM
Got this one  :)
Will be posting the updated version here soon  :)
Got to go and eat something now. I'm hungry.

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 13, 2017, 07:25:07 PM
Sorry for the unexpected delay  :(
Had to go out of town on an unplanned trip.
So here is V2 of bash-me-up as V1 was not working on VSIDO/Debian with LightDM as DM.
Why was it not working?
Cause Debian symlinks /bin/sh to dash while most other Linux distributions symlinks /bin/sh to bash. dash is not completely compatible with bash syntax and that was the reason why bash-me-up V1 failed on VSIDO.
But Ubuntu also symlinks /bin/sh to dash and you said it worked on Ubuntu and LightDM, didn't you?
It did! Because LightDM on Ubuntu uses a custom Xsession script which is a bash script while LightDM on Debian uses /etc/X11/Xsession script which is a posix-shell dash script.
Anyways here is V2 that should work on Debian, Ubuntu, Void, Arch, Slackware, Fedora, Suse Pretty-Much-Everywhere  8)
And Of-Course on VSIDO too  8)
I've implemented all the suggestions made by @PackRat in V2 of bash-me-up. Thanks a Ton Rat-Man  :)

Here you go. Download the attached bashmeup.tar.gz (http://vsido.org/index.php?action=dlattach;topic=1252.0;attach=456) and install-bashmeup (http://vsido.org/index.php?action=dlattach;topic=1252.0;attach=457) files. Put them in a directory. Open that directory in a terminal. Make install-bashmeup executable,


chmod 755 install-bashmeup


And install it using sudo
DON'T RUN install-bashmeup AS ROOT. USE SUDO.


sudo ./install-bashmeup


Log-out and Log-in to enjoy bash-me-up flavored bash shell  8)

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 13, 2017, 11:26:58 PM
Working for my Void system - which also symlinks sh to dash

When I su to root I get the following errors:

-bash: pathprepend: command not found
-bash: pathprepend: command not found
-bash: pathprepend: command not found
-bash: pathappend: command not found
-bash: pathappend: command not found


but everything appears to be working.
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 14, 2017, 07:16:54 AM
I did not try the new version but I am getting that same exact error when I log into any tty

tty1 shows that error and just shoots back to login:

tty2-6 let me log in
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 14, 2017, 07:35:56 AM
@PackRat @VastOne
Anyone who installed V1 will have to remove the following two files manually before (preferable) or after installing V2,

sudo rm /etc/profile.d/extrapaths.sh
rm .xsession

Also remove any symbolic links in /root linking to .profile, .bash_profile, .bashrc, .bash_aliases, .bash_logout, .LESS_TERMCAP to your $HOME directory and those errors should be resolved.

If you never installed V1 then there is no need to do above.

Please test V2 on a clean system and give your feedback.
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 14, 2017, 11:00:10 AM
Tested V2 of bash-me-up on a fresh install of 64-bit VSIDO, and guess what?
It works like a charm :)
No errors or problems on logging-in either via tty or LightDM :)
Also tested it on a live session of VSIDO, and it works as expected in live session too :)
So if you are still hesitant, boot live USB or CD of VSIDO and install bash-me-up and take it for a test drive :)

Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 14, 2017, 03:51:56 PM
That worked, and it works on a clean bash environment.

You need a README file in the tarball so a user can see what changes will be made prior to running the script.

This script is good for a clean, base install, but I can see where there will a rapid point of diminishing return - particularly since the $PATH is getting altered. Some applications (perl and python based come to mind) add custom PATH arguments to the bash environment, those would be lost when this script is run. Although VSIDO is based on Sid and your average Sid user will most likely figure it out, there are a lot of less experienced users these days installing Sid, Void, Arch etc ... becuase they want a rolling release they can tweak. Could lead to some frustration for them.
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 14, 2017, 03:58:12 PM
Worked for me as well and I agree completely with PackRat.. One thing that gets altered is aliases and for me I depend heavily on the aliases I use

Getting old sucks especially trying to remember vague commands   ??? :'(
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 14, 2017, 04:15:08 PM
python and perl modules don't add path to BASH environment. Python and Perl both have their own ways of sourcing their standard PATH.
Your custom bash aliases set in .bash_aliases will be available. I tested and all VSIDO bash aliases were available and usable, like 'q' for exit. Are you sure they are not working?
Cheers!!!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 14, 2017, 04:16:31 PM
I have not tested V2 yet.. I will a bit later today and let you know
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 14, 2017, 04:19:18 PM
VastOne, please test V2. Your feedback is very important.
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: VastOne on January 15, 2017, 01:31:19 AM
Tested V2 on a brand new install of VSIDO and all seems perfect..

Will keep on testing... well done hakerdefo!
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: PackRat on January 19, 2017, 02:10:37 PM
Tested on a clean install of debian testing (upgraded to Sid).

Worked as advertised.

Some bash aliases that I find convenient for systemd. (http://vsido.org/index.php?topic=142.msg14324#msg14324)
Title: Re: bash-me-up (Bash Startup Files Setup Made Easy)
Post by: hakerdefo on January 19, 2017, 08:10:16 PM
'staton' and 'statoff'  are essential if you are a tinkerer. Thanks for sharing them PackRat!